Review Request: make parsing of fo:clip more strict, but also backward compatible

Friedrich W. H. Kossebau kossebau at kde.org
Thu Jul 12 20:12:57 BST 2012



> On July 12, 2012, 7:04 p.m., C. Boemann wrote:
> > It looks safe enough except for my little concern.
> > 
> > Also while all your extra check probably doens't do any harm - do we have reason to believe they are needed?

Besides me having had the wrong idea of what "permit" means (thought it means "forbidden" :/ so negative values _are_ allowed, need to fix that)... well, I used to learn to be better safe than sorry :)


> On July 12, 2012, 7:04 p.m., C. Boemann wrote:
> > libs/flake/KoOdfWorkaround.cpp, line 291
> > <http://git.reviewboard.kde.org/r/105528/diff/1/?file=72281#file72281line291>
> >
> >     are we sure this will hold

the only examples I found had no space between values and units, and all other cases would mean complicated code :/ so I just added support with this assumption in the back.


- Friedrich W. H.


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


On July 12, 2012, 6:52 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105528/
> -----------------------------------------------------------
> 
> (Updated July 12, 2012, 6:52 p.m.)
> 
> 
> Review request for Calligra, Inge Wallin and C. Boemann.
> 
> 
> Description
> -------
> 
> As can be seen e.g. in odf/odt/OpenDocument-v1.1.odt from the calligratests, some OOo versions did not use commas as separators for the offset values in the value "rect(...)" for the attribute "fo:clip". So the parsing fails, for the given document e.g. with
> --- 8< ---
> KoUnit::parseValue: KoUnit::parseValue: Unit  "cm0cm0cm0cm"  is not supported, please report.
> --- 8< ---
> 
> And while I created the attached patch with a workaround I changed the code to also:
>     * detect "auto" values in rect(...)
>     * check number of values in rect(...)
>     * handle negative values in rect(...)
> 
> Okay to backport to 2.5?
> 
> 
> Diffs
> -----
> 
>   libs/flake/KoOdfWorkaround.h 18b801f 
>   libs/flake/KoOdfWorkaround.cpp 9b8fce9 
>   plugins/pictureshape/PictureShape.h 3937573 
>   plugins/pictureshape/PictureShape.cpp 40c609b 
> 
> Diff: http://git.reviewboard.kde.org/r/105528/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

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


More information about the calligra-devel mailing list