MessageBox API change

Posted by Bjoern Michaelsen on 12 May 2014

MessageBox API change

I hope that someone gets my message in a bottle

-- Message in a Bottle, the Police

So, there was some minor confusion about the wording in the LibreOffice 4.2.4 release notes.

This needs some background first: LibreOffice 4.2 modified the UNO API to pop up a message box in a slight way against LibreOffice 4.1. This was properly announced in our LibreOffice 4.2 release notes many moons ago:

The following UNO interfaces and services were changed [...] com.sun.star.awt.XMessageBox, com.sun.star.awt.XMessageBoxFactory

Luckily, LibreOffice extensions can specify a minimal version, so extensions using the new MessageBox-API can explicitly request a version of LibreOffice 4.2 or newer. This change in our sdk-examples shows how an extension can be updated to use the new API and explicitly require a version of LibreOffice 4.2 and higher. All this happened already with LibreOffice 4.2.0 being released and has nothing yet to do with the change in LibreOffice 4.2.4.

So what was changed in LibreOffice 4.2.4? Well, in addition to the LibreOffice version, old extensions sometimes just ask for an "OpenOffice.org version". Most LibreOffice versions answered its version was "3.4", so this old backwards compatible check was not very helpful anyway. So in LibreOffice 4.2.4 this value was changed to  "4.1", which might make some old extensions aware of the incompatible API change. That's all.

Note that:

So, the short answer to the question to "what changed in LibreOffice 4.2.4?" is: Nothing, if your extension uses LibreOffice-minimal-version as recommended.

Originally published on 2014-05-12 17:47:39 on wordpress.