Friday, September 28, 2018

Friday, February 10, 2017

Integrating LibreOffice OnLine into your web app

I've returned from FOSDEM 2017, where I talked about LibreOffice Online that we develop here at Collabora and how to integrate it with your own web service. If you did not have the opportunity to see the presentation there, here are the slides:

Click the slide to see the presentation

Monday, October 5, 2015

Aarhus: Presentations & the Table Styles in Writer

It is already a week since I am back from the great LibreOffice Conference in Aarhus. I enjoyed it a lot - talked to lots of people [eg. met Heiko for the first time in person - after having spent quite some time with him over hangouts :-)], listened to many nice presentations, gave my talks, and - even managed to find some time for the late night's hacking. Oh, and the train there and back was a good choice too - I have travelled with Stanislav who's translating & managing the Czech translations; and on the way back we have also met Jos.

Before I tell you about the Table Styles in Writer, the feature I was working on, let me share the slides from my presentations. First of all, I presented work of my GSoC students, Nathan Yee and Krisztian Pinter, during the GSoC panel:

Click the slide to see the presentation.
Then I talked about the recent achievements & plans of the LibreOffice Design team:
Click the slide to see the presentation.
Then on Thursday, I talked about what we have done in VCL, our graphics toolkit, to be able to make our rendering double-buffered:
Click the slide to see the presentation.

 

Table Styles in Writer

And now - the Table Styles in Writer. It is a feature that we have missed for a long time. In LibreOffice, we have the Table -> AutoFormat..., but applies the formatting only once; after you modify the table (like insert rows / columns) later, you basically destroy the look of the table.

During summer 2013, Alex Ivan was working on implementing the table styles as GSoC project. I rebased his work to the current master, and made it to work again. Unfortunately, the approach there turned out to be very aggressive - the changes first destroyed the Table AutoFormat feature, and then started building the Table Styles. This means that we could merge that only after we have the import and export for Table Styles - but the GSoC work did not get that far.

I reconsidered the approach, and tried to find a way that implements the core of the Table Styles functionality without destroying the Table AutoFormat - and it worked :-)

I have pushed the results to master. Now, when you apply the Table AutoFormat in Writer, it behaves as a Table Style: When you insert more rows/columns, they still keep the correct formatting, similarly deleting, or splitting tables keeps the table formatted. Direct formatting is applied over the style too, and you can clear it via "Clear Direct Formatting".

 

Further work

Loading/saving is not implemented though, so once you save the table with Table Style, it turns into a "normal" AutoFormat - the next time you open it, you see the formatting, but it is "static", ie. works as before the Table Styles work.

I hope to get the load/save done before 5.1; and there's also lots to be improved in the UI of Table Styles - but I believe the current state is already an improvement, and a step in the right direction.

Tuesday, February 10, 2015

Stabilising LibreOffice Viewer for Android

At the end of the last week we released the new version of LibreOffice Viewer for Android, and I must say, it is a pretty solid release. The app is still in Beta, and some problems (like occasional crashes) should be anticipated, but overall there have been so many stability improvements that I am confident that it's now very usable for daily work.

New components

How does the Viewer look from the technical point of view?  It is the complete LibreOffice that we use on the desktop, but cross-compiled to Android, stripped down to its bare bones, and accessed from the Java part via LibreOfficeKit to provide rendering of 'tiles' -- 256x256 bitmaps that together compose what the user views as a document.

Spot the problem in the above description? "Stripped down to bare bones".  When we initially released, some hard compromises were made, which led to many documents crashing. Did that document contain a drop down box? Ouch! How about a custom shape? Ouch! You get the idea.

To address that, I used the same approach that Markus Mohrard is using for import and export crash testing.  I have collected over 55,000 documents - not so far from the 75,000 that we test with desktop LibreOffice. I discarded documents that were not applicable to the Android Viewer, stripped down the desktop application the same way we are stripping the LibreOffice core that is on Android, and let the tests run for several days.

Based on the output, I have added all the necessary services for text documents; so crashes due to missing components should now be rare.

Documents that remain difficult

Some documents internally provide bindings to features that are intentionally left out of the Android Viewer; namely functionality relating to databases. These documents are still missing the components described above, and thus unfortunately still crash.

We could theoretically add those services too; the problem is that currently we are hitting the 50M .apk size limit that Google imposes on Play store apps.

But don't worry - we have several tricks still up our sleeves. We'll work on them in the following weeks, and eventually include more of the services that are still missing.

More stability improvements

Intents for documents opened from Gmail:  opening documents directly from GMail now works nicely. This was an important use case that we missed in the initial release, and we caught it thanks to the feedback of the users using the Viewer.

Several smaller things have also been fixed, like presentations used with Notes view now switch to the presenting view. We also added preset shape definitions, so .docx files with preset shapes now display nice images.

And finally, we improved recovery from failure -- previously, when the document failed to open, the subsequent open of a document lead to a crash; not any more.

Overall, while the latest LibreOffice Viewer for Android is still a Beta release (and the usual warnings apply), I'm confident it's a really good Beta. Many thanks to Miklos Vajna and Tomaž Vajngerl for their hard work!

Install LibreOffice Viewer Beta from Google Play and enjoy!

Tuesday, February 3, 2015

Using Icecream to speed up the LibreOffice Android build

Lots of us is using Icecream distributed compiler for the LibreOffice development. It is usually the first thing we set up at a hackfest, to speed up the build for everybody (given that it only seldom occurs that all the people build at the same time).

The LibreOffice FOSDEM HackFest is no exception; Markus even brought a MacMini with a Linux VM to provide even more building power.

The problem was that I decided to hack on Android-related stuff; and the setup for Icecream was something that I had on my TODO, never achieved, and now it became really paiful. There was a small problem that was confusing me for a while, but finally I have a how-to!
  1. Make sure you have a recent enough repo that contains this fix
  2. Create cross-compile package for your environment like this (adapt the paths of course):
    /usr/lib/icecc/icecc-create-env --gcc /local/libreoffice/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc /local/libreoffice/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++
  3. icecc-create-env will create a tarball with a hash instead of a readable name, rename it to something sensible, let's say
    /local/libreoffice/android/arm-linux-androideabi-4.9.tar.gz
  4. Find out how exactly is the compiler called. Just do ./autogen.sh > .log 2>& .log, and search for arm-linux-androideabi-gcc and arm-linux-androideabi-g++. You will need it with all the options that are there, it is quite a long command line!
  5. Modify your autogen.input to start like (we'll:
    CC=icecc [the_command_line_with_options_for_arm-linux-androideabi-gcc]
    CXX=icecc [the_command_line_with_options_for_arm-linux-androideabi-g++]
    --with-parallelism=10
    --enable-icecream
Now every time you start a new shell, just do:

export ICECC_VERSION=/local/libreoffice/android/arm-linux-androideabi-4.9.tar.gz

start the build:

./autogen.sh
make

and enjoy the lightning fast compilation for Android! :-)

Update: Since this commit, it is not necessary to set the ICECC_VERSION in every env any more, the one from the ./autogen.sh time is preserved - it has to be in sync with CC/CXX setting anyway. In other words, you can just add ICECC_VERSION to autogen.input the same way you have added CC/CXX there:

CC=icecc [the_command_line_with_options_for_arm-linux-androideabi-gcc]
CXX=icecc [the_command_line_with_options_for_arm-linux-androideabi-g++]
ICECC_VERSION=/path/to/the/tarball
--with-parallelism=10
--enable-icecream
...your other options...

Monday, February 2, 2015

LibreOffice Design Team

On Sunday, I had one more talk, this time a general one about the LibreOffice Design Team. It was in the Open Source Design Devroom at FOSDEM.

I think it this was the first year when this devroom took place - but it was really well organized. Thanks so much for accepting my talk, was a pleasure to present there!

Click the slide to see the presentation.