On 29 March 2010 23:05, Marijn Kruisselbrink wrote: > On Monday 29 March 2010 22:46:53 Jaroslaw Staniek wrote: >> Hi, >> While porting to the new KoGenStyle(s) API, I have found three >> occurences of "style.type() == 0" in kspread/Style.cpp: >> >> QString Style::saveOdf(KoGenStyle& style, KoGenStyles& mainStyles, >>                        const StyleManager* manager) const >> >> >> Is that correct that we check for KoGenStyle::StylePageLayout >> (style:page-layout as in odf 14.3 Page Layout) here? > I think what the intention of that code is is to check if the KoGenStyle that > is passed has already been initialized, or if it is still "empty", only a > KoGenStyle apparently can't be empty/invalid so that kind of fails. (back > when that code was written the type value was purely something to be > interpreted by the application, although still using 0 as value for "invalid" > seems like it was a bit of a hack/incorrect always...) the original code even > had a comment "if the type is undefined, [do something]", so no, it is not > intended to be StylePageLayout, but a Type value indicating that it is > undefined... Thanks for the detailed info, Marijn. Do you think that changing to "style.isEmpty()" would be the correct fix? -- regards / pozdrawiam, Jaroslaw Staniek http://www.linkedin.com/in/jstaniek Kexi & KOffice (http://www.kexi-project.org, http://www.koffice.org) KDE Software Development Platform on MS Windows (http://windows.kde.org) _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel