wizards/source/scriptforge/SF_PythonHelper.xba   |  116 +----------------------
 wizards/source/scriptforge/python/scriptforge.py |   80 +++++++--------
 wizards/source/scriptforge/script.xlb            |   30 ++---
 3 files changed, 63 insertions(+), 163 deletions(-)

New commits:
commit 485d6db9554e4a44594545bd70c837df15ef761b
Author:     Jean-Pierre Ledure <[email protected]>
AuthorDate: Thu Feb 19 16:44:06 2026 +0100
Commit:     Jean-Pierre Ledure <[email protected]>
CommitDate: Fri Feb 20 08:54:43 2026 +0100

    ScriptForge CallByName manages arrays
    
    The bug "CallByName() does not work when the returned value
    is an array"
       https://bugs.documentfoundation.org/show_bug.cgi?id=138155
    is now fixed thanks to tdf#187145
    
    This is a major improvement for the protocol
    designed to make ScriptForge run smoothly
    in Python as well as in Basic.
    
    Indeed, CallByName() is a cornerstone of that protocol.
    The implementation of this protocol is now
    greatly simplified: the previous use of
    hardcoded calls to workaround the limitation
    to scalars of CallByName() has been suppressed.
    
    The actual commit has no effect on existing scripts.
    The documentation is not impacted.
    
    Change-Id: Id01bb2d2d8be587d9c6aed227d172d10ddd85d4e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199740
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <[email protected]>

diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba 
b/wizards/source/scriptforge/SF_PythonHelper.xba
index 562f223ed828..2948cef4bf91 100644
--- a/wizards/source/scriptforge/SF_PythonHelper.xba
+++ b/wizards/source/scriptforge/SF_PythonHelper.xba
@@ -656,11 +656,9 @@ Const cstDictArg = 32              &apos;  May contain a 
Dictionary argument
 Const cstDateArg = 64          &apos;  May contain a date argument
 Const cstDateRet = 128         &apos;  Return value can be a date
 Const cstUno = 256                     &apos;  Return value can be a UNO object
-Const cstArgArray = 512                &apos;  Any argument can be a 2D array
-Const cstRetArray = 1024       &apos;  Return value can be an array
-Const cstObject = 2048         &apos;  n-th argument is a Basic object when 
numeric
+Const cstObject = 512          &apos;  n-th argument is a Basic object when 
numeric
                                                        &apos;  n (default = 0) 
can be passed as companion in an array
-Const cstHardCode = 4096       &apos;  Method must not be executed with 
CallByName()
+Const cstHardCode = 1024       &apos;  Method must not be executed with 
CallByName()
 &apos; Returned object nature
 Const objMODULE = 1, objCLASS = 2, objDICT = 3, objUNO = 4
 
@@ -694,7 +692,7 @@ Check:
                        If i = 0 And VarType(vArg) = V_STRING Then
                                If vArg = cstNoArgs Then Exit For
                        End If
-                       &apos;  Is 1st argument a reference to a Basic object ?
+                       &apos;  Is i-th argument a reference to a Basic object ?
                        If i = iArgIndex And (( iCallType And cstObject ) = 
cstObject) And SF_Utils._VarTypeExt(vArg) = V_NUMERIC Then
                                If vArg &lt; 0 Or Not 
IsArray(_SF_.PythonStorage) Then GoTo Catch
                                If vArg &gt; UBound(_SF_.PythonStorage) Then 
GoTo Catch
@@ -732,12 +730,10 @@ Check:
 
 Try:
        &apos;  Dispatching strategy: based on next constraints
-       &apos;                  (1) Bug 
https://bugs.documentfoundation.org/show_bug.cgi?id=138155
-       &apos;                          The CallByName function fails when 
returning an array
-       &apos;                  (2) Python has tuples and tuple of tuples, not 
2D arrays
-       &apos;                  (3) Passing 2D arrays through a script provider 
always transform it into a sequence of sequences
-       &apos;                  (4) The CallByName function takes exclusive 
control on the targeted object up to its exit
-       &apos;                  (5) A script provider returns a Basic Date 
variable as Empty
+       &apos;                  (1) Python has tuples and tuple of tuples, not 
2D arrays
+       &apos;                  (2) Passing 2D arrays through a script provider 
always transform it into a sequence of sequences
+       &apos;                  (3) The CallByName function takes exclusive 
control on the targeted object up to its exit
+       &apos;                  (4) A script provider returns a Basic Date 
variable as Empty
        &apos; RULES:
        &apos;  1.      All methods in any module are invoked with CallByName
        &apos;  2.      Properties in any service are got and set with 
obj.GetProperty/SetProperty(...)
@@ -745,7 +741,7 @@ Try:
        &apos;  3.      Methods in usual modules are called by 
ExecuteBasicScript() when they manipulate arrays
        &apos;  4.      Methods in class modules using a 2D array or returning 
arrays, or methods using ParamArray,
 &apos;&apos;&apos;                     are hardcoded as exceptions or are not 
implemented
-       &apos;  5.      Due to constraint (4), a predefined list of method 
calls must be hardcoded to avoid blocking use of CallByName
+       &apos;  5.      Due to constraint (3), a predefined list of method 
calls must be hardcoded to avoid blocking use of CallByName
        &apos;          The concerned methods are flagged with cstHardCode
 
        With _SF_
@@ -790,106 +786,12 @@ Try:
                        bBasicClass = ( Left(sObjectType, 3) &lt;&gt; 
&quot;SF_&quot; )
                        sLibrary = Split(sServiceName, &quot;.&quot;)(0)
 
-                       &apos;  Methods in standard modules are called by 
ExecuteBasicScript() when arrays are returned
-                       If Not bBasicClass And (iCallType And vbMethod) = 
vbMethod And (iCallType And cstRetArray) = cstRetArray Then
-                               sScript = sLibrary &amp; &quot;.&quot; &amp; 
sObjectType &amp; &quot;.&quot; &amp; Script
-                               &apos;  Force validation in targeted function, 
not in ExecuteBasicScript()
-                               _SF_.StackLevel = -1
-                               Select Case UBound(vArgs)
-                                       Case -1 :       vReturn = 
sess.ExecuteBasicScript(, sScript)
-                                       Case 0  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0))
-                                       Case 1  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1))
-                                       Case 2  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2))
-                                       Case 3  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2), vArgs(3))
-                                       Case 4  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2), vArgs(3), 
vArgs(4))
-                                       Case 5  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2), vArgs(3), 
vArgs(4), vArgs(5))
-                                       Case 6  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2), vArgs(3), 
vArgs(4), vArgs(5), vArgs(6))
-                                       Case 7  :       vReturn = 
sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2), vArgs(3), 
vArgs(4), vArgs(5), vArgs(6), vArgs(7))
-                               End Select
-                               _SF_.StackLevel = 0
-
                        &apos;  Properties in any service are got and set with 
obj.GetProperty/SetProperty(...)
-                       ElseIf (iCallType And vbGet) = vbGet Then       &apos;  
In some cases (Calc ...) GetProperty may have an argument
+                       If (iCallType And vbGet) = vbGet Then   &apos;  In some 
cases (Calc ...) GetProperty may have an argument
                                If UBound(vArgs) &lt; 0 Then vReturn = 
vBasicObject.GetProperty(Script) Else vReturn = 
vBasicObject.GetProperty(Script, vArgs(0))
                        ElseIf (iCallType And vbLet) = vbLet Then
                                vReturn = vBasicObject.SetProperty(Script, 
vArgs(0))
 
-                       &apos;  Methods in class modules using a 2D array or 
returning arrays are hardcoded as exceptions. Bug #138155
-                       ElseIf ((iCallType And vbMethod) + (iCallType And 
cstArgArray)) = vbMethod + cstArgArray Or _
-                                  ((iCallType And vbMethod) + (iCallType And 
cstRetArray)) = vbMethod + cstRetArray Then
-                               If Script = &quot;Methods&quot; Then
-                                       vReturn = vBasicObject.Methods()
-                               ElseIf Script = &quot;Properties&quot; Then
-                                       vReturn = vBasicObject.Properties()
-                               Else
-                                       Select Case sServiceName
-                                               Case 
&quot;ScriptForge.SF_Session&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;GetRangeFromCalc&quot;       :       vReturn = 
vBasicObject.GetRangeFromCalc(vArgs(0), vArgs(1))
-                                                       End Select
-                                               Case 
&quot;SFDatabases.Database&quot;
-                                                       If Script = 
&quot;GetRows&quot; Then            vReturn = vBasicObject.GetRows(vArgs(0), 
vArgs(1), vArgs(2), vArgs(3))
-                                               Case 
&quot;SFDatabases.Dataset&quot;
-                                                       If Script = 
&quot;GetRows&quot; Then            vReturn = vBasicObject.GetRows(vArgs(0), 
vArgs(1))
-                                               Case 
&quot;SFDialogs.Dialog&quot;
-                                                       If Script = 
&quot;Controls&quot; Then           vReturn = vBasicObject.Controls(vArgs(0))
-                                               Case 
&quot;SFDialogs.DialogControl&quot;
-                                                       If Script = 
&quot;SetTableData&quot; Then       vReturn = 
vBasicObject.SetTableData(vArgs(0), vArgs(1), vArgs(2))
-                                               Case 
&quot;SFDocuments.Document&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;ContextMenus&quot;           :       vReturn = 
vBasicObject.ContextMenus(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Forms&quot;                  :       vReturn = 
vBasicObject.Forms(vArgs(0))
-                                                               Case 
&quot;Styles&quot;                 :       vReturn = 
vBasicObject.Styles(vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5))
-                                                               Case 
&quot;Toolbars&quot;                       :       vReturn = 
vBasicObject.Toolbars(vArgs(0))
-                                                       End Select
-                                               Case 
&quot;SFDocuments.Base&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;ContextMenus&quot;           :       vReturn = 
vBasicObject.ContextMenus(vArgs(0), vArgs(1))
-                                                               Case 
&quot;FormDocuments&quot;  :       vReturn = vBasicObject.FormDocuments()
-                                                               Case 
&quot;Forms&quot;                  :       vReturn = 
vBasicObject.Forms(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Toolbars&quot;                       :       vReturn = 
vBasicObject.Toolbars(vArgs(0))
-                                                       End Select
-                                               Case 
&quot;SFDocuments.Calc&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;Charts&quot;                 :       vReturn = 
vBasicObject.Charts(vArgs(0), vArgs(1))
-                                                               Case 
&quot;ContextMenus&quot;           :       vReturn = 
vBasicObject.ContextMenus(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Forms&quot;                  :       vReturn = 
vBasicObject.Forms(vArgs(0), vArgs(1))
-                                                               Case 
&quot;GetFormula&quot;             :       vReturn = 
vBasicObject.GetFormula(vArgs(0))
-                                                               Case 
&quot;GetValue&quot;                       :       vReturn = 
vBasicObject.GetValue(vArgs(0))
-                                                               Case 
&quot;SetArray&quot;                       :       vReturn = 
vBasicObject.SetArray(vArgs(0), vArgs(1))
-                                                               Case 
&quot;SetFormula&quot;             :       vReturn = 
vBasicObject.SetFormula(vArgs(0), vArgs(1))
-                                                               Case 
&quot;SetValue&quot;                       :       vReturn = 
vBasicObject.SetValue(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Shapes&quot;                 :       vReturn = 
vBasicObject.Shapes(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Styles&quot;                 :       vReturn = 
vBasicObject.Styles(vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5))
-                                                               Case 
&quot;Toolbars&quot;                       :       vReturn = 
vBasicObject.Toolbars(vArgs(0))
-                                                       End Select
-                                               Case 
&quot;SFDocuments.Form&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;Controls&quot;                       :       vReturn = 
vBasicObject.Controls(vArgs(0))
-                                                               Case 
&quot;Subforms&quot;                       :       vReturn = 
vBasicObject.Subforms(vArgs(0))
-                                                       End Select
-                                               Case 
&quot;SFDocuments.FormControl&quot;
-                                                       If Script = 
&quot;Controls&quot; Then           vReturn = vBasicObject.Controls(vArgs(0))
-                                               Case 
&quot;SFDocuments.FormDocument&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;ContextMenus&quot;           :       vReturn = 
vBasicObject.ContextMenus(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Forms&quot;                  :       vReturn = 
vBasicObject.Forms(vArgs(0))
-                                                               Case 
&quot;Toolbars&quot;                       :       vReturn = 
vBasicObject.Toolbars(vArgs(0))
-                                                       End Select
-                                               Case 
&quot;SFDocuments.Writer&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;ContextMenus&quot;           :       vReturn = 
vBasicObject.ContextMenus(vArgs(0), vArgs(1))
-                                                               Case 
&quot;Forms&quot;                  :       vReturn = 
vBasicObject.Forms(vArgs(0))
-                                                               Case 
&quot;Styles&quot;                 :       vReturn = 
vBasicObject.Styles(vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5))
-                                                               Case 
&quot;Toolbars&quot;                       :       vReturn = 
vBasicObject.Toolbars(vArgs(0))
-                                                       End Select
-                                               Case 
&quot;SFWidgets.Toolbar&quot;
-                                                       Select Case Script
-                                                               Case 
&quot;ToolbarButtons&quot; :       vReturn = 
vBasicObject.ToolbarButtons(vArgs(0))
-                                                       End Select
-                                       End Select
-                               End If
-
                        &apos;  Specific methods in class modules may better 
not be executed with CallByName() because they do not return immediately
                        ElseIf bBasicClass And ((iCallType And vbMethod) + 
(iCallType And cstHardCode)) = vbMethod + cstHardCode Then
                                Select Case sServiceName
diff --git a/wizards/source/scriptforge/python/scriptforge.py 
b/wizards/source/scriptforge/python/scriptforge.py
index 606361bcb914..f5bc30403ce4 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -553,12 +553,10 @@ class SFServices(object):
     flgDictArg = 32  # Invoked service method may contain a dict argument
     flgDateArg = 64  # Invoked service method may contain a date argument
     flgDateRet = 128  # Invoked service method can return a date
-    flgArrayArg = 512  # 1st argument can be a 2D array
-    flgArrayRet = 1024  # Invoked service method can return a 2D array 
(standard modules) or any array (class modules)
     flgUno = 256  # Invoked service method/property can return a UNO object
-    flgObject = 2048  # N-th argument may be a Basic object
-                      # N (default = 0) can be passed as companion in a tuple
-    flgHardCode = 4096  # Force hardcoded call to method, avoid CallByName()
+    flgObject = 512  # N-th argument may be a Basic object
+                     # N (default = 0) can be passed as companion in a tuple
+    flgHardCode = 1024  # Force hardcoded call to method, avoid CallByName()
     # Basic class type
     moduleClass, moduleStandard = 2, 1
     #
@@ -661,13 +659,13 @@ class SFServices(object):
 
     def basicmethods(self):
         if self.serviceimplementation == 'basic':
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Methods')
+            return self.ExecMethod(self.vbMethod, 'Methods')
         else:
             return []
 
     def basicproperties(self):
         if self.serviceimplementation == 'basic':
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Properties')
+            return self.ExecMethod(self.vbMethod, 'Properties')
         else:
             return []
 
@@ -713,7 +711,7 @@ class SFScriptForge:
                 Difference with the Basic version: dates are returned in their 
iso format,
                 not as any of the datetime objects.
                 """
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'ImportFromCSVFile',
+            return self.ExecMethod(self.vbMethod, 'ImportFromCSVFile',
                                    filename, delimiter, dateformat)
 
     # #########################################################################
@@ -1226,7 +1224,7 @@ class SFScriptForge:
             return self.ExecMethod(self.vbMethod, 'FileExists', filename)
 
         def Files(self, foldername, filter = '', includesubfolders = False):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Files', 
foldername, filter, includesubfolders)
+            return self.ExecMethod(self.vbMethod, 'Files', foldername, filter, 
includesubfolders)
 
         def FolderExists(self, foldername):
             return self.ExecMethod(self.vbMethod, 'FolderExists', foldername)
@@ -1286,7 +1284,7 @@ class SFScriptForge:
             return self.ExecMethod(self.vbMethod, 'PickFolder', defaultfolder, 
title, freetext)
 
         def SubFolders(self, foldername, filter = '', includesubfolders = 
False):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'SubFolders', foldername,
+            return self.ExecMethod(self.vbMethod, 'SubFolders', foldername,
                                    filter, includesubfolders)
 
         @classmethod
@@ -1578,7 +1576,7 @@ class SFScriptForge:
             return cls.SIMPLEEXEC(scope + '#' + script, *args)
 
         def GetRangeFromCalc(self, filename, range):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'GetRangeFromCalc', filename, range)
+            return self.ExecMethod(self.vbMethod, 'GetRangeFromCalc', 
filename, range)
 
         def GetPDFExportOptions(self):
             return self.ExecMethod(self.vbMethod, 'GetPDFExportOptions')
@@ -1604,13 +1602,13 @@ class SFScriptForge:
             return self.ExecMethod(self.vbMethod + self.flgDictArg, 
'SetPDFExportOptions', pdfoptions)
 
         def UnoMethods(self, unoobject):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'UnoMethods', unoobject)
+            return self.ExecMethod(self.vbMethod, 'UnoMethods', unoobject)
 
         def UnoObjectType(self, unoobject):
             return self.ExecMethod(self.vbMethod, 'UnoObjectType', unoobject)
 
         def UnoProperties(self, unoobject):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'UnoProperties', unoobject)
+            return self.ExecMethod(self.vbMethod, 'UnoProperties', unoobject)
 
         def WebService(self, uri):
             return self.ExecMethod(self.vbMethod, 'WebService', uri)
@@ -1635,7 +1633,7 @@ class SFScriptForge:
             return self.ExecMethod(self.vbMethod, 'Exists', variablename)
 
         def ReadValue(self, variablename):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'ReadValue', variablename)
+            return self.ExecMethod(self.vbMethod, 'ReadValue', variablename)
 
         def Remove(self, variablename):
             return self.ExecMethod(self.vbMethod, 'Remove', variablename)
@@ -1697,11 +1695,11 @@ class SFScriptForge:
             return self.ExecMethod(self.vbMethod, 'IsUrl', inputstr)
 
         def SplitNotQuoted(self, inputstr, delimiter = ' ', occurrences = 0, 
quotechar = '"'):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'SplitNotQuoted', inputstr, delimiter,
+            return self.ExecMethod(self.vbMethod, 'SplitNotQuoted', inputstr, 
delimiter,
                                    occurrences, quotechar)
 
         def Wrap(self, inputstr, width = 70, tabsize = 8):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Wrap', 
inputstr, width, tabsize)
+            return self.ExecMethod(self.vbMethod, 'Wrap', inputstr, width, 
tabsize)
 
     # #########################################################################
     # SF_TextStream CLASS
@@ -1813,7 +1811,7 @@ class SFScriptForge:
             return self.ExecMethod(self.vbMethod, 'CreateDocument', 
documenttype, templatefile, hidden)
 
         def Documents(self):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Documents')
+            return self.ExecMethod(self.vbMethod, 'Documents')
 
         def EnterValue(self, prompt = '', valuetype = 'STRING', default = '', 
title = '', choices = (), format = ''):
             if isinstance(default, (datetime.datetime, datetime.time)):
@@ -1925,7 +1923,7 @@ class SFDatabases:
             return self.ExecMethod(self.vbMethod, 'DSum', expression, 
tablename, criteria)
 
         def GetRows(self, sqlcommand, directsql = False, header = False, 
maxrows = 0):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet + 
self.flgDateRet, 'GetRows', sqlcommand,
+            return self.ExecMethod(self.vbMethod + self.flgDateRet, 'GetRows', 
sqlcommand,
                                    directsql, header, maxrows)
 
         def OpenFormDocument(self, formdocument):
@@ -1995,7 +1993,7 @@ class SFDatabases:
             return self.ExecMethod(self.vbMethod, 'ExportValueToFile', 
fieldname, filename, overwrite)
 
         def GetRows(self, header = False, maxrows = 0):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet + 
self.flgDateRet, 'GetRows', header, maxrows)
+            return self.ExecMethod(self.vbMethod + self.flgDateRet, 'GetRows', 
header, maxrows)
 
         def GetValue(self, fieldname):
             return self.ExecMethod(self.vbMethod, 'GetValue', fieldname)
@@ -2068,7 +2066,7 @@ class SFDatabases:
             return self.ExecMethod(self.vbMethod, 'RemoveMenu', menuheader)
 
         def Toolbars(self, toolbarname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Toolbars', toolbarname)
+            return self.ExecMethod(self.vbMethod, 'Toolbars', toolbarname)
 
 
 # 
#####################################################################################################################
@@ -2130,7 +2128,7 @@ class SFDialogs:
             return self.ExecMethod(self.vbMethod, 'CloneControl', sourcename, 
controlname, left, top)
 
         def Controls(self, controlname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet + 
self.flgHardCode, 'Controls', controlname)
+            return self.ExecMethod(self.vbMethod, 'Controls', controlname)
 
         def CreateButton(self, controlname, place, toggle = False, push = ''):
             return self.ExecMethod(self.vbMethod, 'CreateButton', controlname, 
place, toggle, push)
@@ -2343,7 +2341,7 @@ class SFDialogs:
             return self.ExecMethod(self.vbMethod, 'SetFocus')
 
         def SetTableData(self, dataarray, widths = (1,), alignments = '', 
rowheaderwidth = 10):
-            return self.ExecMethod(self.vbMethod + self.flgArrayArg, 
'SetTableData', dataarray, widths, alignments,
+            return self.ExecMethod(self.vbMethod, 'SetTableData', dataarray, 
widths, alignments,
                                    rowheaderwidth)
 
         def WriteLine(self, line = ''):
@@ -2396,7 +2394,7 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'CloseDocument', saveask)
 
         def ContextMenus(self, contextmenuname = '', submenuchar = '>'):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'ContextMenus', contextmenuname, submenuchar)
+            return self.ExecMethod(self.vbMethod, 'ContextMenus', 
contextmenuname, submenuchar)
 
         def CreateMenu(self, menuheader, before = '', submenuchar = '>'):
             return self.ExecMethod(self.vbMethod, 'CreateMenu', menuheader, 
before, submenuchar)
@@ -2442,12 +2440,12 @@ class SFDocuments:
             # Exclude Base and Math
             doctype = self.DocumentType
             if doctype in ('Calc', 'Writer', 'FormDocument', 'Draw', 
'Impress'):
-                return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Styles', family, namepattern, used,
+                return self.ExecMethod(self.vbMethod, 'Styles', family, 
namepattern, used,
                                        userdefined, parentstyle, category)
             raise RuntimeError('The \'Styles\' method is not applicable to {0} 
documents'.format(doctype))
 
         def Toolbars(self, toolbarname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Toolbars', toolbarname)
+            return self.ExecMethod(self.vbMethod, 'Toolbars', toolbarname)
 
         def XStyle(self, family, stylename):
             # Exclude Base and Math
@@ -2490,10 +2488,10 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'CloseFormDocument', 
formdocument)
 
         def FormDocuments(self):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'FormDocuments')
+            return self.ExecMethod(self.vbMethod, 'FormDocuments')
 
         def Forms(self, formdocument, form = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Forms', 
formdocument, form)
+            return self.ExecMethod(self.vbMethod, 'Forms', formdocument, form)
 
         def GetDatabase(self, user = '', password = ''):
             return self.ExecMethod(self.vbMethod, 'GetDatabase', user, 
password)
@@ -2607,7 +2605,7 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'BorderRange', targetrange, 
borders, filterformula, filterscope)
 
         def Charts(self, sheetname, chartname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Charts', 
sheetname, chartname)
+            return self.ExecMethod(self.vbMethod, 'Charts', sheetname, 
chartname)
 
         def ClearAll(self, range, filterformula = '', filterscope = ''):
             return self.ExecMethod(self.vbMethod, 'ClearAll', range, 
filterformula, filterscope)
@@ -2691,16 +2689,16 @@ class SFDocuments:
                                    filterformula, filterscope)
 
         def Forms(self, sheetname, form = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Forms', 
sheetname, form)
+            return self.ExecMethod(self.vbMethod, 'Forms', sheetname, form)
 
         def GetColumnName(self, columnnumber):
             return self.ExecMethod(self.vbMethod, 'GetColumnName', 
columnnumber)
 
         def GetFormula(self, range):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'GetFormula', range)
+            return self.ExecMethod(self.vbMethod, 'GetFormula', range)
 
         def GetValue(self, range):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'GetValue', range)
+            return self.ExecMethod(self.vbMethod, 'GetValue', range)
 
         def ImportFromCSVFile(self, filename, destinationcell, filteroptions = 
ScriptForge.cstSymEmpty):
             return self.ExecMethod(self.vbMethod, 'ImportFromCSVFile', 
filename, destinationcell, filteroptions)
@@ -2748,19 +2746,19 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'RenameSheet', sheetname, 
newname)
 
         def SetArray(self, targetcell, value):
-            return self.ExecMethod(self.vbMethod + self.flgArrayArg, 
'SetArray', targetcell, value)
+            return self.ExecMethod(self.vbMethod, 'SetArray', targetcell, 
value)
 
         def SetCellStyle(self, targetrange, style, filterformula = '', 
filterscope = ''):
             return self.ExecMethod(self.vbMethod, 'SetCellStyle', targetrange, 
style, filterformula, filterscope)
 
         def SetFormula(self, targetrange, formula):
-            return self.ExecMethod(self.vbMethod + self.flgArrayArg, 
'SetFormula', targetrange, formula)
+            return self.ExecMethod(self.vbMethod, 'SetFormula', targetrange, 
formula)
 
         def SetValue(self, targetrange, value):
-            return self.ExecMethod(self.vbMethod + self.flgArrayArg, 
'SetValue', targetrange, value)
+            return self.ExecMethod(self.vbMethod, 'SetValue', targetrange, 
value)
 
         def Shapes(self, sheetname, shapename = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Shapes', 
sheetname, shapename)
+            return self.ExecMethod(self.vbMethod, 'Shapes', sheetname, 
shapename)
 
         def ShiftDown(self, range, wholerow = False, rows = 0):
             return self.ExecMethod(self.vbMethod, 'ShiftDown', range, 
wholerow, rows)
@@ -2872,7 +2870,7 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'CloseFormDocument')
 
         def Controls(self, controlname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Controls', controlname)
+            return self.ExecMethod(self.vbMethod, 'Controls', controlname)
 
         def GetDatabase(self, user = '', password = ''):
             return self.ExecMethod(self.vbMethod, 'GetDatabase', user, 
password)
@@ -2896,7 +2894,7 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'Requery')
 
         def Subforms(self, subform = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Subforms', subform)
+            return self.ExecMethod(self.vbMethod, 'Subforms', subform)
 
     # #########################################################################
     # SF_FormControl CLASS
@@ -2927,7 +2925,7 @@ class SFDocuments:
                                  Visible = 2, XControlModel = 0, XControlView 
= 0)
 
         def Controls(self, controlname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'Controls', controlname)
+            return self.ExecMethod(self.vbMethod, 'Controls', controlname)
 
         def SetFocus(self):
             return self.ExecMethod(self.vbMethod, 'SetFocus')
@@ -2963,7 +2961,7 @@ class SFDocuments:
             return self.ExecMethod(self.vbMethod, 'CloseDocument')
 
         def Forms(self, form = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Forms', 
form)
+            return self.ExecMethod(self.vbMethod, 'Forms', form)
 
         def GetDatabase(self, user = '', password = ''):
             return self.ExecMethod(self.vbMethod, 'GetDatabase', user, 
password)
@@ -3000,7 +2998,7 @@ class SFDocuments:
             return windowname,
 
         def Forms(self, form = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Forms', 
form)
+            return self.ExecMethod(self.vbMethod, 'Forms', form)
 
         def ImportStylesFromFile(self, filename = '', families = '', overwrite 
= False):
             return self.ExecMethod(self.vbMethod, 'ImportStylesFromFile', 
filename, families, overwrite)
@@ -3142,7 +3140,7 @@ class SFWidgets:
                                  ResourceURL = 0, Visible = 3, XUIElement = 0)
 
         def ToolbarButtons(self, buttonname = ''):
-            return self.ExecMethod(self.vbMethod + self.flgArrayRet, 
'ToolbarButtons', buttonname)
+            return self.ExecMethod(self.vbMethod, 'ToolbarButtons', buttonname)
 
     # #########################################################################
     # SF_ToolbarButton CLASS
diff --git a/wizards/source/scriptforge/script.xlb 
b/wizards/source/scriptforge/script.xlb
index e4ac88f29e9e..a77ee4a07d5b 100644
--- a/wizards/source/scriptforge/script.xlb
+++ b/wizards/source/scriptforge/script.xlb
@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 
1.0//EN" "library.dtd">
 <library:library xmlns:library="http://openoffice.org/2000/library"; 
library:name="ScriptForge" library:readonly="false" 
library:passwordprotected="false">
- <library:element library:name="SF_Services"/>
- <library:element library:name="SF_UI"/>
- <library:element library:name="SF_Exception"/>
- <library:element library:name="SF_Dictionary"/>
- <library:element library:name="SF_Session"/>
  <library:element library:name="_CodingConventions"/>
- <library:element library:name="_ModuleModel"/>
- <library:element library:name="SF_String"/>
- <library:element library:name="SF_Utils"/>
- <library:element library:name="SF_TextStream"/>
- <library:element library:name="SF_Array"/>
- <library:element library:name="SF_Platform"/>
+ <library:element library:name="SF_Session"/>
+ <library:element library:name="SF_Dictionary"/>
+ <library:element library:name="SF_Exception"/>
+ <library:element library:name="SF_UI"/>
+ <library:element library:name="SF_Services"/>
  <library:element library:name="SF_PythonHelper"/>
- <library:element library:name="SF_FileSystem"/>
- <library:element library:name="SF_Timer"/>
- <library:element library:name="SF_Region"/>
- <library:element library:name="SF_L10N"/>
+ <library:element library:name="SF_Platform"/>
+ <library:element library:name="SF_Array"/>
+ <library:element library:name="SF_TextStream"/>
+ <library:element library:name="SF_Utils"/>
+ <library:element library:name="SF_String"/>
+ <library:element library:name="_ModuleModel"/>
  <library:element library:name="SF_SharedMemory"/>
+ <library:element library:name="SF_L10N"/>
+ <library:element library:name="SF_Region"/>
  <library:element library:name="SF_Root"/>
  <library:element library:name="__License"/>
+ <library:element library:name="SF_FileSystem"/>
+ <library:element library:name="SF_Timer"/>
 </library:library>
\ No newline at end of file

Reply via email to