https://bugs.documentfoundation.org/show_bug.cgi?id=158417

            Bug ID: 158417
           Summary: Calling an embedded document Python script from Basic
                    gives an error
           Product: LibreOffice
           Version: 7.6.3.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: bugzi...@stonerecording.art

Created attachment 191079
  --> https://bugs.documentfoundation.org/attachment.cgi?id=191079&action=edit
This is the error when trying to open an embedded Python script

Calling an embedded Python script from a Basic script does not work.

The same script can be called without error if it is in the user location.

The problems seems related to the "document" location.
The script has been embedded with APSO v1.3.3.

Here is the calling Basic code :

REM  *****  BASIC  *****

Function bridge(fonction_py, param1, Optional param2,  Optional param3)

    Dim myScript as Object
    Dim chemin As String
    'The user location is working :
    'chemin = "vnd.sun.star.script:Module.py$" & fonction_py &
"?language=Python&location=user"
    'The document location does not work
     chemin = "vnd.sun.star.script:Module.py$" & fonction_py &
"?language=Python&location=document"

    myScript = ThisComponent.getScriptProvider().getScript(chemin)
    bridge = myScript.invoke(Array(param1, param2, param3), Array(), Array() )

End Function

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to