ooxml: preserve artistic effects on shapes

Desktop / LibreOffice - Jacobo Aragunde Pérez [igalia.com] - 23 May 2014 03:03 UTC

Bitmaps can define artistic effects like in the following example:



LO core doesn't support them, but I'm preserving them using the shape grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject so the grab bag of the XShape is not discarded.

Added several Context and Properties objects on the import side to traverse and save the relevant tags, and added the corresponding code on the export side to extract the grab bag and output the effect back.

Also added a unit test for a selection of artistic effects.

TODO: Word saves the original bitmap as an embedded wdp file so the effect can be undone. We must preserve it too and add the reference to the a14:imgLayer tag.

642a252 ooxml: preserve artistic effects on shapes.
include/oox/drawingml/fillproperties.hxx | 24 +++
.../oox/drawingml/fillpropertiesgroupcontext.hxx | 42 +++++
include/oox/export/drawingml.hxx | 1 +
oox/source/drawingml/fillproperties.cxx | 193 ++++++++++++++++++++
.../drawingml/fillpropertiesgroupcontext.cxx | 70 +++++++
oox/source/drawingml/shape.cxx | 5 +
oox/source/export/drawingml.cxx | 56 ++++++
sw/qa/extras/inc/swmodeltestbase.hxx | 1 +
.../picture-artistic-effects-preservation.docx | Bin 0 -> 17272 bytes
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 58 ++++++
writerfilter/source/dmapper/GraphicImport.cxx | 3 +-
11 files changed, 452 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share