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

LibreOffice – how we handle interoperability

LibreOffice – how we handle interoperability

Miklos V

May 12, 2015
Tweet

More Decks by Miklos V

Other Decks in Programming

Transcript

  1. 2 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna About Miklos • From Hungary • More blurb: http://vmiklos.hu/ • Google Summer of Code 2010/2011 • Rewrite of the Writer RTF import/export • Writer developer since Feb 2012 • Contractor at Collabora since Sep 2013
  2. 3 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Agenda • What is: • LibreOffice, The Document Foundation • Collabora Productivity • How we handle interoperability • Examples • What's new in LibreOffice 4.4/5.0
  3. 4 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna What is LibreOffice, The Document Foundation? • LibreOffice is a free and open source office suite • Writer, Calc, Impress, etc. • Available on Windows, Linux, OS X • The Document Foundation • Non-profit organization behind the project • Handles everything except development
  4. 5 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna No Single Vendor Dominance • No one can control more than 30% of the votes in any statutory body of TDF
  5. 6 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Total Unique IP Addresses Seen 0 20,000,000 40,000,000 60,000,000 80,000,000 100,000,000 120,000,000 Windows MacOSX Linux Tracking direct download Update Ping origins. Excludes all Linux Distributions downloads ~120m so far ( + Linux ) This time last year was ~65m
  6. 7 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna 2013 vs. 2014 commits by affiliation 2013 2014 0 5,000 10,000 15,000 20,000 25,000 30,000 SYNERZIP SUSE RedHat Openismus Nou & Off New Contributors Munich MultiCoreWare Linagora Lanedo Known contributors KACST ITOMIG Igalia IBM Ericsson Collabora CloudOn CIB Canonical Assigned Apache Volunteer ALTA
  7. 8 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Committers per month 0 20 40 60 80 100 120 140 Xamarin T ata Consultancy Services SYNERZIP SUSE Sonicle SIL RedHat Oracle Openismus Nou & Off New Contributors Munich MultiCoreWare Linagora Lanedo Known contributors KACST ITOMIG Igalia IBM Ericsson Collabora CloudOn CIB Canonical Assigned Apache Volunteer ALTA
  8. 9 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna What is Collabora Productivity? • LibreOffice is developed by a healthy mix of: • Volunteers • Companies paying full-time developers • Collabora Ltd. • Leading open source consultancy • 8 years of experience, 90+ people • Collabora Productivity Ltd. • Dedicated to Enterprise LibreOffice • Provides Level-3 support (code issues) to all Novell/SUSE LibreOffice clients • Architects of LibreOffice's OOXML export filters
  9. 11 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Interoperability • Ability to handle files we didn't produce • Files are just an on-disk representation • Of what is in the memory • Of a collection of features • #1 use-case is of course Microsoft Office • OOXML, binary formats, RTF • Both standards and non-standards
  10. 12 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna What is a feature? • Document model • UNO API • Layout / View • Filters • Tests • UI • Documentation • Specification
  11. 13 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Handling interoperability • Worst case • Includes all aspects of a new feature • Best case • Only filter part is missing • That's why there is no xslxToPdf() • File → model → file • So that for N formats, 2N filters are enough – Instead of N2
  12. 14 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Importing Non-standards • A new project from April: Document Liberation • Fits TDF's mission well. • Home for re-usable, legacy un-documented proprietary file-formats Eg. Visio, Keynote, MS Publisher, MS Works, Corel Draw, Adobe Pagemaker...
  13. 15 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Using new Standards • Importing, rendering & allow a walk- through of Khronos' Collada files:
  14. 16 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna 4 levels of “handling” • Feature is already in core • Implement the feature in core • Implement the result of the feature in core • Just preserve it
  15. 17 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Case #0: feature is already in core • RTF import, groupshape support
  16. 18 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Case #1: Implement the feature in core
  17. 19 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Case #2: Import the result of the feature in the filter • E.g. Table styles, document themes • SmartArt import • On import, apply the result of that as direct formatting • Better, than nothing, but no real editing can be performed
  18. 20 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Case #3: Just preserve it • If a feature is completely unsupported by core, it makes sense to first just preserve it • Use case: • Long document • Full of complicated features • Just want to correct a typo
  19. 21 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna We do it for ODF already • css::xml::ParaUserDefinedAttributesSupplier • css::xml::TextUserDefinedAttributesSupplier • css::xml::UserDefinedAttributesSupplier • “The idea behind this property is that a parser can throw away all attributes that it cannot handle by itself […] can be written back without loss.” • WW8 as well: SwTOXBase::maMSTOCExpression
  20. 23 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Character borders in Writer • New in LibreOffice 4.2 • Thanks to Tamás Zolnai
  21. 24 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Nested comments • New in LibreOffice 4.3
  22. 25 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Writer: better OOXML shape interop
  23. 26 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Writer / Text box shapes “Fix Text Boxes !” - thanks to CloudOn Red-lining in custom shape text-boxes. Embedded smart-art object inside custom-shape
  24. 28 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna UI re-work: complete in 4.4 • A huge extremely mechanical task: • Clean UI • Many thanks to: Caolán McNamara (Red Hat) - for his incredible work here, and also Szymon Kłos, Michal Siedlaczek, Olivier Hallot (EDX), Andras Timar (Collabora), Jan Holesovsky (Collabora), Katarina Behrens, Thomas Arnhold, Maxim Monastirsky, Manal Alhassoun, Palenik Mihály, and many others ... 4.0 4.1 4.2 4.3 4.4 0 100 200 300 400 500 600 700 800 900 Progress on UI / dialog layout Layout UI old dlg old tab-page Remaining
  25. 29 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Parallelised XLSX loading (boxes are threads).  Split XML Parse & Sheet populate  Parallelised Sheet Loading …  Parallel to GPU compilation Unzip, XML Parse, Tokenize Thread 1 Thread 2 Populate Sheet Data Structures. Unzip, XML Parse, Tokenize Populate Sheet Data Structures. … etc. =COVAR(A1:A300,B1:B300) → OpenCL code → Ready to execute kernels Progress bar thread
  26. 30 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna 3D charting ... • Streaming data through calc and get high FPS, attractive 3D chart rendering
  27. 31 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna 4.4 Other platforms: Android Viewer kindly funded by Smoose
  28. 32 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna De-confusing read-only mode. LibreOffice will now display an infobar to indicate visibly when a document is being opened in read-only mode. (Samuel Mehrbrodt, Joren De Cuyper)
  29. 34 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Writer: Improved Interop. Word compatible text highlighting thanks to Tamás Zolnai • Both highlighting and shading are preserved during import / export of Microsoft Word documents. • New compatibility option to specify how to export LibreOffice character background to Microsoft Office file formats: as highlighting or as shading. • To use this option, go to Tools Option Load/Save Microsoft Office. ▸ ▸ ▸
  30. 35 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Calc: Conditional Formatting Data bars in conditional formatting can now have a solid background thanks to Katarina Behrens (CIB) Data bars can be displayed without showing their underlying values thanks to Katarina Behrens (CIB)
  31. 36 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna PDF signing & Time- stamping ... Export to PDF now supports the Time-Stamp Protocol (IETF standard RFC 3161). The address of a Time-Stamp Authority can be specified in the security options of PDF settings (Tor Lillqvist, Collabora) – thanks to Wilhelm Tux & donors for a successful crowd funding !
  32. 38 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna LibreOfficeKit • A very simple C & C++ API for LibreOffice • Exposes file-format filters – Ideal for indexing / extraction: “convert * → HTML” • Exposes tiled rendering – Convert document fragments → Images • Exposes editing / selection events – Convert Editing → event flow in each direction. • A very simple ~header-only API – no linking • fully abstract: fn pointers, opaque structs etc. • No sockets opened, no plugins / simple init. • Global error messages. • LibreOffice Online, Android, 'loconv' built on this.
  33. 39 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna New Platform bits for 5.0 ... • Native windows 64bit - thanks to David Ostrovsky (CIB), • Also mergedlibs on Windows to improve cold- start: linking ~much of the app into 1x DLL instead of many. • Android / Editing • Online
  34. 40 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos

    Vajna Summary • During the past year, lots of interop. problems got fixed in Writer • TextBox • OOXML strict / drawingML • Nested comments • Lots of small filter improvements • Thanks for listening! :-) • Slides: http://vmiklos.hu/odp