Exporting custom shapes to DrawingML

On the FOSDEM 2015 LibreOffice Hackfest I tried to improve DrawingML export of custom shapes.

Before my work DrawingML custom shape export handled only custom shapes which were imported from OOXML. In that case the equations of the custom shape are created in a way that the actual modifiers are the same for both the ODF and OOXML equations.

When the original shape is not from OOXML, then taking the adjustments without modification no longer works. Full conversion of all ODF equations back to OOXML would have been more work, not for 2 days of the hackfest, but I improved the export by exporting “non-OOXML shapes with adjustments” as polypolygons. This gave the correct view result in many cases.

Custom shapes in LibreOffice Writer inserted from Draw toolbar
Custom shapes in LibreOffice Writer inserted from Draw toolbar
Saved as .docx from Writer and opened in Word 2010 before the patch
Saved as .docx from Writer and opened in Word 2010 before the patch

Here is the result of my work. Not all shapes are correct, but there are big improvements, for example arrows, stars, and many other shapes look good now in OOXML export. This is good for now, until the real solution – full ODF <-> DrawingML conversion of shape equations – is implemented.

Saved as .docx from Writer and opened in Word 2010 after the patch
Saved as .docx from Writer and opened in Word 2010 after the patch

Vélemény, hozzászólás?

Az email címet nem tesszük közzé. A kötelező mezőket * karakterrel jelöljük.