Hi. Basic Macro Organizer causes permanent data loss when a module is moved to a new library which is then subsequently renamed (without closing the dialog in between). Steps to reproduce: 1) Open Basic Macro Organizer 2) Create a new module "MyModule" - Modules > New... > "MyModule" > OK 3) Close Basic Macro Organizer - Possibly edit contents in the macro editor and save any modifications - Verify that a corresponding "MyModule.xba" exists on filesystem 2) Open Basic Macro Organizer again 3) Create a new library "MyLibrary" - Libraries > New... > "MyLibrary > OK 4) Move "MyModule" to "MyLibrary" - Modules > Drag & Drop "MyModule" to "MyLibrary" - Note that "MyModule.xba" is no longer present on filesystem 5) Rename "MyLibrary" to "MyLibraryIsLost" - Libraries > Select "MyLibrary" > Press F2 (or a corresponding key to rename) > "MyLibraryIsLost" > Enter - Neither "MyLibrary" nor "MyLibraryIsLost" is visible in Modules anymore At this point, it is no longer possible to recover the now lost data, even if the Basic Macro Organizer dialog is not closed.
I tested on Linux and Windows and could only repro on Windows. Tested on Win with latest of 7.6 bibisect repo. Already seen in 4.3.
For anyone else that stumbles upon this bug, unlike I claimed in my previous comment, it is possible that not all hope is lost as many, if not all, macro blocks are stored in the compressed .pack backup files. As I couldn't figure out how to easily to extract these (as in select a file and uncompress it), I ended up creating my own open source unpacking utility.
Hmm, I do notice now on Linux that I get three errors dialogs upon startup: Error loading BASIC of document file:///home/user/.config/libreoffice/4/user/basic/Standard/script.xlb/: General Error. General input/output error. Error loading BASIC of document file:///home/tonttu/.config/libreoffice/4/user/basic/Library1/script.xlb/: General Error. General input/output error. Error loading BASIC of document file:///home/tonttu/.config/libreoffice/4/user/basic/Library1/dialog.xlb/: General Error. General input/output error. I got out of the situation by resetting my profile.
I can reproduce the bug even if I just rename some libraries. Gave it a try in https://gerrit.libreoffice.org/c/core/+/148483 However, it works just if a library will get renamed AFTER a module has been created AND edited.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/928957ee04c57a20bab42223b81f55a714b62d9c tdf#151741 - BASIC Organizer: fill various URLs for libraries It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Unfortunately, my UI test does not work because the control does not give me back the focus once I changed the name of the module. A prototype is in: https://gerrit.libreoffice.org/c/core/+/148483/9