Saturday, 23 November 2019

coverity scan

When we make C++17 a requirement for LibreOffice at the end of 2018 the version of coverity provided by scan.coverity.com no longer worked for us. In July 2019 a newer version of the coverity tooling was available which supported C++17 and analysis resumed.

Prior to losing coverity support we had a defect density (i.e. defects per 1,000 line of code) of 0, on its return this had inflated to 0.06 due to both new defects introduced during the down period and old defects newly detected due to additional checks introduced in the new version.

Today we're finally back to 0

Thursday, 31 October 2019

Native GTK Dialogs in LibreOffice

LibreOffice Native GTK Dialog Status

The LibreOffice UI was traditionally implemented with its own VCL toolkit which via theming emulated the host desktop toolkit.

Then we migrated the file format the dialogs were described in to the GtkBuilder file format. But still implemented with VCL widgetry, though with additional GTK-alike layout widgets.

Then migrated the translation format to gettext .mo files, which added plural form translation support we had lacked.

Then incrementally migrated the code driving the dialogs to a new API with two implementations, one for VCL widgetry and one for GTK.


Over the last few major releases the GTK version of LibreOffice has increasingly had true GTK dialogs and less VCL dialogs and in master, as of this week, there are now no direct uses of the VCL dialog APIs.

There are still some non-dialog utility windows and other elements to port over, but dialogs are complete.

LibreOffice has a lot of UI. There are 1029 XML UI definition files in master. 480 definitions of a GtkDialog and 75 additional GtkMessageDialog definitions. The remainder of the files typically describe a single page of a Notebook, Assistant or Sidebar, often appearing in multiple dialogs.

Here are some gifs of a small set of the dialogs from master under Fedora 31, taken under Wayland with peek, showing some of the stock animations of the default GTK 3.24 Adwaita theme

The Writer Character dialog

Notebook, Color Selector MenuButton, and ToggleButton animations

The Calc Page dialog

SpinButtons and legacy Preview widgets hosted in a native dialog


The Writer Paragraph dialog

"Double Decker" Notebook and Scale widgets

The Writer AutoCorrect dialog

Smooth scrolling of huge Emoji autocorrect list

Chart 3D View dialog

Amusingly Over-engineered custom lighting direction widget


The Options dialog

TreeView, Overlay ScrollBar, fade in animation of CheckButtons