[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: merge pagestyle changes back to trunk
From: Sebastian Sauer <mail () dipe ! org>
Date: 2008-08-11 19:44:36
Message-ID: 200808112144.37056.mail () dipe ! org
[Download RAW message or body]
On Monday 11 August 2008, Thorsten Zachmann wrote:
> Hello,
>
> > * make saving headers/footers work again (that looks atm like a bigger
> > job cause KogenStyles+KoGenStyle was never designed to deal with multiple
> > MasterStyle's. But probably we can work around this or just fix
> > KoGenStyle.
>
> what is the exact problem you are facing here? I also has masterpages which
> are styles in kopageapp and that works without any problem. If you can
> describe the problem you have I might be able to help.
Seems my analysis of the prob was wrong and Pierre fixed it already :)
The prob was that something like;
foreach(pagestyle) {
KoGenStyle style(KoGenStyle::StyleMaster);
shapedata->saveOdf(context);
mainStyles.lookup(style, styleName, KoGenStyles::DontForceNumbering);
}
was resulting in an assert cause there where multiple defaultStyles around.
Fix by Pierre;
-void KoTextShapeData::saveOdf(KoShapeSavingContext & context, int from, int
to) const {
+void KoTextShapeData::saveOdf(KoShapeSavingContext & context, int from, int
to, bool saveDefaultStyles) const {
KoXmlWriter *writer = &context.xmlWriter();
QTextBlock block = d->document->findBlock(from);
@@ -266,7 +266,7 @@
Q_ASSERT(layout->inlineObjectTextManager());
KoStyleManager *styleManager = layout->styleManager();
- if (styleManager)
+ if (styleManager && saveDefaultStyles)
styleManager->saveOdfDefaultStyles(context.mainStyles());
seems to be logical and works :)
_______________________________________________
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