pyuno/source/loader/pythonloader.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit efd69fbd84d823efbd22a2998327f0efd4e140a9
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sun Nov 16 17:36:13 2025 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sun Nov 16 15:47:39 2025 +0100

    Use XVndSunStarExpandUrl::expand directly, instead of re-implementing it
    
    Make it similar to comphelper::getExpandedUri.
    
    Change-Id: I8674a3ad86b94dc76dbce81b043fa4b70543fbb6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194069
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/pyuno/source/loader/pythonloader.py 
b/pyuno/source/loader/pythonloader.py
index bb139a1196b9..d261b0188b6e 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -21,7 +21,6 @@ import unohelper
 import sys
 import types
 import os
-from urllib.parse import unquote
 from com.sun.star.uno import Exception, RuntimeException
 from com.sun.star.loader import XImplementationLoader
 from com.sun.star.lang import XServiceInfo
@@ -75,7 +74,9 @@ class Loader(XImplementationLoader, XServiceInfo, 
unohelper.Base):
         protocol, dependent = splitUrl(url)
         if "vnd.sun.star.expand" == protocol:
             exp = 
self.ctx.getValueByName("/singletons/com.sun.star.util.theMacroExpander")
-            url = exp.expandMacros(unquote(dependent))
+            fac = 
self.ctx.ServiceManager.createInstanceWithContext("com.sun.star.uri.UriReferenceFactory",
 self.ctx)
+            ref = fac.parse(url)
+            url = ref.expand(exp)
             protocol, dependent = splitUrl(url)
 
         if DEBUG:

Reply via email to