Improving SmartArt import in LibreOffice Impress

Bb2fd3b5456ad0012799b2045f4cd212?s=47 Miklos V
February 02, 2019
79

Improving SmartArt import in LibreOffice Impress

Bb2fd3b5456ad0012799b2045f4cd212?s=128

Miklos V

February 02, 2019
Tweet

Transcript

  1. Collabora Productivity Improving SmartArt import in LibreOffice Impress

  2. 2 / 24 Miklos Vajna Software Engineer vmiklos@collabora.com Szia! LibreOffice

    Impress
  3. 3 / 24 Motivation Existent Basic support: Basic support

  4. 4 / 24 Motivation Basic support Existent Basic support: •

    PowerPoint 2010+ writes a DrawingML fallback
  5. 5 / 24 Motivation Existent Basic support: • PowerPoint 2010+

    writes a DrawingML fallback • Some support for laying out the SmartArt Basic support
  6. 6 / 24 Motivation Big corpus of legacy documents without

    fallback Basic support No fallback
  7. Motivation 7 / 24 If editing is ever wanted, own

    layout support is needed! Basic support It’s needed No fallback
  8. 8 / 24 Basicbox,tab, rendering,lined, of bracket, table list typesv/width

  9. 9 / 24 Vertical box list

  10. 10 / 24 Vertical tab list

  11. 11 / 24 Lined list

  12. 12 / 24 Vertical bracket list

  13. 13 / 24 Varying width list

  14. 14 / 24 Vertical table list

  15. 15 / 24 Basic org. chart rendering, accent of cont.

    block process types
  16. 16 / 24 Accent process

  17. 17 / 24 Continuous block process

  18. 18 / 24 Organizational Chart

  19. 19 / 24 Concepts, markup How is this code implemented?

    test- ing
  20. 20 / 24 Concepts Layout Nodes, Algorithms Layout Tree, Data

    Model Mapping Shape Properties Constraints, Rules, Text Properties
  21. 21 / 24 Markup 4 or 5 XML streams /

    SmartArt: • data1.xml: defines the shape data • quickStyle1.xml: defines styles for layout nodes • colors1.xml: defines colors for layout nodes • layout1.xml: the layout definition • drawing1.xml: optional DrawingML fallback
  22. 22 / 24 Code pointers oox/source/drawingml/diagram/ has all the code

    SmartArt layout: import-time Input: per-diagram XML streams Output: a tree of oox::drawingml::Shape objects ➔ oox::drawingml::Shape → XShape mapping code is shared with normal DrawingML import
  23. 23 / 24 Testing Integration testing only CppunitTest_sd_import_tests_smartart 28 tests,

    147 asserts For all recent improvements: No functional change without a test
  24. Collabora Productivity Thank you Collabora Productivity CollaboraOffice.com Collabora is an

    open source consulting company What we do and share with the community has to be paid by someone. Thanks to our partner SUSE for trusting us in making this possible