Getting started with LibreOffice Extension Development

Writing a Java Extension with LOEclipse
Writing a Java Extension with LOEclipse (Slides)

At the LibreOffice Espania Summit I gave a workshop about LibreOffice extension development.

For that, I prepared a starter extension which contains all the boilerplate code & config you need to create an extension for LibreOffice. It is designed to work with the LOEclipse plugin and contains a step-by-step guide to setup the development environment.

You can find the starter extension here: https://github.com/smehrbrodt/libreoffice-starter-extension, feel free to use it to create your own LibreOffice extension.

LibreOffice and Eclipse: LOEclipse 2.0 released

Remote debugging an extension with LOEclipse
Remote debugging an extension with LOEclipse

The LOEclipse-Plugin helps with developing and debugging extensions and UNO components from the Eclipse IDE.

Due to some changes in both LibreOffice and Eclipse, the Plugin didn’t work anymore with recent versions. It has now been updated and fixed to work with LibreOffice > 5.0 and Eclipse Mars (4.5). Note that it is no longer compatible with LibreOffice 3.x and 4.x. LibreOffice 4.4 is already at its End of Life and 5.1 will be released in February, so this shouldn’t hurt too much¹.

Also the Eclipse Update Site is now hosted by The Document Foundation. You can install the new version of the Plugin by adding this Update Site to Eclipse: http://eclipse-plugins.libreoffice.org.

Changelog:

  • Support for LibreOffice 5.0 added. Older releases are no longer supported.
  • Support for Eclipse Mars (4.5) added.
  • Fixed Deployment & Debugging
  • Deployment: Install extensions without asking when in debug mode or using a separate user profile
  • Runtime configuration now reads package contents from plugin.properties instead of having an own tab for this
  • Renamed the extension and internal paths (OpenOffice -> LibreOffice)
  • Hosting now by The Document Foundation
  • Java 7 is the new baseline for the code (instead of Java 5)
  • Various internal cleanups
  • Fix #5: Invalid oxt files created on Windows

More information can be found on the plugin’s Github page.

Thanks to the Austrian Federal Computing Center and the Austrian Federal Ministry of Justice for sponsoring the work on this!

¹ If it does hurt, get in touch with us. We surely can help you with our LTS Services.

Improving the Toolbars in LibreOffice

Disclaimer: This is work in progress, and it is not how it will look like in the end.

The current situation

With the Design team, we are working on improving toolbars in LibreOffice. This is part of our long-term goal, making LibreOffice “simple for beginners and powerful for experts“.

Toolbars in LibreOffice are currently quite limited: A toolbar can have icons, or custom widgets, in a row. You can switch between icon-only, icon+text or text-only display.

Allowing more flexible layout

So we want to improve Toolbars to allow a more flexible layout. The first step is to allow Toolbars to be loaded from Glade files. That technique is used all over in LibreOffice (in Dialogs and the Sidebar e.g.) to lay out widgets in a dynamic way. With that, we can have a toolbar layout like this (Mockups by Heiko):

Mockup 2
Mockup 1

Note that these images are just mockups  (subject to change)- nothing has been implemented yet.

Also this will be an optional thing – most probably we will keep a “Classic Mode” with the legacy Toolbars for the foreseeable future.

Open issues

There are some issues we need to think about, like customization and fitting these Toolbars for smaller screens.

We will focus on Writer first, on the two main toolbars (at the top). We are not yet sure what will happen with the 38 other toolbars we have in Writer (e.g. for image manipulation or table tools). Currently they keep popping up at different places, and we would like to get some uniformity in there. Basically we have three different options (Sidebar, NotebookBar or leave them as they are). This will need some more discussion at  a later point.

The current goal is to improve the layout of the toolbars itself. We expect the first results in LibreOffice 5.2 (Q4 2016).

Concerns…

Please note that we are not going to abandon the Sidebar. We expect the Toolbar and Sidebar to complement each other, not to compete with each other. One idea how that might look is that the Toolbar provides access to the most used commands and properties, while the Sidebar gives more advanced options.

Another concern many users have, is that the new Toolbar would take up too much vertical screen space. We are trying to address this concern and make the improved Toolbar not eat up much more space than currently the two default Toolbars at the top have.

Some users have suggested to drop the Toolbar completely and focus on the Sidebar only. The most common argument is that you have plenty of horizontal space on today’s screens, but little vertical space. However, this argument is only true with a single-page document in a full screen window. This doesn’t take into account multi-page documents (two pages displayed side-by-side) or two windows displayed next to each other. In both of these cases, the Sidebar might take away too much space to work efficiently. This is one of the reasons, why we continue to keep the Toolbar at the top.

Get in touch!

Ideas? Suggestions? Leave a comment below!

Finally: The design team is always looking for ways to improve LibreOffice. If you have anything that you think could make our GUI look cleaner, fresher, better, do not hesitate to let us know! Write to our Mailing List or join us in IRC (#libreoffice-design on freenode).