wizards/source/scriptforge/SF_Dictionary.xba | 2 wizards/source/scriptforge/SF_FileSystem.xba | 2 wizards/source/scriptforge/SF_PythonHelper.xba | 37 +++++++++++++ wizards/source/scriptforge/SF_Services.xba | 2 wizards/source/scriptforge/SF_Session.xba | 60 ++++++++++++++++++++++ wizards/source/scriptforge/SF_Utils.xba | 2 wizards/source/scriptforge/_CodingConventions.xba | 2 wizards/source/scriptforge/python/scriptforge.py | 22 +++++++- wizards/source/sfdocuments/SF_Base.xba | 6 +- wizards/source/sfdocuments/SF_Calc.xba | 6 +- wizards/source/sfdocuments/SF_Document.xba | 43 ++++++++++++--- wizards/source/sfdocuments/SF_Form.xba | 2 wizards/source/sfdocuments/SF_FormControl.xba | 2 wizards/source/sfdocuments/SF_Writer.xba | 6 +- 14 files changed, 170 insertions(+), 24 deletions(-)
New commits: commit 9688e4970eed2b4bb4265df2a5781452a8ef5c52 Author: Jean-Pierre Ledure <j...@ledure.be> AuthorDate: Sun Jan 30 17:19:31 2022 +0100 Commit: Jean-Pierre Ledure <j...@ledure.be> CommitDate: Sun Jan 30 18:26:36 2022 +0100 ScriptForge - (SF_Session, SF_Document) add arguments to RunCommand() Next wiki page https://wiki.documentfoundation.org/Development/DispatchCommands facilitates the use of commands with the DispatchHelper service, including with arguments This commit - adds the RunCommand() method in the Session service - extends the scope of existing RunCommand() methods for the Document, Base, Calc and Writer services with the addition of command arguments Syntax by examples: (Basic) session.RunCommand("BasicIDEAppear", _ "Document", "LibreOffice Macros & Dialogs", _ "LibName", "ScriptForge", _ "Name", "SF_Session", _ "Line", 100) (Python) (1) session.RunCommand("BasicIDEAppear", "Document", "LibreOffice Macros & Dialogs", "LibName", "ScriptForge", "Name", "SF_Session", "Line", 100) (Python) (2) session.RunCommand("BasicIDEAppear", Document = "LibreOffice Macros & Dialogs", LibName = "ScriptForge", Name = "SF_Session", Line = 100) Change-Id: I60cd5eb1ed0a057420215ce7aebe92b2aafabd53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129175 Tested-by: Jean-Pierre Ledure <j...@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <j...@ledure.be> diff --git a/wizards/source/scriptforge/SF_Dictionary.xba b/wizards/source/scriptforge/SF_Dictionary.xba index fc92e24dd2ad..367fc47553d8 100644 --- a/wizards/source/scriptforge/SF_Dictionary.xba +++ b/wizards/source/scriptforge/SF_Dictionary.xba @@ -952,4 +952,4 @@ Const cstSeparator = ", " End Function ' ScriptForge.SF_Dictionary._Repr REM ============================================ END OF SCRIPTFORGE.SF_DICTIONARY -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/scriptforge/SF_FileSystem.xba b/wizards/source/scriptforge/SF_FileSystem.xba index 3f38d141e5fd..d71937d6e64a 100644 --- a/wizards/source/scriptforge/SF_FileSystem.xba +++ b/wizards/source/scriptforge/SF_FileSystem.xba @@ -2085,4 +2085,4 @@ Dim sFolder As String ' Folder End Function ' ScriptForge.SF_FileSystem._SFInstallFolder REM ============================================ END OF SCRIPTFORGE.SF_FileSystem -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba b/wizards/source/scriptforge/SF_PythonHelper.xba index 5b919ba5abe1..442a4bd1b856 100644 --- a/wizards/source/scriptforge/SF_PythonHelper.xba +++ b/wizards/source/scriptforge/SF_PythonHelper.xba @@ -795,6 +795,10 @@ Try: ' Methods in class modules are invoked with CallByName ElseIf bBasicClass And ((CallType And vbMethod) = vbMethod) Then Select Case UBound(vArgs) + ' Dirty alternatives to process usual and ParamArray cases + ' But, up to ... how many ? + ' - The OFFSETADDRESSERROR has 12 arguments + ' - The ".uno:DataSort" command may have 14 property name-value pairs Case -1 : vReturn = CallByName(vBasicObject, Script, vbMethod) Case 0 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0)) Case 1 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1)) @@ -804,6 +808,37 @@ Try: Case 5 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5)) Case 6 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6)) Case 7 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7)) + Case 8 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8)) + Case 9 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9)) + Case 10 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10)) + Case 11 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11)) + Case 12, 13 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12)) + Case 14, 15 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14)) + Case 16, 17 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16)) + Case 18, 19 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16), vArgs(17), vArgs(18)) + Case 20, 21 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16), vArgs(17), vArgs(18) _ + , vArgs(19), vArgs(20)) + Case 22, 23 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16), vArgs(17), vArgs(18) _ + , vArgs(19), vArgs(20), vArgs(21), vArgs(22)) + Case 24, 25 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16), vArgs(17), vArgs(18) _ + , vArgs(19), vArgs(20), vArgs(21), vArgs(22), vArgs(23), vArgs(24)) + Case 26, 27 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16), vArgs(17), vArgs(18) _ + , vArgs(19), vArgs(20), vArgs(21), vArgs(22), vArgs(23), vArgs(24), vArgs(25), vArgs(26)) + Case >= 28 : vReturn = CallByName(vBasicObject, Script, vbMethod, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7) _ + , vArgs(8), vArgs(9), vArgs(10), vArgs(11), vArgs(12), vArgs(13), vArgs(14), vArgs(15), vArgs(16), vArgs(17), vArgs(18) _ + , vArgs(19), vArgs(20), vArgs(21), vArgs(22), vArgs(23), vArgs(24), vArgs(25), vArgs(26), vArgs(27), vArgs(28)) End Select End If @@ -824,7 +859,7 @@ Try: If IsArray(vReturn) Then ReDim vReturnArray(0 To 2) iDims = SF_Array.CountDims(vReturn) - ' Replace dates by ISO notation + ' Replace dates by UNO format If iDims = 1 Then For i = LBound(vReturn) To UBound(vReturn) If VarType(vReturn(i)) = V_DATE Then vReturn(i) = CDateToUnoDateTime(vReturn(i)) diff --git a/wizards/source/scriptforge/SF_Services.xba b/wizards/source/scriptforge/SF_Services.xba index d77058cb3ba0..c6910aea5e50 100644 --- a/wizards/source/scriptforge/SF_Services.xba +++ b/wizards/source/scriptforge/SF_Services.xba @@ -612,4 +612,4 @@ Catch: End Function ' ScriptForge.SF_Services._NewTimer REM ============================================== END OF SCRIPTFORGE.SF_SERVICES -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/scriptforge/SF_Session.xba b/wizards/source/scriptforge/SF_Session.xba index f02a958768ce..748daf597f46 100644 --- a/wizards/source/scriptforge/SF_Session.xba +++ b/wizards/source/scriptforge/SF_Session.xba @@ -598,6 +598,66 @@ Catch: GoTo Finally End Function ' ScriptForge.SF_Session.RunApplication +REM ----------------------------------------------------------------------------- +Public Sub RunCommand(Optional ByVal Command As Variant _ + , ParamArray Args As Variant _ + ) +''' Run on the current window the given menu command. The command is executed with or without arguments +''' A few typical commands: +''' About, Delete, Edit, Undo, Copy, Paste, ... +''' Dozens can be found on next page: https://wiki.documentfoundation.org/Development/DispatchCommands +''' Args: +''' Command: Case-sensitive. The command itself is not checked. +''' If the command does not contain the ".uno:" prefix, it is added. +''' If nothing happens, then the command is probably wrong +''' Args: Pairs of arguments name (string), value (any) +''' Returns: +''' Examples: +''' session.RunCommand("BasicIDEAppear", _ +''' "Document", "LibreOffice Macros & Dialogs", _ +''' "LibName", "ScriptForge", _ +''' "Name", "SF_Session", _ +''' "Line", 600) + +Dim oDispatch ' com.sun.star.frame.DispatchHelper +Dim vProps As Variant ' Array of PropertyValues +Dim vValue As Variant ' A single value argument +Dim sCommand As String ' Alias of Command +Dim i As Long +Const cstPrefix = ".uno:" + +Const cstThisSub = "Session.RunCommand" +Const cstSubArgs = "Command, [arg0Name, arg0Value], [arg1Name, arg1Value], ..." + + If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch + +Check: + If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then + If Not SF_Utils._Validate(Command, "Command", V_STRING) Then GoTo Finally + If Not SF_Utils._ValidateArray(Args, "Args", 1) Then GoTo Finally + For i = 0 To UBound(Args) - 1 Step 2 + If Not SF_Utils._Validate(Args(i), "Arg" & CStr(i/2) & "Name", V_STRING) Then GoTo Finally + Next i + End If + +Try: + ' Build array of property values + vProps = Array() + For i = 0 To UBound(Args) - 1 Step 2 + If IsEmpty(Args(i + 1)) Then vValue = Null Else vValue = Args(i + 1) + vProps = SF_Array.Append(vProps, SF_Utils._MakePropertyValue(Args(i), vValue)) + Next i + Set oDispatch = SF_Utils._GetUNOService("DispatchHelper") + If SF_String.StartsWith(Command, cstPrefix) Then sCommand = Command Else sCommand = cstPrefix & Command + oDispatch.executeDispatch(StarDesktop.ActiveFrame, sCommand, "", 0, vProps) + +Finally: + SF_Utils._ExitFunction(cstThisSub) + Exit Sub +Catch: + GoTo Finally +End Sub ' ScriptForge.SF_Session.RunCommand + REM ----------------------------------------------------------------------------- Public Sub SendMail(Optional ByVal Recipient As Variant _ , Optional ByRef Cc As Variant _ diff --git a/wizards/source/scriptforge/SF_Utils.xba b/wizards/source/scriptforge/SF_Utils.xba index 8b8b8d7eea93..c0d63bcc6b36 100644 --- a/wizards/source/scriptforge/SF_Utils.xba +++ b/wizards/source/scriptforge/SF_Utils.xba @@ -986,4 +986,4 @@ Dim iType As Integer ' VarType of argument End Function ' ScriptForge.SF_Utils._VarTypeExt REM ================================================= END OF SCRIPTFORGE.SF_UTILS -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/scriptforge/_CodingConventions.xba b/wizards/source/scriptforge/_CodingConventions.xba index 913c8b254810..71fb42c77201 100644 --- a/wizards/source/scriptforge/_CodingConventions.xba +++ b/wizards/source/scriptforge/_CodingConventions.xba @@ -97,4 +97,4 @@ REM ============================================================================ ' * Comments about a code block should be left indented. ' If it concerns only the next line, no indent required (may also be put at the end of the line). ''' -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py index 18334f3684c8..c4b14ba52ff7 100644 --- a/wizards/source/scriptforge/python/scriptforge.py +++ b/wizards/source/scriptforge/python/scriptforge.py @@ -370,6 +370,15 @@ class ScriptForge(object, metaclass = _Singleton): setattr(cls, cc, func) return + @staticmethod + def unpack_args(kwargs): + """ + Convert a dictioany passed as argument to a list alternating keys and values + Example: + dict(A = 'a', B = 2) => 'A', 'a', 'B', 2 + """ + return [v for p in zip(list(kwargs.keys()), list(kwargs.values())) for v in p] + # ##################################################################################################################### # SFServices CLASS (ScriptForge services superclass) ### @@ -1322,6 +1331,14 @@ class SFScriptForge: def RunApplication(self, command, parameters): return self.ExecMethod(self.vbMethod, 'RunApplication', command, parameters) + def RunCommand(self, command, *args, **kwargs): + params = tuple(list(args) + ScriptForge.unpack_args(kwargs)) + if len(params) == 0: + params = (command,) + (None,) + else: + params = (command,) + params + return self.SIMPLEEXEC('@SF_Session.RunCommand', params) + def SendMail(self, recipient, cc = '', bcc = '', subject = '', body = '', filenames = '', editmessage = True): return self.ExecMethod(self.vbMethod, 'SendMail', recipient, cc, bcc, subject, body, filenames, editmessage) @@ -1786,8 +1803,9 @@ class SFDocuments: def RemoveMenu(self, menuheader): return self.ExecMethod(self.vbMethod, 'RemoveMenu', menuheader) - def RunCommand(self, command): - return self.ExecMethod(self.vbMethod, 'RunCommand', command) + def RunCommand(self, command, *args, **kwargs): + params = tuple([command] + list(args) + ScriptForge.unpack_args(kwargs)) + return self.ExecMethod(self.vbMethod, 'RunCommand', *params) def Save(self): return self.ExecMethod(self.vbMethod, 'Save') diff --git a/wizards/source/sfdocuments/SF_Base.xba b/wizards/source/sfdocuments/SF_Base.xba index 0199341bb5da..8e8dbfb4e27e 100644 --- a/wizards/source/sfdocuments/SF_Base.xba +++ b/wizards/source/sfdocuments/SF_Base.xba @@ -808,8 +808,10 @@ Public Function RemoveMenu(Optional ByVal MenuHeader As Variant) As Boolean End Function ' SFDocuments.SF_Base.RemoveMenu REM ----------------------------------------------------------------------------- -Public Sub RunCommand(Optional ByVal Command As Variant) - [_Super].RunCommand(Command) +Public Sub RunCommand(Optional ByVal Command As Variant _ + , ParamArray Args As Variant _ + ) + [_Super].RunCommand(Command, Args) End Sub ' SFDocuments.SF_Base.RunCommand REM ----------------------------------------------------------------------------- diff --git a/wizards/source/sfdocuments/SF_Calc.xba b/wizards/source/sfdocuments/SF_Calc.xba index f22a64642e36..29b22f4b0ed0 100644 --- a/wizards/source/sfdocuments/SF_Calc.xba +++ b/wizards/source/sfdocuments/SF_Calc.xba @@ -3093,8 +3093,10 @@ Public Function RemoveMenu(Optional ByVal MenuHeader As Variant) As Boolean End Function ' SFDocuments.SF_Calc.RemoveMenu REM ----------------------------------------------------------------------------- -Public Sub RunCommand(Optional ByVal Command As Variant) - [_Super].RunCommand(Command) +Public Sub RunCommand(Optional ByVal Command As Variant _ + , ParamArray Args As Variant _ + ) + [_Super].RunCommand(Command, Args) End Sub ' SFDocuments.SF_Calc.RunCommand REM ----------------------------------------------------------------------------- diff --git a/wizards/source/sfdocuments/SF_Document.xba b/wizards/source/sfdocuments/SF_Document.xba index 37c4e4e6bbe7..9f95470d2903 100644 --- a/wizards/source/sfdocuments/SF_Document.xba +++ b/wizards/source/sfdocuments/SF_Document.xba @@ -813,40 +813,67 @@ Catch: End Function ' SFDocuments.SF_Document.RemoveMenu REM ----------------------------------------------------------------------------- -Public Sub RunCommand(Optional ByVal Command As Variant) -''' Run on the document the given menu command. The command is executed without arguments +Public Sub RunCommand(Optional ByVal Command As Variant _ + , ParamArray Args As Variant _ + ) +''' Run on the current document window the given menu command. The command is executed with or without arguments ''' A few typical commands: ''' Save, SaveAs, ExportToPDF, SetDocumentProperties, Undo, Copy, Paste, ... -''' Dozens can be found in the directory $install/share/config/soffice.cfg/modules +''' Dozens can be found on next page: https://wiki.documentfoundation.org/Development/DispatchCommands ''' Args: ''' Command: Case-sensitive. The command itself is not checked. +''' If the command does not contain the ".uno:" prefix, it is added. ''' If nothing happens, then the command is probably wrong +''' Args: Pairs of arguments name (string), value (any) ''' Returns: ''' Examples: -''' oDoc.RunCommand("About") +''' oDoc.RunCommand("EditDoc", "Editable", False) ' Toggle edit mode +Dim vArgs As Variant ' Alias of Args Dim oDispatch ' com.sun.star.frame.DispatchHelper +Dim vProps As Variant ' Array of PropertyValues +Dim vValue As Variant ' A single value argument +Dim sCommand As String ' Alias of Command +Dim i As Long +Const cstPrefix = ".uno:" + Const cstThisSub = "SFDocuments.Document.RunCommand" -Const cstSubArgs = "Command" +Const cstSubArgs = "Command, [arg0Name, arg0Value], [arg1Name, arg1Value], ..." - If ScriptForge.SF_Utils._ErrorHandling() Then On Local Error GoTo Catch + If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch Check: + ' When called from a subclass (Calc, Writer, ..) the arguments are gathered into one single array item + vArgs = Args + If IsArray(Args) Then + If UBound(Args) >= 0 And IsArray(Args(0)) Then vArgs = Args(0) + End If If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then If Not _IsStillAlive() Then GoTo Finally If Not ScriptForge.SF_Utils._Validate(Command, "Command", V_STRING) Then GoTo Finally + If Not ScriptForge.SF_Utils._ValidateArray(vArgs, "Args", 1) Then GoTo Finally + For i = 0 To UBound(vArgs) - 1 Step 2 + If Not ScriptForge.SF_Utils._Validate(vArgs(i), "Arg" & CStr(i/2) & "Name", V_STRING) Then GoTo Finally + Next i End If Try: + ' Build array of property values + vProps = Array() + For i = 0 To UBound(vArgs) - 1 Step 2 + If IsEmpty(vArgs(i + 1)) Then vValue = Null Else vValue = vArgs(i + 1) + vProps = ScriptForge.SF_Array.Append(vProps, ScriptForge.SF_Utils._MakePropertyValue(vArgs(i), vValue)) + Next i Set oDispatch = ScriptForge.SF_Utils._GetUNOService("DispatchHelper") - oDispatch.executeDispatch(_Frame, ".uno:" & Command, "", 0, Array()) + If ScriptForge.SF_String.StartsWith(Command, cstPrefix) Then sCommand = Command Else sCommand = cstPrefix & Command + oDispatch.executeDispatch(_Frame, sCommand, "", 0, vProps) Finally: ScriptForge.SF_Utils._ExitFunction(cstThisSub) Exit Sub Catch: GoTo Finally -End Sub ' SFDocuments.SF_Document.RunCommand +End Sub ' SFDocuments.SF_Document.RunCommand REM ----------------------------------------------------------------------------- Public Function Save() As Boolean diff --git a/wizards/source/sfdocuments/SF_Form.xba b/wizards/source/sfdocuments/SF_Form.xba index 43e6bb513351..15c3d498e78e 100644 --- a/wizards/source/sfdocuments/SF_Form.xba +++ b/wizards/source/sfdocuments/SF_Form.xba @@ -1531,4 +1531,4 @@ Dim sParent As String ' To recognize the parent End Function ' SFDocuments.SF_Form._Repr REM ============================================ END OF SFDOCUMENTS.SF_FORM -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/sfdocuments/SF_FormControl.xba b/wizards/source/sfdocuments/SF_FormControl.xba index c0db1d6cf92b..a48c22b6c1c5 100644 --- a/wizards/source/sfdocuments/SF_FormControl.xba +++ b/wizards/source/sfdocuments/SF_FormControl.xba @@ -1885,4 +1885,4 @@ Private Function _Repr() As String End Function ' SFDocuments.SF_FormControl._Repr REM ============================================ END OF SFDOCUMENTS.SF_FORMCONTROL -</script:module> +</script:module> \ No newline at end of file diff --git a/wizards/source/sfdocuments/SF_Writer.xba b/wizards/source/sfdocuments/SF_Writer.xba index 96ed289f92ff..9d2234637dd4 100644 --- a/wizards/source/sfdocuments/SF_Writer.xba +++ b/wizards/source/sfdocuments/SF_Writer.xba @@ -518,8 +518,10 @@ Public Function RemoveMenu(Optional ByVal MenuHeader As Variant) As Boolean End Function ' SFDocuments.SF_Writer.RemoveMenu REM ----------------------------------------------------------------------------- -Public Sub RunCommand(Optional ByVal Command As Variant) - [_Super].RunCommand(Command) +Public Sub RunCommand(Optional ByVal Command As Variant _ + , ParamArray Args As Variant _ + ) + [_Super].RunCommand(Command, Args) End Sub ' SFDocuments.SF_Writer.RunCommand REM -----------------------------------------------------------------------------