[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: saving the nextStyle property
From:       Thomas Zander <zander () kde ! org>
Date:       2009-02-27 13:00:38
Message-ID: 200902271400.38262.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 21. February 2009 07:58:26 Thorsten Zachmann wrote:
> > Well, his answer was "I am not sure. Better ask Thorsten".
>
> stange. Maybe a misunderstanding. The styles and the style manager
> where done by Thomas. What I'm not sure off is if
>   
> qobject_cast<KoStyleManager>(paragStyle->parent());
>
> works. Thomas should be able to answer I hope.
>
> I think we should pass the KoShapeSavingContext to the saveOdf function of
> the styles and the styleManager. Only if we do it like that we have access
> to the data we need e.g.KoSharedSavingData when saving the stlye.
> The KoSharedSavingData would be added to the KoShapeSavingContext from the
> KoStyleManager::saveOdf() so it could be used later.

My point of view is that code that works on more than one style (for example 
the nextStyle property) should not live in the style save method.
So I'd expect the styleManager or a similar class to figure how how to store 
all the (named) styles, in what order and then to help with things like 
saving the 'nextStyle' property.  For example by saving it directly to the 
xml or if thats not possible by setting the data required on the context so 
the style can find it.

In both cases the style finding the container its in (style manager) is 
unneeded. Which is good as it truly feels like a hack :)
This is the reason I pointed at you, Thorsten, since I don't know enough about 
style saving to know how to do this properly, following something like the 
strategy I wrote above.
-- 
Thomas Zander

["signature.asc" (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic