basctl/source/basicide/moduldl2.cxx | 10 ++++++---- cui/source/dialogs/MacroManagerDialog.cxx | 10 +++++++++- 2 files changed, 15 insertions(+), 5 deletions(-)
New commits: commit dde6f010f6e62d5e2f7ca7781a71d16a5717352b Author: Jim Raykowski <[email protected]> AuthorDate: Thu Dec 5 15:07:20 2024 -0900 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Dec 16 15:54:12 2024 +0100 check passed functions before use This is a follow up to commit 55e86edcb37a37123a69ce3e1eb9e20758415fb6 to fix a crash that occurs when importing a Basic library. The change made to functions arguments passed to ImportLib in PS28 requires they be checked for nullptr before use. For further understanding please see change to moduldl2.cxx at https:// gerrit.libreoffice.org/c/core/+/176254/27..28 Change-Id: I3f7ccc46134ddd2429c499d6e728e30331b51d7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177924 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178564 diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 49cf87a2d0d8..269cf3ff3d3b 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -817,7 +817,8 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog, // remove existing libraries if ( bRemove ) { - func_remove_entry(aLibName); // LibPage::InsertLib + if (func_remove_entry) + func_remove_entry(aLibName); // LibPage::InsertLib // remove module library if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) ) @@ -939,15 +940,16 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog, } } } - - func_insert_entry(aLibName); // LibPage::InsertLib + if (func_insert_entry) + func_insert_entry(aLibName); // LibPage::InsertLib bChanges = true; } } if (bChanges) { - func_insert_entries(); // MacroManager + if (func_insert_entries) + func_insert_entries(); // MacroManager MarkDocumentModified(rDocument); } }); commit a222c4a04e9a16583c7d7d49ec4c502ba169ed3d Author: Jim Raykowski <[email protected]> AuthorDate: Thu Dec 5 15:34:44 2024 -0900 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Dec 16 15:54:06 2024 +0100 Resolves tdf#164143 Tooltip with path to macro in new Macro Organizer dialog contains percent symbols instead Cyrillic Additionally use the same approach to make the expected symbols appear in the description text view. Change-Id: I89adafde4305dbe9a6e56481ed246376bc1d94a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177925 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178563 diff --git a/cui/source/dialogs/MacroManagerDialog.cxx b/cui/source/dialogs/MacroManagerDialog.cxx index 0d070420fbb1..fb46edd48640 100644 --- a/cui/source/dialogs/MacroManagerDialog.cxx +++ b/cui/source/dialogs/MacroManagerDialog.cxx @@ -25,6 +25,7 @@ #include <comphelper/documentinfo.hxx> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> +#include <osl/file.hxx> #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/inputdlg.hxx> @@ -578,6 +579,7 @@ IMPL_LINK(ScriptContainersListBox, QueryTooltip, const weld::TreeIter&, rEntryIt && xModLibContainer->isLibraryLink(aLibName)) { OUString aLinkURL = xModLibContainer->getLibraryLinkURL(aLibName); + osl::File::getSystemPathFromFileURL(aLinkURL, aLinkURL); return aLinkURL; } } @@ -966,7 +968,13 @@ void MacroManagerDialog::UpdateUI() if (xModLibContainer.is() && xModLibContainer->hasByName(aLibName) && xModLibContainer->isLibraryLink(aLibName)) { - sDescriptionText = xModLibContainer->getLibraryLinkURL(aLibName); + OUString aLinkURL = xModLibContainer->getLibraryLinkURL(aLibName); + OUString aSysPath; + if (osl::File::getSystemPathFromFileURL(aLinkURL, aSysPath) + == osl::FileBase::E_None) + sDescriptionText = aSysPath; + else + sDescriptionText = aLinkURL; } } }
