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

A cikk szerzőjéről

Tímár András 1999-ben kezdett foglalkozni a szabad szoftverek honosításával. Magalakulásakor csatlakozott az FSF.hu Alapítványhoz, ahol vezető tisztséget is vállalt. 2002 óta dolgozik az OpenOffice.org (2010-től a LibreOffice) magyar verzióin. 2011-től főállású LibreOffice-fejlesztő, jelenleg a Collabora Productivity Ltd.-nek dolgozik.