android

Contents

A continuous effort

Since January, Collabora’s engineers have been working on the next generation of LibreOffice for Android: a fully functional mobile office suite, running natively, ready to edit rich documents. Thanks to Document Foundation sponsorship, we’ve spent the last three months working intensively towards this vision. Today we’re delighted to present a new prototype with spreadsheet, slideshow, and text editing built-in.Writer: formatting textCalc: selecting cells

Suite improvements

Like LibreOffice Desktop, LibreOffice for Android has separate components for different types of task. On Android, we include Writer, Calc, Draw, and Impress.

All components of the the prototype benefit from the following features:

Text editing with on-screen keyboard

Simple text formatting with bold, italic, underline and strikethrough

Text selection by touching and holding part of a section of text (aka ‘long push’)

Easy resizing of shapes and images by tapping them to select, then dragging one of eight directional handles and releasing

High quality rendering of a wide range of filetypes, including Open Document Format, OOXML, and MS Office file formats (both binary and rich text format)

One tap access to the on-screen keyboard for quickly switching between viewing and editing mode

Smooth scrolling between pages

In addition to these, each component has its own distinct features.

Writer

Document saving support, updating the originally opened file by default

Support for movable embedded images, drawings, and shapes

Calc

Touch-triggered selections of table and spreadsheet cells flows across columns, rows, and pages with the drag of a finger.

The “parts” sidebar switches between spreadsheets within the document

Draw

Impress

The “parts” sidebar shows a scrollable overview of all slides

User interface interaction and overlays are now far more accurate

Under the hood

Powerful internals

The editor consists of two parts: LibreOffice core compiled for the Android platform, and a Java component that is responsible for the user interface. They interact with each other via LibreOfficeKit — a thin C++ library that allows any application to access LibreOffice’s powerful internals via a consistent interface.

All three parts (LibreOffice core, LibreOfficeKit, and the Android interface) have been extended to enable them to handle user-specified selections, cursor placement and movement, and commands like loading a document and applying formatting. The signals we’ve implemented make way for other LibreOffice-powered applications to support editing too.

Input and interface accuracy

Highlighted text selections can include table contents, allowing for formatting of contents of multiple document sections simultaneously. Previously selections used different internal identification systems and had to be selected separately.

All Impress interaction data has been ported to TWIPs — or ‘twentieth of an inch points’, from millimetre based measurements, resulting in much finer internal measurements, and improvements to display and selection for all versions of the application.

Performance

More efficient rendering of documents tiles: those relating to non-visible areas are deprioritised and rendered in the background without blocking the initial page view from loading. The result: faster loading of documents for the user and more efficient use of the mobile device’s resources.

Joining in

This is the start of a journey that you can be part of — get involved with any number of ongoing LibreOffice activities, including LibreOffice for Android documentation, demonstration, and development.

Report any problems you find to the bug tracker, and attach any documents related to the issue so developers can investigate

To complete this prototype preview we’d like to again thank The Document Foundation for making the work possible, and remind you that, as a charitable foundation, donations power their work. Support the foundation by donating via their website.

On the last day of the conference I was presenting a LibreOffice for Android development update. I made a quick introduction to the LibreOffice Viewer which is available in Google play, and after that in more detail about the editing functionality we’re working on that’s sponsored by The Document Foundation.

In ‘From input handling to selections’, I wrote about how we let the LibreOffice for Android app draw the selections around text content natively. The next step in this Document Foundation funded project is to provide selections around more UI elements: images and shapes.

By Miklos Vajna: In “from a living document to input handling”, I wrote about how we handle touch and on-screen keyboard events in the LibreOffice Android app. A next step in this TDF-funded project is to provide more UI elements which are specific to touch devices: selections is one of them.

As part of our ongoing development of the separate LibreOffice editor app, user interface rendering has been overhauled ‘under the hood’, with the focus on faster and more accurate fetching of tiles (images which combine to form the visible Android interface).

Where scrolling complex documents used to lag, browsing is now smooth. Where occasional waiting for document sections was required, tiling now prioritises the most important sections, and renders them faster.

This work by Collabora Engineer Tomaž Vajngerl is critical for responsive editing in the LibreOffice editor project, which shares the same codebase as the Viewer application.