MAR
24
2013

Coffice - Calligra on Android available now

Introduction

Coffice (Calligra Office or coffee-in-office) is a new project that tries to make Calligra available on mobile platforms like Android, Blackberry 10, Jolla SailfishOS and Ubuntu Phone.

With the MeeGo-saga, where Calligra was the office suite that Nokia shipped with the N9, a huge chunk of focus went on trimming Calligra for mobile platforms, improving performance and compatibility with ISO OpenDocument (ODF) and Microsoft Office formats (binary and XML). When MeeGo got finished focus shifted to other platforms. Our always present Linux Desktop got extended with a great port to Windows and Krita Sketch, both done by KO GmbH. More then a year ago we also saw a first port of Calligra on Android that unfortunately never got polished enough to be published on Android's app-store(s).

Meanwhile I had the luck to build up Qt on Android expertise thanks to my employer KDAB.

Enter Coffice.

The Goals

Unlikely previous attempts that always tried to bring a 1:1 port of Calligra to mobile platforms including all dependencies I defined different goals. Those are:

* Focus on a Calligra Words (word processor) ODT viewer. Since bringing a whole Office suite to another platforms is a huge task and I am a small team I had to focus. Later on I plan to add doc/docx support, editing, saving and Calligra Sheets (spreadsheets) and Calligra Stage (presentations).

* Slim! Ever since ~10 years ago when I joined KOffice/Calligra the size of the suite was overwhelming. A huge chunk is Calligra itself, that consists of a dozen of very specialized applications. That I addressed with my focus on Words, on a selected number of plugins. The other reason for that size are the dependencies. Among them kdelibs and all it drags in. During MeeGo-times we handled that with a slim hand-modified kdelibs but decided very fast that this was the wrong way. Instead we got or will get what is commonly known yet as kdeframeworks. A much more modular kdelibs that solves the huge chunk of dependencies that are dragged on to other platforms where we (as app developers) are not particular interested in Linux Desktop integration but more into the platform that app runs on.

Work Done

* Coffice uses qmake rather then cmake. I decided for qmake cause qmake works out of the box on all mobile platforms that are supported by Qt. If cmake does that too, and its moving that direction with cmake being a first-class citizen in Qt5, it may make sense to switch to cmake again (or not) - don't have a strong opinion on that cause at the end its a tool to reach the goal.

* Coffice is 100% Qt-only. For that I introduced the coffice/fake library which maps kdelibs-API direct to Qt without all the functionality, without dbus, without daemons, etc. In most cases not even with implementation at all. Its a thin-layer to get Calligra or parts of it compiled and linking without adding any kind of patches to Calligra itself. My goal here was to *not* break the desktop (sounds familar? :) ) or uglify the code or make it more difficult to maintain that code at our first-class tear, the Linux Desktop.

* Most of calligra-libs compile+link, some selected plugins (the important ones) compile+link and Calligra Words itself compiles+links.

* I added a simple QML1 app to display.

* In total the size of the Package and installed application is 2.5MB (excluding Qt but everything else included).

Work to do

* Polish, get things fast, fix bugs, add Microsoft binary and xml filters, bring Calligra Sheets and Calligra Stage over too, etc.

* Compile versions for Blackberry 10 and Jolla SailfishOS (needs devices for testing, hint, hint :) ).

The Result

It works and the first version is available at Google Play and can be installed on your Android >=2.1 device.

Screenshot:

The Code

In the Calligra repository you will find a branch named coffice. That's (a yet 2 weeks old) untouched Calligra master with an additional top-level directory named "coffice". All work happens within that directory. Long-term plan may to get that into master or not. It depends since a stable branch with controlled merges from head has also advantages. We will see.

In that directory is a file named "Calligra.patchfile" that contains a patchset against things outside of that "coffice" directory. That file is not supposed to be there and plan is to rework the patches in there (~50 lines or so only left atm) and merge them into master. Currently its needed to "cd calligra && git apply coffice/Calligra./patchfile". Then "qtcreator coffice/coffice.pro" will load the project, allow to setup the target-environment(s) and produce packages.

Like it?

The Calligra mailinglist welcomes developers and users.

All that software including Calligra and Coffice are free, have no ads, are opensource. If you like that please donate to KDE to keep things running.

Like to get Qt-software on to Android/BB10/Windows/OSX/Linux/...? My employer: KDAB - we do platform independent software solutions.

Need expertise in ODF, OpenDocument, file-formats, Qt/HTML5: KO GmbH

Commercial license and support are available from Digia. Enjoy the benefits :)

Update

Great feedback in the web related to the READ_PHONE_STATE. Will set/raise the minSdkVersion and added a comment at related bug 309678. Thanks!

Update 2

Yes, its coming to F-Droid too.

Comments

Would have preferred if the name retained the term "Calligra". It would make android users aware of desktop Calligra and desktop users would find android Calligra easily.


By Nayar Joolfoo at Sun, 03/24/2013 - 06:01

Indeed. Fully agreed. I just wrote a mail related to that to the calligra-devel mailinglist and proposed to use "Calligra Coffice" as visible name. For the "Coffice" name: being a coffee and cola fan I like it cause of the implicit meaning. If anybody has better suggestions/proposals please make them (eg at the Calligra mailinglist). Nothing is set in stones.


By Sebastian Sauer at Mon, 03/25/2013 - 00:38

Nice to see your effort.

Cannot you just get a BB10 phone from employer, KDAB? I would wonder if it was a problem as the primary contractor for Blackberry about Qt stuff. :)

===============================

PS.: I agree about the name with the previous person. I think it is now resembling "KOffice" too much, even.


By djszapi at Sun, 03/24/2013 - 17:13

Probably yes but I would (personally) not like that cause:
1. This isn't about Qt at BB10. Its about Calligra at BB10. The difference is that I would very likely not contribute to Qt while doing the port and benefit would only be for that single app and not for all of Qt@BB10.
2. While I not work on BB10 my employer did provide me already a wide range of devices including a Playbook and embedded boards. I think I made so far not good use (as developer) with the Playbook beside some hello world apps :/ I must admit I am hoping and waiting for BB10 on Playbook :)
3. Being a while in Qt/KDE and seeing all the great work going on on all kind of platforms I see what great things people do/did with there BB10 alpha-devices. There where a few programs to catch devices and I (so my fault) missed just any deadline. Mostly because all that took way longer then hoped :/
4. In any case the design I came up with in Coffice takes BB10, Qt5 Scenegraph into account. In fact the very next step I need to do is to get threading proper working. That's something unrelated to devices/platforms but just needs to happen so BB10 Cascades or for that matter Qt5 scenegraph (performance^n!) can be proper used. Where that work happens, may it be on my Linux desktop, my XP or my N8/N9/Playbook/Android, doesn't matter. Its Qt: all platforms will benefit :) Anyhow, all that is in an early stage and there is plenty time and work left which is at this time not related to platform integration. And we will see if BB10 on Playbook happens before I can focus on bringing Coffice to BB10.


By Sebastian Sauer at Mon, 03/25/2013 - 00:57