Created attachment 172222 [details]
Password for library is "1234"
Since fixing bug 94617, the binary images generated by LibreOffice use new incompatible format of storing method data unconditionally (see SbMethod::StoreData changed in ), even when writing legacy image formats, and not only for image format 0x13 (see basic/source/inc/filefmt.hxx). This makes the encrypted library unusable in any older LO version, as well as in OOo and AOO.
Steps to reproduce:
1. Create a new document;
2. Add a library to it (in Basic IDE use Tools->Select Module, and on Libraries tab, under current document location, use New button);
3. Password-protect it;
4. Add a short method to it (e.g., simply calling MsgBox with a short message);
5. Add a button calling the method;
6. Save the document
7. Try pressing the button in any AOO version (or in LO 5.0.2 or older).
At step 6, there's no compatibility warning. At step 7, there will be an error message telling that the Basic script is not found (unlike the newer LO versions).
The code writing the new format should be made conditional on which image format is being written. The code pointer is in the commit .
Another code pointer: note that currently, SbModule::StoreBinaryData just calls SbiImage::Save with the default value of version, unlike in the past, where it used to check compatibility (see e.g. ).
Version: 22.214.171.124.alpha0+ (x64) / LibreOffice Community
Build ID: 0aea0cee58fe77a9058217dfdfc3d6a02b29ee2a
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-US