Index ¦ Archives ¦ RSS

SmartArt improvements in LibreOffice, part 4

Estimated read time: 2 minutes

I recently dived into the SmartArt support of LibreOffice, which is the component responsible for displaying complex diagrams from PPTX. I focus on the case when only the document model and the layout constraints are given, not a pre-rendered result.

First, thanks to our partner SUSE for working with Collabora to make this possible.

Organization Chart, Cycle Matrix and Picture Strip

In this post I would like to present the progress done earlier this year regarding the above mentioned diagram types — these are used in many documents.

The improvement (as always) come in small incremental steps:

  • Organization Chart is the most complex type I dealt with so far. I fixed several issues (font color, vertical ordering, multiple paragraphs in a data node, size of layout nodes, better support for hierBranch conditions, the type of connector shapes). This allows giving readable result for diagrams which are more complex than the simple 3-node one presented in the previous post.

  • Cycle Matrix: there were missing child nodes here, the composite algorithm needed improved handling of position / size from constraints and the ordering / fill / line properties of actual content also needed fixing.

  • Picture Strip: the biggest problem here was the lack of pictures, but also the existing snake algorithm needed improvements (size, positioning, spacing and margins of the child shapes were not great).

With all these fixed, we reach a much better state for the mentioned diagram types.

Results so far

The SmartArt test documents from sd/qa/unit/data/pptx/ is what I used for testing this work.

Here is how the baseline, the current and the reference rendering of Organization Chart looks like:

smartart-org-chart.pptx, baseline

smartart-org-chart.pptx, current

smartart-org-chart.pptx, reference

And here is how the baseline, the current and the reference rendering of Cycle Matrix looks like:

smartart-cycle-matrix.pptx, baseline

smartart-cycle-matrix.pptx, current

smartart-cycle-matrix.pptx, reference

And finally here is how the baseline, the current and the reference rendering of Picture Strip looks like:

smartart-picture-strip.pptx, baseline

smartart-picture-strip.pptx, current

smartart-picture-strip.pptx, reference

This is not not perfect yet, but it’s clearly a large improvement, all text is now readable from the diagrams and pictures are no longer missing!

All this is available in master (towards LibreOffice 6.3), so you can grab a daily build and try it out right now. :-)

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.