Review Request: fix writing/reading non-integer data to/from svg:viewBox

Commit Hook null at kde.org
Tue Jul 10 15:22:00 BST 2012


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


This review has been submitted with commit bc0aaf405a83aa2749ee6e6b188ca76d4ab386b2 by Friedrich W. H. Kossebau to branch calligra/2.5.

- Commit Hook


On July 8, 2012, 8:58 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105486/
> -----------------------------------------------------------
> 
> (Updated July 8, 2012, 8:58 p.m.)
> 
> 
> Review request for Calligra and Jan Hambrecht.
> 
> 
> Description
> -------
> 
> calligratests/interoperability/spreadsheets/oocalc/oos_auto_shapes.ods showed that EnhancedPathShape writes non-integer values to svg:viewBox. The reason is that in that class and other places the viewbox is stored and handled as a QRectF.
> 
> Attached patch fixes that by storing any viewBox as QRect and thus having EnhancedPathShape also writing viewbox as integer data again.
> 
> Okay to backport to 2.5 as well?
> 
> The patch does not fix the issue that graph data is slightly changed on a few loading/saving roundtrips, due to KoShape::saveOdfAttributes(...) calculating the viewbox on the fly and storing it with
>         const QSizeF s(size());
>         QString viewBox = QString("0 0 %1 %2").arg(qRound(s.width())).arg(qRound(s.height()));
>         context.xmlWriter().addAttribute("svg:viewBox", viewBox);
> That needs some bigger patch, storing the viewbox in the shape as loaded, so deep patching into all path shapes. I am working on this, but that will need some more time and good review/testing. This patch here only fixes writing of invalid data.
> Also adds a comment to KoMarker currently ignoring the <min-x>, <min-y> properties of viewbox. Separate issue, so separate fix/patch IMHO.
> 
> 
> Diffs
> -----
> 
>   libs/flake/KoMarker.cpp 55421d5 
>   libs/flake/KoPathShape.h 587ebdf 
>   libs/flake/KoPathShape.cpp 3d9f6b7 
>   plugins/pathshapes/enhancedpath/EnhancedPathParameter.cpp 30e2925 
>   plugins/pathshapes/enhancedpath/EnhancedPathShape.h 1919bb1 
>   plugins/pathshapes/enhancedpath/EnhancedPathShape.cpp a57fbea 
>   plugins/pathshapes/enhancedpath/EnhancedPathShapeFactory.cpp d820c43 
> 
> Diff: http://git.reviewboard.kde.org/r/105486/diff/
> 
> 
> Testing
> -------
> 
> Loaded and saved a few files with graph shapes. And ran validateODF.py oos_auto_shapes.ods, with no more error.
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

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


More information about the calligra-devel mailing list