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 Sept 2013
Open Document Format (ODF) • Set of Open file formats for office applications • Developed in an open process by multiple non-profits and commercial vendors • Chosen by the UK, Germany, Belgium, and others as their official format for document interchange
Other LibreOffice applications • Draw, Math, Base, etc. • Many other components in LibreOffice • Large number of advanced and expert features • Good to build on top of basic skills with Writer, Calc, and Impress • Also see several excellent videos on YouTube
The Document Foundation • The Document Foundation (TDF) is a German non-profit that supports, organizes, & deals with all of the legal & financial details for LibreOffice • There are multiple projects organized under TDF
Document Liberation Project • TDF's newest project is a set of libraries to read/write a large number of file formats • Very useful for LibreOffice users who need to import old or proprietary files • Bundling libraries together encourages reuse in other FOSS projects (Inkscape, Scribus, Calligra)
Easy Hacks: the message • Easy (to create & to hack on) • Significant They make a real impact in the project • You can do them There is nothing to stop you hacking today • Lets look at some from easy hard. →
Easy: translating German comments • Admittedly much easier if you are a German git clone git://anongit.freedesktop.org/libreoffice/core • Beautiful tool tool help out with this: bin/findgermancomments cppuhelper # random directory cppuhelper/source/propshlp.cxx:706: Ueber alle Listener iterieren und Events senden cppuhelper/source/propshlp.cxx:763: Ueber alle Listener iterieren und Events senden • Only two (identical) strings detected – to clean an entire module
Significant: translating German comments • It makes things significantly easier for non-Germans • We removed or translated ~20k lines of these so far • We still have 32k to go: done mostly by newcomers 3.3 3.4 3.5 3.6 4.0 0 10 000 20 000 30 000 40 000 50 000 60 000 Detected lines of German comment With thanks to (recent translators): Philipp Weissenbacher Philipp Riemer Samuel Mehrbrodt Enrico Weigelt Lennard Wasserthal Albert Thuswaldner Oliver Günther Markus Maier Peter Baumgarten and many more !
Easy: Tools Macros ergonomics → • We have a lot of similar ergonomic sillies in the code • Fixing them cannot be terribly hard • But it requires some easy hacking • basctl/source/basicide/macrodlg.cxx • Tree doesn't remember it's previous expansion
Significant: Tools Macros ergonomics → • Those using macros regularly will be very happy. • Others will find / use macros more easily • Lots of potential extension wins • UX-advise interaction, improved macro editing design • Every little thing adds up cf. • UI Design for programmers (Joel on Software)
Misc. Easy: Removing obsolete junk • Lots of nasties around the code to clean: • GtkYieldMutex evilness #ifdef HORRIBLE_OBSOLETE_YIELDMUTEX_IMPL – kill all of that – add a configure.in check for a recentish gtk+ version to our baseline • Write out: vcl/source/fontsubset/list.cxx • Yet another random list implementation.
Easy: Using git • Git can sound scary – but it's not so bad • One off setup your of name / E-mail (we like real ones) • Checkout the code • Edit a file you like • Commit • Push for review, we use Gerrit
Create your own Easy Hacks • Head to bugzilla: • https://bugs.documentfoundation.org/enter_bug.cgi?pr oduct=LibreOffice • Set summary and component • Description: • A clear set of code pointers • Enough detail to jump immediately into the code / task • Ie. do the leg-work, a good EasyHack takes time to file (and the reporter is the mentor)
Cross-compiling, single .so • Need to decide what will be run on the machine building LO (build) and on the target platform (host) • Need a single liblo-native-code.so, due to stupid Android linker limitation (128 libs) • Need to bypass all unit tests • Mostly done by Tor Lillqvist back in the SUSE times • Need to decide what will be run on the machine building LO (build) and on the target platform (host) • Need a single liblo-native-code.so, due to stupid Android linker limitation (128 libs) • Need to bypass all unit tests • Mostly done by Tor Lillqvist back in the SUSE times (via tml)
Tiled rendering • Idea: render many 256x256px tiles • Instead of using UNO to render a single huge bitmap • Used by Firefox for Android successfully • Initially for Writer • Mostly by Jan Holesovsky (Collabora)
Tiled rendering on Android (via LOCon 2014) • We use a subset of Fennec • Firefox for Android • Via LibreOfficeKit • The tiled rendering API is currently declared unstable • C + C++ wrapper + JNI • Initially by Tomaž Vajngerl (Collabora) • Thanks to Smoose
Tiled editing • If we have a viewer, why not allow editing, too? • Needs input handling and lifecycle management for tiles • Firefox renders webpages • Javascript → they need to update rendered webpages as well
gtktiledviewer • Android wants a whole .apk each time • See also the mentioned single .so • Development not productive • Let's sort out core + sample LOK client via GTK • Real 256x256px tiles there by me
Basic editing framework, selections • Kindly sponsored by TDF • Since doing all the heavy-lifting for free did not happen for quite some time • Not a product, but enough that the rest can be done as usual development • Selections, as that requires a working overlay • Blinking text, as that requires re-rendering
Keyboard and mouse/touch • Keyboard: Unicode + control characters • Need to map backspace to e.g. .uno:SwBackspace • Requires a fully working SfxDispatcher • Mouse/touch • Tap somewhere → blinking cursor appears • Long push → selects words
Easy hacks • Support for flat ODF • Find what services are missing and enable them • Support for styles • LOK API is there • Support copying of text • LOK API is again ready to use • Feedback about save • Error reporting, when it is complete
Building block • Provides a rendering / editing engine • Integrates with an existing file sharing / synchronization solution • Integrates with existing user management • Typically a VM / docker instance
Why online? • On-premise – control of your data • On-premise – control of your CPU & network • Bonus features • A reduced feature-set sphere – can win. – light editing use-cases to match competition • Document Formats – less relevant: – “in the cloud” • Server / Certification / Revenue model
Summary • It’s easy to contribute to LibreOffice: • EasyHacks: desktop version • Android layer builds on top of LOK API • Online (loleaflet, loolwsd) builds on top of core • Thanks for listening! :-) • Slides: http://vmiklos.hu/odp