Created attachment 192265 [details] screenshots When you rename a Basic library using the Basic Macro Organizer, the name of the library is updated in dialog.xlc and script.xlc config files, and the path to the library in the actual file system is updated, but the xlink:href attribute of the element in dialog.xlc and script.xlc is not updated. It still points to the old folder. I performed the following steps: 1. Create new library called Library1 using Basic Macro Organizer 2. Restart LibreOffice to make sure all changes were written to disk 3. Rename Library1 to Library11 using Basic Macro Organizer 4. Exit LibreOffice to make sure all changes were written to disk 5. Open dialog.xlc or script.xlc in code editor Result: Path parameter is not updated (see Screenshot 1 in attached PDF) 6. Open LibreOffice Result 1: LibreOffice shows error messages (see Screenshot 2 in attached PDF) Result 2: LibreOffice creates new empty folder that matches the path parameter that was not updated (see Screenshot 3 in attached PDF)
The code pointer for the "library name changed" event in the dialog: https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/moduldl2.cxx?r=d9d9ec70&mo=11283&fi=308#308 it calls SfxLibraryContainer::renameLibrary (basic/source/uno/namecont.cxx). And it seems to me, that it doesn't fix the basic::SfxLibrary::maUnexpandedStorageURL, which stays "$(USER)/basic/Library1/script.xlb/" in the end of the function, when it is re-added to the container.
https://gerrit.libreoffice.org/c/core/+/162777
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/907d4107896234b2e7ebfd42f40cee3bd5b1d01e tdf#159458: make sure to update unexpanded URL when renaming library It will be available in 24.8.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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/942e9a79f066a26276e299660ba56874874841c6 Related: tdf#159458 Move variable URL re-creation to a central place It will be available in 24.8.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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/e137799397a36c481e92cdc00d6a3a4dbda296df tdf#159458: make sure to update unexpanded URL when renaming library It will be available in 24.2.1. 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.