Review Request: fixes KoStyleManager::saveOdf(...) to pass the family names to KoGenStyle constructors where needed

C. Boemann cbr at boemann.dk
Tue May 15 17:39:09 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104956/#review13857
-----------------------------------------------------------

Ship it!


Ship It!

- C. Boemann


On May 15, 2012, 4:32 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104956/
> -----------------------------------------------------------
> 
> (Updated May 15, 2012, 4:32 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> Initially found for calligratests/odf/odt/portrait_landscape.odt:
> INVALIDSTYLESXML (unknown file):62: error: element "style:style" missing required attribute "style:family"
> (see http://158.36.191.251:8080/viewLog.html?buildId=6567&tab=buildResultsDiv&buildTypeId=bt7#testId2825 )
> 
> Reason here was the missing  "style:family="table"", coming from the not passed argument "table" in line 250 of KoStyleManager.cpp
> 
> And looking at the rest of the code it seems there are more places where the family name needs to be passed, so I added the family name there as well. But that part is not explicitely tested by me, needs input from someone with knowledge here.
> 
> Having done this patch I wonder why the API asks at all to get the family name explicitely passed. Isn't it always the same family name (or none in some cases) for a given KoGenStyle::Type? At least for what grepping the sources gave me that impression. So a proper fix would be to remove this parameter from the construcor and instead have the family name selected automatically. Should prevent such mistakes, slightly limit the number of strings in the .data section (and source code).
> 
> 
> Diffs
> -----
> 
>   libs/kotext/styles/KoStyleManager.cpp d769f52 
> 
> Diff: http://git.reviewboard.kde.org/r/104956/diff/
> 
> 
> Testing
> -------
> 
> validation passes for odf/odt/portrait_landscape.odt
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120515/b25ec4f4/attachment.htm>


More information about the calligra-devel mailing list