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

Improving SmartArt import in LibreOffice Impress

Miklos V
February 02, 2019
380

Improving SmartArt import in LibreOffice Impress

Miklos V

February 02, 2019
Tweet

Transcript

  1. Collabora Productivity
    Improving
    SmartArt import
    in LibreOffice Impress

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    PowerPoint 2010+ writes a DrawingML
    fallback

    View full-size slide

  5. 5 / 24
    Motivation
    Existent Basic support:

    PowerPoint 2010+ writes a DrawingML
    fallback

    Some support for laying out the
    SmartArt
    Basic
    support

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  9. 9 / 24
    Vertical box list

    View full-size slide

  10. 10 / 24
    Vertical tab list

    View full-size slide

  11. 11 / 24
    Lined list

    View full-size slide

  12. 12 / 24
    Vertical bracket list

    View full-size slide

  13. 13 / 24
    Varying width list

    View full-size slide

  14. 14 / 24
    Vertical table list

    View full-size slide

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

    View full-size slide

  16. 16 / 24
    Accent process

    View full-size slide

  17. 17 / 24
    Continuous block process

    View full-size slide

  18. 18 / 24
    Organizational Chart

    View full-size slide

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

    View full-size slide

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

    View full-size 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 full-size 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 full-size 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 full-size 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 full-size slide