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

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

_______________________________________________
calligra-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/calligra-devel

Reply via email to