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
  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++]
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:


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

Saturday, January 31, 2015

LibreOffice Design: Easy Hacks

LibreOffice 4.4 has got many user interface improvements - but there's still much more to do. I've just had a talk at FOSDEM about how anybody can help, join our team!

Click the slide to see the presentation.

Friday, September 5, 2014

DrawingLayer: What Should You Know about It, and my other LibreOffice Conference 2014 presentations

At the LibreOffice Conference 2014, I had three presentations. The first one was about DrawingLayer, one of the core technologies in LibreOffice that is not known enough, which consequently leads to people not using it, or being afraid of doing changes there:
Click to see the presentation.

Based on the research I've done for the presentation, I extended the DrawingLayer's README and svx's README.

The other presentation was a Lightning talk giving a bit of a detail about the boost::unordered_map removal I've done, that was mentioned in the Miklos' blog post:

Click to see the presentation.
And the last presentation was about how to create a custom widget using the LibreOffice's widget toolkit, VCL:
Click to see the presentation.

The LibreOffice Conference is awesome, I'm extremely glad I can be here, and present to so many great people!

Wednesday, May 14, 2014

Removing files from the recent documents list

I participated in the Gran Canaria LibreOffice Hackfest recently, and once again, it was a great one :-) - I am looking forward to the next hackfest from the very minute I boarded the plane home.

As always, it was lots of talking to others, sharing ideas, plugging in the new people (few students appeared, and were interested - one even drew few dialogs in Glade, still need to integrate them). And the rest of the time, I was hacking - LibreOffice Start center again:

This time, it was the removal of files from the recent documents in the Start center; you can now point the mouse to the cross at the top right side of the document you want to remove from the list (but not from the disk of course!), a click - it is gone.

It will be available in LibreOffice 4.3; try the betas soon!

Monday, March 3, 2014

LibreOffice GSoC user interface tasks

If you are a student, love programming, and want to have fun & earn some money at the same time, you should really consider applying for Google Summer of Code 2014. And choose LibreOffice as the project - we have a really nice set of GSoC ideas to work on.

Working on a GSoC task has a real impact - for example the new LibreOffice 4.2 start center is the result of a GSoC task. Yes, the very face of new LibreOffice version is here thanks to Summer of Code.

I am going to mentor this year again, mostly user interface ideas. Let me summarize them here:

  • Improved Color Selection
    Something that is really badly needed in LibreOffice. Selecting a color that is not pre-defined is a painful task for users - help us to finally improve the experience there!
  • Further improvements in the Template manager
    The Template manager is a result of an older GSoC task too. We would like to integrate it into the new Start center, to get a seamless experience for the user.
  • Improve usability of Personas
    This is a task to make the selecting the themes for your LibreOffice more pleasant, with better integration with Firefox Themes.
  • Revamp the Gallery tool
    This task will enable the user to browse online gallery of shapes, based on an older work that made this somehow possible.
Each of this tasks will make LibreOffice more beautiful, more useful, and more pleasant to work with.

If you want to apply for any of these, don't forget that we require you to solve a programming Easy Hack first; the more of them you do, the better chances you have that we will select you.

And if you have any questions, don't hesitate to ask :-)