[Libreoffice-bugs] [Bug 143989] New: on load Agenda.ods error when call user defined function with error not found method ThisComponent.getScriptProvider()
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Aug 21 07:46:02 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=143989
Bug ID: 143989
Summary: on load Agenda.ods error when call user defined
function with error not found method
ThisComponent.getScriptProvider()
Product: LibreOffice
Version: 7.1.5.2 release
Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: girner at gmaIL.COM
Description:
=Call_VOL(1,2,3)'6
Later when run
Data->Calculate->Recalculate Hard
is ok
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Call_VOL(x,y,z)
Dim oScript: oScript = GetPythonScript("WinTool.py$VOL","document")
Call_VOL=convPy2Basic(oScript.invoke(array(x,y,z), array(), array()))
End Function
Public Function GetPythonScript(macro As String, Optional location As String)
As com.sun.star.script.provider.Xscript
''' Grab Python script object before execution
' Arguments:
' macro : as "library/module.py$macro" or "module.py$macro"
' location: as "document", "share", "user" or ENUM(eration)
' Result:
' located com.sun.star.script.provider.XScript UNO service'''
If IsMissing(location) Then location = "user"
Dim mspf As Object '
com.sun.star.script.provider.MasterScriptProviderFactory
Dim sp As Object ' com.sun.star.script.provider.XScriptProvider compatible
Dim uri As String
If location="document" Then
sp = ThisComponent.getScriptProvider()
Else
mspf =
CreateUNOService("com.sun.star.script.provider.MasterScriptProviderFactory")
sp = mspf.createScriptProvider("")
End If
uri = "vnd.sun.star.script:"& macro &"?language=Python&location="& location
GetPythonScript = sp.getScript(uri)
End Function ' GetPythonScript
Actual Results:
=Call_VOL(1,2,3)'6
Error
Expected Results:
=Call_VOL(1,2,3)'6
Reproducible: Always
User Profile Reset: No
Additional Info:
Later when run
Data->Calculate->Recalculate Hard
is ok
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210821/56316b60/attachment.htm>
More information about the Libreoffice-bugs
mailing list