Tag Archives: ODT

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 Scetch, 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 attemps 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 now when I joined KOffice/Calligra the size of the suite is overwhelming. A huge chunk is Calligra itself, that consists of a dozend 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’s 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 is too it may make sense to change to cmake (or not) – don’t have a string opinion there. 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 …read more
Source: FULL ARTICLE at Planet KDE

Improved Calligra for Windows after Sprint Weekend

Calligra Suite has seen improvements on Windows after a few important bugs were fixed over last weekend’s sprint in Magdeburg:

  • Calligra Words now has improved support for Microsoft .doc files, aligning with that available to Linux users.
  • Calligra Stage may now be used to give presentations, with support for multiple-monitors and the Presenter View, a custom display which assists the speaker by showing timer, slide notes and views of the current and next slide.

This updated version has been packaged and is available on KO GmbH’s downloads page.

The last few days Camilla and myself have been working to get Calligra running much more reliably on Windows – her experience in KDE, Calligra and general Linux development were invaluable, and being able to bring my own experience with the Windows platform and the build environments maintained by our employer were seen to be a perfect opportunity to host a sprint at KO GmbH‘s headquarters in Germany.

We started Friday with two big issues:

  • Microsoft .DOC import filter would load documents, but without text
  • CalligraStage would crash when the user tried to give a presentation

We started out reviewing sample documents which reflected the first issue – documents were being loaded with their structure intact (which we could see thanks to the TextDocument Inspector tool – thanks Friedrich!) but with the text missing.

Comparing stack traces helped us discover that LibreOffice and MS Word authored files were encoded slightly differently, and that the MS Word files used a format which required text to be passed through a text-converter object built on top of iconv, a text conversion library. On Windows, the iconv library used did not list the requested encoding “UNICODELITTLE” in its codepage lookup table. References to UNICODELITTLE and UNICODEBIG were replaced by UCS-2LE and UCS-2BE, which were recognised on Linux, Windows and Mac platforms. Rebuilding and opening a doc, and text!

Whilst testing the sample documents, an issue with the positioning of tables was also seen with the Windows build of the msword-odf filter only. Comparing Windows and Linux stack traces to see where the tables were being inserted into the ODT documents showed that, quite to our surprise, the Linux code didn’t follow the same execution path as Windows – all tables with the Windows-built filter were being treated as floating, even those in the test document which were not. The culprit was an uninitialised “isFloating” member variable in a data structure. A default constructor and a rebuild, and they suddenly appeared where they belonged, rather than stacked all on top of each other at the start of the document!

Calligra Stage was a little more problematic owing to issues with the build environment which affected Stage, but not Calligra Words. Thankfully we managed to find a workaround that would let us focus on debugging the presentation error. Previously we’d tried to fix this problem, and it looked like an object was getting lost, yet the event for the object was being triggered correctly with a valid object. It turned out there were subtle differences to how one could work with QWidgets in the two platforms – setting our slide-view widget’s parent to the QDesktopWidget worked fine in Linux, but led to an access violation error in Windows. Removing these calls in Windows, relying just on setting Fullscreen suddenly had presentations working, albeit hidden by the taskbar, and with an odd border. It was determined that the calls to resize and move the Widget after making it fullscreen were the problem. These were wrapped in a single setGeometry call and the fullscreen call moved til after this operation – now presentations worked, fullscreen and to secondary monitors. The Presenter View was fixed in a similar fashion, bringing the Calligra feature-set in Windows closer in line with that enjoyed by its Linux users.

The sprint was very rewarding, fixing the original document import issue, finding another and having time to fix a serious bug with Stage presentations, all making real progress towards making Calligra more usable on Windows.
Source: FULL ARTICLE at Planet KDE