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:37:07 BST 2012



> On July 12, 2012, 7:19 p.m., C. Boemann wrote:
> > plugins/pictureshape/PictureShape.cpp, line 245
> > <http://git.reviewboard.kde.org/r/105528/diff/2/?file=72287#file72287line245>
> >
> >     does it reall mean 0.0 for right and bottom too?

hmmmm... good catch. Not quite clear.

In ODF spec 1.2 the section "18.3.8 clipShape" says for the type clipShape: "A clip shape as defined in §7.20.1 of [XSL]."
Where [XSL] is http://www.w3.org/TR/2001/REC-xsl-20011015/ . And that says in §7.20.1: 
"In CSS2, the only valid <shape> value is: rect(<top>, <right>, <bottom>, <left>) where <top>, <bottom> <right>, and <left> specify offsets from the respective sides of the box."

But §7.20.1 also references http://www.w3.org/TR/CSS2/visufx.html#propdef-clip where it says contradicting:
"In CSS 2.1, the only valid <shape> value is: rect(<top>, <right>, <bottom>, <left>) where <top> and <bottom> specify offsets from the top border edge of the box, and <right>, and <left> specify offsets from the left border edge of the box."

So CSS2 vs. CSS 2.1? What is relevant to ODF 1.2? Only CSS2?


- Friedrich W. H.


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


On July 12, 2012, 7:17 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, 7:17 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(...)
> 
> 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/57e2af39/attachment.htm>


More information about the calligra-devel mailing list