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

List:       koffice-devel
Subject:    Re: Unsure about kspread/Style.cpp
From:       Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date:       2010-03-29 21:05:51
Message-ID: 201003292305.51622.m.kruisselbrink () student ! tue ! nl
[Download RAW message or body]

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...

Marijn
_______________________________________________
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