MessageBox API change
I hope that someone gets my message in a bottle
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.
- Most extensions using the MessageBox API have already been changed at 4.2.0 (or have been fixed by Linux distros)
- Extensions should use "LibreOffice-minimal-version" anyway by now (see example above on how to do that), it is the best way to ensure you get a well known API with welldocumented changes.
Originally published on 2014-05-12 17:47:39 on wordpress.