tdf#141474 tdf#151901 BASIC functions argument names do not match that of VBA
Basic function argument names can be used either by position either by name, keyword arguments ae called 'named arguments' in VBA
- VBA doc:
https://learn.microsoft.com/en-us/office/vba/language/concepts/getting-started/understanding-named-arguments-and-optional-arguments
- libO Basic function signatures:
https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03090401.html?DbPAR=BASIC#bm_id3154422
This patch attempts to correct - all in one - malformed keyword names in BASIC function signatures.
It reflects keyword arguments usage inside QA BASIC unit tests.
In the end Online help pages may incorporate such practice.
Change-Id: Iab0c92b2c152d2564662e51e68f1f736b8deefd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145720
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
diff --git a/basic/qa/basic_coverage/string_left_01.bas b/basic/qa/basic_coverage/string_left_01.bas
deleted file mode 100644
index d2ae7ae..0000000
--- a/basic/qa/basic_coverage/string_left_01.bas
+++ /dev/null
@@ -1,26 +0,0 @@
'
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'
Option Explicit
Function doUnitTest as String
Dim s1 As String
Dim s2 As String
s1 = "abc"
s2 = Left(s1, 2)
If s2 = "ab" Then
doUnitTest = "OK"
Else
doUnitTest = "FAIL"
End If
End Function
diff --git a/basic/qa/basic_coverage/string_right_01.bas b/basic/qa/basic_coverage/string_right_01.bas
deleted file mode 100644
index a291d07..0000000
--- a/basic/qa/basic_coverage/string_right_01.bas
+++ /dev/null
@@ -1,26 +0,0 @@
'
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'
Option Explicit
Function doUnitTest as String
Dim s1 As String
Dim s2 As String
s1 = "abc"
s2 = Right(s1, 2)
If s2 = "bc" Then
doUnitTest = "OK"
Else
doUnitTest = "FAIL"
End If
End Function
diff --git a/basic/qa/basic_coverage/test_join_method.bas b/basic/qa/basic_coverage/test_join_method.bas
index 9076a0f..a3769ae 100644
--- a/basic/qa/basic_coverage/test_join_method.bas
+++ b/basic/qa/basic_coverage/test_join_method.bas
@@ -7,14 +7,28 @@
Option Explicit
Function doUnitTest as String
' Join
Function doUnitTest() As String
TestUtil.TestInit
verify_Join_method
doUnitTest = TestUtil.GetResult()
End Function
Sub verify_Join_method
On Error GoTo errorHandler
' JOIN
Dim aStrings(2) as String
aStrings(0) = "Hello"
aStrings(1) = "world"
If ( Join( aStrings, " " ) <> "Hello world " ) Then
doUnitTest = "FAIL"
Else
doUnitTest = "OK"
End If
End Function
TestUtil.AssertEqual(Join( aStrings, " " ), "Hello world ", "Join(aStrings, "" "" is not ""Hello world """)
' tdf#141474 keyword names need to match that of VBA
Dim aList(0 to 7) As String : aList = Array("(", "Star", "|", "Open", "|", "Libre", ")", "Office")
TestUtil.AssertEqual(Join(sourceArray:=aList), "( Star | Open | Libre ) Office", "Join() with 1 keyword name")
TestUtil.AssertEqual(Join(delimiter:="", sourceArray:=aList), "(Star|Open|Libre)Office", "Join() with 2 keyword names")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_Join_method", Err, Error$, Erl)
End Sub
diff --git a/basic/qa/basic_coverage/test_left_method.bas b/basic/qa/basic_coverage/test_left_method.bas
new file mode 100644
index 0000000..1c33bc9
--- /dev/null
+++ b/basic/qa/basic_coverage/test_left_method.bas
@@ -0,0 +1,28 @@
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'
Option Explicit
Function doUnitTest() As String
TestUtil.TestInit
verify_Left_method
doUnitTest = TestUtil.GetResult()
End Function
Sub verify_Left_method
On Error GoTo errorHandler
' LEFT
TestUtil.AssertEqual(Left("abc", 2), "ab", "Left(""abc"",2)")
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Left(Length:=4, String:="sometext"), "some", "Left(Length:=4, String:=""sometext"")")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_Left_method", Err, Error$, Erl)
End Sub
diff --git a/basic/qa/basic_coverage/test_mid_keyword_names.bas b/basic/qa/basic_coverage/test_mid_keyword_names.bas
new file mode 100644
index 0000000..abe5604
--- /dev/null
+++ b/basic/qa/basic_coverage/test_mid_keyword_names.bas
@@ -0,0 +1,26 @@
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'
Option Explicit
Function doUnitTest() As String
TestUtil.TestInit
verify_Mid_method
doUnitTest = TestUtil.GetResult()
End Function
Sub verify_Mid_method
On Error GoTo errorHandler
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Mid(start:=6, string:="LibreOffice" ), "Office", "Mid() with 2 keyword names" )
TestUtil.AssertEqual(Mid(length:=5, start:=1, string:="LibreOffice" ), "Libre", "Mid() with 3 keyword names" )
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_Mid_method", Err, Error$, Erl)
End Sub
\ No newline at end of file
diff --git a/basic/qa/basic_coverage/test_right_method.bas b/basic/qa/basic_coverage/test_right_method.bas
new file mode 100644
index 0000000..45801d5
--- /dev/null
+++ b/basic/qa/basic_coverage/test_right_method.bas
@@ -0,0 +1,28 @@
' This file is part of the LibreOffice project.
'
' This Source Code Form is subject to the terms of the Mozilla Public
' License, v. 2.0. If a copy of the MPL was not distributed with this
' file, You can obtain one at http://mozilla.org/MPL/2.0/.
'
Option Explicit
Function doUnitTest() As String
TestUtil.TestInit
verify_Right_method
doUnitTest = TestUtil.GetResult()
End Function
Sub verify_Right_method
On Error GoTo errorHandler
' RIGHT
TestUtil.AssertEqual(Right("abc", 2), "bc", "Right(""abc"",2)")
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Right(Length:=4, String:="sometext"), "text", "Right(Length:=4, String:=""sometext"")")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_Right_method", Err, Error$, Erl)
End Sub
diff --git a/basic/qa/basic_coverage/test_split_method.bas b/basic/qa/basic_coverage/test_split_method.bas
index 52ba91f..e53dfd9 100644
--- a/basic/qa/basic_coverage/test_split_method.bas
+++ b/basic/qa/basic_coverage/test_split_method.bas
@@ -53,6 +53,12 @@ Sub verify_testSplit
TestUtil.AssertEqual(VarType(splitArr(i)), 8200, "VarType(splitArr(i))")
Next
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Split(expression:="LibreOffice StarOffice")(1), "StarOffice", "Split with 1 keyword name" )
Dim txt As String : txt = "Libre_Office_Star_Office"
TestUtil.AssertEqual(Split(delimiter:="_", expression:=txt)(2), "Star", "Split with 2 keyword names" )
TestUtil.AssertEqual(Split(limit:=3, delimiter:="_", expression:=txt)(2), "Star_Office", "Split with 3 keyword names" )
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testSplit", Err, Error$, Erl)
diff --git a/basic/qa/basic_coverage/test_string_method.bas b/basic/qa/basic_coverage/test_string_method.bas
index b06726e..39b567a 100644
--- a/basic/qa/basic_coverage/test_string_method.bas
+++ b/basic/qa/basic_coverage/test_string_method.bas
@@ -7,11 +7,25 @@
Option Explicit
Function doUnitTest as String
' STRING
If ( String( 3, "H" ) <> "HHH" ) Then
doUnitTest = "FAIL"
Else
doUnitTest = "OK"
End If
Dim failedAssertion As Boolean, messages As String
Function doUnitTest ' String(Number As Long, Character As String)
assert(String(3, "H")= "HHH", "String(3, ""H"") is not ""HHH""")
assert(String(5.8, "à")= "àààààà", "String(5.8, ""à"") is not ""àààààà""")
assert(String(Number:=3.45, Character:="test")="ttt", "String(Number:=3.45, Character:=""test"") is not ""ttt""")
assert(String(Character:="☺😎", Number:=7)= "☺☺☺☺☺☺☺", "String(Character:=""☺😎"", Number:=7) is not ""☺☺☺☺☺☺☺""")
If FailedAssertion Then
doUnitTest = "test_string_method.vb failed" + messages
Exit Function
EndIf
doUnitTest = "OK" ' All checks passed
End Function
Sub assert(expression As Boolean, errMessage As String)
if ( Not expression ) Then
messages = messages + Chr(10) + ErrMessage
failedAssertion = True
EndIf
End Sub
\ No newline at end of file
diff --git a/basic/qa/basic_coverage/test_typename_method.bas b/basic/qa/basic_coverage/test_typename_method.bas
index 80a9658..028f57f 100644
--- a/basic/qa/basic_coverage/test_typename_method.bas
+++ b/basic/qa/basic_coverage/test_typename_method.bas
@@ -27,6 +27,8 @@ Dim intArray() As Integer, lngArray(5) As Long, sngArray!() As Single, dblArra
Function doUnitTest ' TypeName()
myErr = CVErr(0.56E-41)
assert(TypeName(varName:=int16) = "Integer", "TypeName(varName:=int16) is not ""Integer""")
assert( TypeName(int16) = "Integer" , "TypeName(int16) is not ""Integer""")
assert( TypeName(int32) = "Long" , "TypeName(int32) is not ""Long""")
assert( TypeName(flt32) = "Single" , "TypeName(flt32) is not ""Single""" )
diff --git a/basic/qa/basic_coverage/test_vartype_method.bas b/basic/qa/basic_coverage/test_vartype_method.bas
index 3ab6f1f..1b7372b 100644
--- a/basic/qa/basic_coverage/test_vartype_method.bas
+++ b/basic/qa/basic_coverage/test_vartype_method.bas
@@ -53,6 +53,8 @@ Sub verify_testvartype()
TestUtil.AssertEqual( VarType(Nothing), V_OBJECT, "Vartype(Empty) is not V_OBJECT")
myErr = CVErr("errMsg")
TestUtil.AssertEqual(VarType(varName:=int16), V_INTEGER, "VarType(varName:=int16) is not V_INTEGER")
TestUtil.AssertEqual( VarType(int16), V_INTEGER , "VarType(int16) is not V_INTEGER")
TestUtil.AssertEqual( VarType(int32), V_LONG , "VarType(int32) is not V_LONG")
TestUtil.AssertEqual( VarType(flt32), V_SINGLE , "VarType(flt32) is not V_SINGLE" )
diff --git a/basic/qa/vba_tests/instrrev.vb b/basic/qa/vba_tests/instrrev.vb
index 7d047fc..3849d60 100644
--- a/basic/qa/vba_tests/instrrev.vb
+++ b/basic/qa/vba_tests/instrrev.vb
@@ -37,6 +37,13 @@ Sub verify_testInStrRev()
' This test should fail after tdf#110003 has been fixed.
TestUtil.AssertEqual(InStrRev("Straße", "s", -1, 1), 5, "InStrRev(""Straße"", ""s"", -1, 1)")
' tdf#141474 keyword names need to match that of VBA
Const vbBinaryCompare = 0, vbTextCompare = 1
TestUtil.AssertEqual(InStrRev(stringMatch:="Star", stringCheck:="LibreOffice"), 0, "InStrRev(stringMatch:=""Star"", stringCheck:=""LibreOffice"")")
TestUtil.AssertEqual(InStrRev(Start:=-1, stringMatch:="Libre", stringCheck:="LibreOfficeLibre"), 12, "InStrRev(Start:=-1, stringMatch:=""Libre"", stringCheck:=""LibreOfficeLibre"")")
TestUtil.AssertEqual(InStrRev(Start:=12, stringMatch:="Libre", stringCheck:="LibreOfficeLibre"), 1, "InStrRev(Start:=12, stringMatch:=""Libre"", stringCheck:=""LibreOfficeLibre"")")
TestUtil.AssertEqual(InStrRev(Compare:=vbBinaryCompare, Start:=12, stringMatch:="Libre", stringCheck:="LibreOfficeLibre"), 1, "InStrRev(Compare:=vbBinaryCompare, Start:=12, stringMatch:=""Libre"", stringCheck:=""LibreOfficeLibre"")")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testInStrRev", Err, Error$, Erl)
diff --git a/basic/qa/vba_tests/join.vb b/basic/qa/vba_tests/join.vb
index c4f568f..8d6dd46 100644
--- a/basic/qa/vba_tests/join.vb
+++ b/basic/qa/vba_tests/join.vb
@@ -27,6 +27,11 @@ Sub verify_testJoin()
TestUtil.AssertEqual(Join(vaArray, "<>"), "string1<>string2<>string3", "Join(vaArray, ""<>"")")
TestUtil.AssertEqual(Join(vaArray, ""), "string1string2string3", "Join(vaArray, """")")
' tdf#141474 keyword names need to match that of VBA
Dim aList(0 to 7) As String : aList = Array("(", "Star", "|", "Open", "|", "Libre", ")", "Office")
TestUtil.AssertEqual(Join(sourceArray:=aList), "( Star | Open | Libre ) Office", "Join() with 1 keyword name")
TestUtil.AssertEqual(Join(delimiter:="", sourceArray:=aList), "(Star|Open|Libre)Office", "Join() with 2 keyword names")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testJoin", Err, Error$, Erl)
diff --git a/basic/qa/vba_tests/left.vb b/basic/qa/vba_tests/left.vb
index 047497e..21ce3ce 100644
--- a/basic/qa/vba_tests/left.vb
+++ b/basic/qa/vba_tests/left.vb
@@ -22,6 +22,9 @@ Sub verify_testLeft()
TestUtil.AssertEqual(Left("sometext", 48), "sometext", "Left(""sometext"", 48)")
TestUtil.AssertEqual(Left("", 4), "", "Left("""", 4)")
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Left(Length:=4, String:="sometext"), "some", "Left(Length:=4, String:=""sometext"")")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testLeft", Err, Error$, Erl)
diff --git a/basic/qa/vba_tests/mid.vb b/basic/qa/vba_tests/mid.vb
index 863e247..ebd3261 100644
--- a/basic/qa/vba_tests/mid.vb
+++ b/basic/qa/vba_tests/mid.vb
@@ -22,6 +22,10 @@ Sub verify_testMid()
TestUtil.AssertEqual(Mid("Mid Function Demo", 14, 4), "Demo", "Mid(""Mid Function Demo"", 14, 4)")
TestUtil.AssertEqual(Mid("Mid Function Demo", 5), "Function Demo", "Mid(""Mid Function Demo"", 5)")
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Mid(start:=6, string:="LibreOffice" ), "Office", "Mid() with 2 keyword names" )
TestUtil.AssertEqual(Mid(length:=5, start:=1, string:="LibreOffice" ), "Libre", "Mid() with 3 keyword names" )
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testMid", Err, Error$, Erl)
diff --git a/basic/qa/vba_tests/right.vb b/basic/qa/vba_tests/right.vb
index c7cb583..742fc43 100644
--- a/basic/qa/vba_tests/right.vb
+++ b/basic/qa/vba_tests/right.vb
@@ -22,6 +22,9 @@ Sub verify_testRight()
TestUtil.AssertEqual(Right("sometext", 48), "sometext", "Right(""sometext"", 48)")
TestUtil.AssertEqual(Right("", 4), "", "Right("""", 4)")
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Right(Length:=4, String:="sometext"), "text", "Right(Length:=4, String:=""sometext"")")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testRight", Err, Error$, Erl)
diff --git a/basic/qa/vba_tests/split.vb b/basic/qa/vba_tests/split.vb
index 56d4522..13f4d66 100644
--- a/basic/qa/vba_tests/split.vb
+++ b/basic/qa/vba_tests/split.vb
@@ -51,6 +51,12 @@ Sub verify_testSplit
' - Actual : 8200 (8192 for Array and 8 for String)
TestUtil.AssertEqual(VarType(splitArr(0)), 8, "VarType(splitArr(0))")
' tdf#141474 keyword names need to match that of VBA
TestUtil.AssertEqual(Split(expression:="LibreOffice StarOffice")(1), "StarOffice", "Split with 1 keyword name" )
Dim txt As String : txt = "Libre_Office_Star_Office"
TestUtil.AssertEqual(Split(delimiter:="_", expression:=txt)(2), "Star", "Split with 2 keyword names" )
TestUtil.AssertEqual(Split(limit:=3, delimiter:="_", expression:=txt)(2), "Star_Office", "Split with 3 keyword names" )
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testSplit", Err, Error$, Erl)
diff --git a/basic/qa/vba_tests/string.vb b/basic/qa/vba_tests/string.vb
index eca3fce..239141d 100644
--- a/basic/qa/vba_tests/string.vb
+++ b/basic/qa/vba_tests/string.vb
@@ -11,18 +11,22 @@ Option Explicit
Function doUnitTest() As String
TestUtil.TestInit
verify_testString
verify_String
doUnitTest = TestUtil.GetResult()
End Function
Sub verify_testString()
Sub verify_String()
On Error GoTo errorHandler
TestUtil.AssertEqual(String(5, "P"), "PPPPP", "String(5, ""P"")")
TestUtil.AssertEqual(String(5, "a"), "aaaaa", "String(5, ""a"")")
TestUtil.AssertEqual(String(0, "P"), "", "String(0, ""P"")")
TestUtil.AssertEqual(String(5.8, "à"), "àààààà", "String(5.8, ""à"")")
TestUtil.AssertEqual(String(Number:=3.45, Character:="test"), "ttt", "String(Number:=3.45, Character:=""test"")")
TestUtil.AssertEqual(String(Character:="☺😎", Number:=7), "☺☺☺☺☺☺☺", "String(Character:=""☺😎"", Number:=7)")
Exit Sub
errorHandler:
TestUtil.ReportErrorHandler("verify_testString", Err, Error$, Erl)
TestUtil.ReportErrorHandler("verify_String", Err, Error$, Erl)
End Sub
diff --git a/basic/qa/vba_tests/typename.vb b/basic/qa/vba_tests/typename.vb
index 98bfd58..b21d34c 100644
--- a/basic/qa/vba_tests/typename.vb
+++ b/basic/qa/vba_tests/typename.vb
@@ -32,6 +32,8 @@ Sub verify_testTypeName()
Dim TestCurrSign@
Dim TestStrSign$
TestUtil.AssertEqual(TypeName(varname:=s1), "String", "TypeName(varname:=s1")
TestUtil.AssertEqual(TypeName(s1), "String", "TypeName(s1)")
TestUtil.AssertEqual(TypeName(b1), "Boolean", "TypeName(b1)")
TestUtil.AssertEqual(TypeName(c1), "Byte", "TypeName(c1)")
diff --git a/basic/qa/vba_tests/vartype.vb b/basic/qa/vba_tests/vartype.vb
index 2d8345ed..066255b 100644
--- a/basic/qa/vba_tests/vartype.vb
+++ b/basic/qa/vba_tests/vartype.vb
@@ -42,6 +42,8 @@ Sub verify_testVarType()
TestUtil.AssertEqual(vbString, 8, "vbString")
TestUtil.AssertEqual(vbBoolean, 11, "vbBoolean")
TestUtil.AssertEqual(VarType(varname:=TestStr), vbString, "VarType(varname:=TestStr)")
TestUtil.AssertEqual(VarType(TestStr), vbString, "VarType(TestStr)")
TestUtil.AssertEqual(VarType(TestBoo), vbBoolean, "VarType(TestBoo)")
TestUtil.AssertEqual(VarType(TestDouble), vbDouble, "VarType(TestDouble)")
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index a89fdeb..97e9cee 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -328,8 +328,8 @@ constexpr Method aMethods[] = {
{ u"Ddeterminateall", SbxNULL, FUNCTION_, SbRtl_DDETerminateAll },
{ u"DimArray", SbxOBJECT, FUNCTION_, SbRtl_DimArray },
{ u"Dir", SbxSTRING, 2 | FUNCTION_, SbRtl_Dir },
arg(u"FileSpec", SbxSTRING, OPT_),
arg(u"attrmask", SbxINTEGER, OPT_),
arg(u"Pathname", SbxSTRING, OPT_),
arg(u"Attributes", SbxINTEGER, OPT_),
{ u"DoEvents", SbxINTEGER, FUNCTION_, SbRtl_DoEvents },
{ u"DumpAllObjects", SbxEMPTY, 2 | SUB_, SbRtl_DumpAllObjects },
@@ -487,10 +487,10 @@ constexpr Method aMethods[] = {
arg(u"Compare", SbxINTEGER, OPT_),
{ u"InStrRev", SbxLONG, 4 | FUNCTION_ | COMPATONLY_, SbRtl_InStrRev },
arg(u"String1", SbxSTRING),
arg(u"String2", SbxSTRING),
arg(u"Start", SbxSTRING, OPT_),
arg(u"Compare", SbxINTEGER, OPT_),
arg(u"StringCheck", SbxSTRING),
arg(u"StringMatch", SbxSTRING),
arg(u"Start", SbxSTRING, OPT_),
arg(u"Compare", SbxINTEGER, OPT_),
{ u"Int", SbxDOUBLE, 1 | FUNCTION_, SbRtl_Int },
arg(u"number", SbxDOUBLE),
@@ -535,8 +535,8 @@ constexpr Method aMethods[] = {
arg(u"Variant", SbxVARIANT),
{ u"Join", SbxSTRING, 2 | FUNCTION_, SbRtl_Join },
arg(u"list", SbxOBJECT),
arg(u"delimiter", SbxSTRING),
arg(u"SourceArray", SbxOBJECT),
arg(u"Delimiter", SbxSTRING),
{ u"Kill", SbxNULL, 1 | FUNCTION_, SbRtl_Kill },
arg(u"filespec", SbxSTRING),
@@ -549,7 +549,7 @@ constexpr Method aMethods[] = {
{ u"Left", SbxSTRING, 2 | FUNCTION_, SbRtl_Left },
arg(u"String", SbxSTRING),
arg(u"Count", SbxLONG),
arg(u"Length", SbxLONG),
{ u"Len", SbxLONG, 1 | FUNCTION_, SbRtl_Len },
arg(u"StringOrVariant", SbxVARIANT),
@@ -593,9 +593,9 @@ constexpr Method aMethods[] = {
{ u"Me", SbxOBJECT, 0 | FUNCTION_ | COMPATONLY_, SbRtl_Me },
{ u"Mid", SbxSTRING, 3 | LFUNCTION_, SbRtl_Mid },
arg(u"String", SbxSTRING),
arg(u"StartPos", SbxLONG),
arg(u"Length", SbxLONG, OPT_),
arg(u"String", SbxSTRING),
arg(u"Start", SbxLONG),
arg(u"Length", SbxLONG, OPT_),
{ u"Minute", SbxINTEGER, 1 | FUNCTION_, SbRtl_Minute },
arg(u"Date", SbxDATE),
@@ -711,7 +711,7 @@ constexpr Method aMethods[] = {
{ u"Right", SbxSTRING, 2 | FUNCTION_, SbRtl_Right },
arg(u"String", SbxSTRING),
arg(u"Count", SbxLONG),
arg(u"Length", SbxLONG),
{ u"RmDir", SbxNULL, 1 | FUNCTION_, SbRtl_RmDir },
arg(u"pathname", SbxSTRING),
@@ -742,7 +742,7 @@ constexpr Method aMethods[] = {
arg(u"Wait", SbxBOOL, OPT_),
{ u"SetAttr", SbxNULL, 2 | FUNCTION_, SbRtl_SetAttr },
arg(u"File", SbxSTRING),
arg(u"PathName", SbxSTRING),
arg(u"Attributes", SbxINTEGER),
{ u"SET_OFF", SbxINTEGER, CPROP_, SbRtl_SET_OFF },
@@ -752,8 +752,8 @@ constexpr Method aMethods[] = {
arg(u"number", SbxDOUBLE),
{ u"Shell", SbxLONG, 2 | FUNCTION_, SbRtl_Shell },
arg(u"Commandstring", SbxSTRING),
arg(u"WindowStyle", SbxINTEGER, OPT_),
arg(u"PathName", SbxSTRING),
arg(u"WindowStyle", SbxINTEGER, OPT_),
{ u"Sin", SbxDOUBLE, 1 | FUNCTION_, SbRtl_Sin },
arg(u"number", SbxDOUBLE),
@@ -778,7 +778,7 @@ constexpr Method aMethods[] = {
{ u"Split", SbxOBJECT, 3 | FUNCTION_, SbRtl_Split },
arg(u"expression", SbxSTRING),
arg(u"delimiter", SbxSTRING),
arg(u"count", SbxLONG),
arg(u"Limit", SbxLONG),
{ u"Sqr", SbxDOUBLE, 1 | FUNCTION_, SbRtl_Sqr },
arg(u"number", SbxDOUBLE),
@@ -797,8 +797,8 @@ constexpr Method aMethods[] = {
arg(u"LCID", SbxINTEGER, OPT_),
{ u"String", SbxSTRING, 2 | FUNCTION_, SbRtl_String },
arg(u"Count", SbxLONG),
arg(u"Filler", SbxVARIANT),
arg(u"Number", SbxLONG),
arg(u"Character", SbxVARIANT),
{ u"StrReverse", SbxSTRING, 1 | FUNCTION_ | COMPATONLY_, SbRtl_StrReverse },
arg(u"String1", SbxSTRING),
@@ -875,7 +875,7 @@ constexpr Method aMethods[] = {
arg(u"Var", SbxVARIANT),
{ u"TypeName", SbxSTRING, 1 | FUNCTION_, SbRtl_TypeName },
arg(u"Var", SbxVARIANT),
arg(u"Varname", SbxVARIANT),
{ u"UBound", SbxLONG, 1 | FUNCTION_, SbRtl_UBound },
arg(u"Var", SbxVARIANT),
@@ -890,7 +890,7 @@ constexpr Method aMethods[] = {
arg(u"String", SbxSTRING),
{ u"VarType", SbxINTEGER, 1 | FUNCTION_, SbRtl_VarType },
arg(u"Var", SbxVARIANT),
arg(u"Varname", SbxVARIANT),
{ u"V_EMPTY", SbxINTEGER, CPROP_, SbRtl_V_EMPTY },
{ u"V_NULL", SbxINTEGER, CPROP_, SbRtl_V_NULL },