scripting/source/pyprov/pythonscript.py |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 87959e5deea6d33cd35dbb3b8423056f9566710e
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 12 20:32:54 2019 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Aug 13 10:10:56 2019 +0200

    construct final url from parsed output
    
    Change-Id: Ifd733625a439685ad307603eb2b00bf463eb9ca9
    Reviewed-on: https://gerrit.libreoffice.org/77373
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/scripting/source/pyprov/pythonscript.py 
b/scripting/source/pyprov/pythonscript.py
index 64e1337d642e..0f74852523b3 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -224,7 +224,13 @@ class MyUriHelper:
             sStorageUri = sStorageUri.replace( "|", "/" )
 
             # path to the .py file, relative to the base
-            sFileUri = sStorageUri[0:sStorageUri.find("$")]
+            funcNameStart = sStorageUri.find("$")
+            if funcNameStart != -1:
+                sFileUri = sStorageUri[0:funcNameStart]
+                sFuncName = sStorageUri[funcNameStart+1:]
+            else:
+                sFileUri = sStorageUri
+
             xFileUri = self.m_uriRefFac.parse(sFileUri)
             if not xFileUri:
                 message = "pythonscript: invalid relative uri '" + sFileUri+ 
"'"
@@ -241,7 +247,9 @@ class MyUriHelper:
                 log.debug( message )
                 raise RuntimeException( message )
 
-            ret = sBaseUri + sStorageUri
+            ret = sAbsScriptUri
+            if funcNameStart != -1:
+                ret = ret + "$" + sFuncName
             log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + 
ret )
             return ret
         except UnoException as e:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to