Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Improving SmartArt import in LibreOffice Impress

Miklos V
February 02, 2019
270

Improving SmartArt import in LibreOffice Impress

Miklos V

February 02, 2019
Tweet

Transcript

  1. Collabora Productivity
    Improving
    SmartArt import
    in LibreOffice Impress

    View Slide

  2. 2 / 24
    Miklos
    Vajna
    Software Engineer
    [email protected]
    Szia!
    LibreOffice
    Impress

    View Slide

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

    View Slide

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

    PowerPoint 2010+ writes a DrawingML
    fallback

    View Slide

  5. 5 / 24
    Motivation
    Existent Basic support:

    PowerPoint 2010+ writes a DrawingML
    fallback

    Some support for laying out the
    SmartArt
    Basic
    support

    View Slide

  6. 6 / 24
    Motivation
    Big corpus of legacy documents
    without fallback
    Basic
    support
    No fallback

    View Slide

  7. Motivation
    7 / 24
    If editing is ever wanted,
    own layout support is needed!
    Basic
    support
    It’s needed
    No fallback

    View Slide

  8. 8 / 24
    Basicbox,tab,
    rendering,lined,
    of bracket, table
    list typesv/width

    View Slide

  9. 9 / 24
    Vertical box list

    View Slide

  10. 10 / 24
    Vertical tab list

    View Slide

  11. 11 / 24
    Lined list

    View Slide

  12. 12 / 24
    Vertical bracket list

    View Slide

  13. 13 / 24
    Varying width list

    View Slide

  14. 14 / 24
    Vertical table list

    View Slide

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

    View Slide

  16. 16 / 24
    Accent process

    View Slide

  17. 17 / 24
    Continuous block process

    View Slide

  18. 18 / 24
    Organizational Chart

    View Slide

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

    View Slide

  20. 20 / 24
    Concepts
    Layout Nodes, Algorithms
    Layout Tree, Data Model Mapping
    Shape Properties
    Constraints, Rules, Text Properties

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide

  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

    View Slide