cui/source/dialogs/MacroManagerDialog.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit ab5b5ad75d7816d449255b8e0663032749bfc041 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Thu Dec 5 15:34:44 2024 -0900 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sat Dec 7 17:18:48 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 <rayk...@gmail.com> diff --git a/cui/source/dialogs/MacroManagerDialog.cxx b/cui/source/dialogs/MacroManagerDialog.cxx index a017e4da31fb..ebc07902dcb3 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; } } }