Slide 1

Slide 1 text

LibreOffice – how we handle interoperability Miklos Vajna 2015-05-12

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

How we handle interoperability ↔ ODF

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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...

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Examples

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

24 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos Vajna Nested comments ● New in LibreOffice 4.3

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

4.4 developments

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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)

Slide 33

Slide 33 text

What's next: LibreOffice 5.0

Slide 34

Slide 34 text

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. ▸ ▸ ▸

Slide 35

Slide 35 text

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)

Slide 36

Slide 36 text

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 !

Slide 37

Slide 37 text

37 / 40 Protocols Plugfest Europe 2015, Zaragoza | Miklos Vajna Improved Sidebars:

Slide 38

Slide 38 text

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.

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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