Review Request: Better support for hatch background

Thorsten Zachmann t.zachmann at zagge.de
Sat Aug 25 17:10:58 BST 2012



> On Aug. 21, 2012, 7:14 p.m., Friedrich W. H. Kossebau wrote:
> > libs/flake/KoHatchBackground.cpp, line 187
> > <http://git.reviewboard.kde.org/r/106115/diff/1/?file=79918#file79918line187>
> >
> >     Misses to deal with any units deg, grad, rad, no?
> 
> Thorsten Zachmann wrote:
>     I had a look at this and it seems that LO/OO does not support this here. Also the saving of the draw:rotation value seems to be incorrect as it is the angle * 10 which is not according to the spec. I had hoped that I can read it the way LO/OO does and then save it correctly but as they don't support the units I don't see how that can be done besides writing it out the way LO/OO does. Any ideas?
> 
> Friedrich W. H. Kossebau wrote:
>     LO/AOO currently only saves without unit, but what about other ODF producers, which could make full use of the ODF spec? IMHO the parsing code should be better safe then sorry and completely deal with spec-compliant data.
>     
>     About the angle * 10, Inge gave a hint on the mailinglist already.

The loading has been fixed to also support loading of values with a unit. I read the mails and as far as I understood both LO/OO and MSO save the values by 0.1 degree. And they proposed to approach the ODF TC about fixing the spec in case no value is given to be as the apps do.


> On Aug. 21, 2012, 7:14 p.m., Friedrich W. H. Kossebau wrote:
> > libs/flake/KoHatchBackground.cpp, line 193
> > <http://git.reviewboard.kde.org/r/106115/diff/1/?file=79918#file79918line193>
> >
> >     Any reason? Compatibility with LO/AOO?
> 
> Thorsten Zachmann wrote:
>     Just make sure there is a default in case it is not specified in the odf. LO/OO specifies it on saving so it is just a case to make sure we show something sensible when there is no data in the odf.
> 
> Friedrich W. H. Kossebau wrote:
>     Yes, just wanted to know if there is any rational why it is 2 mm and not say 2.41 mm :)
>     The rational would be noted in the comment, so a future code reader does not wonder where this value is derived from.

I have updated the comment locally.


- Thorsten


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


On Aug. 25, 2012, 5:38 a.m., Thorsten Zachmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106115/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2012, 5:38 a.m.)
> 
> 
> Review request for Calligra and Jan Hambrecht.
> 
> 
> Description
> -------
> 
> Implement correct support for hatch background as defined in odf. With this patch the different styles, freely defined angles and distance between the lines of the hatch is supported.
> 
> This patch also changes the KoColorBackground to also use the d pointer of the parent which reduces the memory needed for a KoColorBackground.
> 
> 
> This addresses bugs 260534 and 298708.
>     http://bugs.kde.org/show_bug.cgi?id=260534
>     http://bugs.kde.org/show_bug.cgi?id=298708
> 
> 
> Diffs
> -----
> 
>   libs/flake/CMakeLists.txt 15b6e6c 
>   libs/flake/KoColorBackground.h 88b61bd 
>   libs/flake/KoColorBackground.cpp 66d7ffc 
>   libs/flake/KoColorBackground_p.h PRE-CREATION 
>   libs/flake/KoHatchBackground.h PRE-CREATION 
>   libs/flake/KoHatchBackground.cpp PRE-CREATION 
>   libs/flake/KoShape.cpp 3a32e9f 
> 
> Diff: http://git.reviewboard.kde.org/r/106115/diff/
> 
> 
> Testing
> -------
> 
> Tested with cstester and the documents of the bug reports.
> 
> 
> Thanks,
> 
> Thorsten Zachmann
> 
>

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


More information about the calligra-devel mailing list