[Libreoffice-commits] core.git: basic/source include/basic

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 23 14:43:32 UTC 2020


 basic/source/classes/sb.cxx     |   23 
 basic/source/inc/sbunoobj.hxx   |    2 
 basic/source/runtime/stdobj.cxx | 1521 ++++++++++++++++++++++------------------
 basic/source/sbx/sbxvar.cxx     |   23 
 include/basic/sbxvar.hxx        |   17 
 5 files changed, 882 insertions(+), 704 deletions(-)

New commits:
commit f7de7de1189ae4e63f73468076da47b37fe61ede
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Dec 22 21:42:49 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Dec 23 15:42:46 2020 +0100

    Initialize method mapping table at compile time
    
    This removes the need to calculate hashes for the table at runtime.
    Also this introduces a static assertion to make sure that the table
    has correct structure, and fixes some methods that had wrong argument
    counts:
    
    CreateUnoListener: 1 -> 2
    MIRR:              2 -> 3
    SLN:               2 -> 3
    SYD:               2 -> 4
    
    Changes in basic/source/classes/sb.cxx are related to the change of
    SbxVariable::MakeHashCode into constexpr function taking string view.
    
    Change-Id: I2fec4994e976f36c4b647c30b51a9e879a815775
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108220
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index f8426f4e1a7f..2fda33fffebf 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1925,11 +1925,14 @@ void StarBASIC::DetachAllDocBasicItems()
 // #118116 Implementation Collection object
 
 
-const char pCountStr[]   = "Count";
-const char pAddStr[]     = "Add";
-const char pItemStr[]    = "Item";
-const char pRemoveStr[]  = "Remove";
-static sal_uInt16 nCountHash = 0, nAddHash, nItemHash, nRemoveHash;
+constexpr OUStringLiteral pCountStr = u"Count";
+constexpr OUStringLiteral pAddStr = u"Add";
+constexpr OUStringLiteral pItemStr = u"Item";
+constexpr OUStringLiteral pRemoveStr = u"Remove";
+constexpr sal_uInt16 nCountHash = SbxVariable::MakeHashCode(pCountStr);
+constexpr sal_uInt16 nAddHash = SbxVariable::MakeHashCode(pAddStr);
+constexpr sal_uInt16 nItemHash = SbxVariable::MakeHashCode(pItemStr);
+constexpr sal_uInt16 nRemoveHash = SbxVariable::MakeHashCode(pRemoveStr);
 
 SbxInfoRef BasicCollection::xAddInfo;
 SbxInfoRef BasicCollection::xItemInfo;
@@ -1937,15 +1940,7 @@ SbxInfoRef BasicCollection::xItemInfo;
 BasicCollection::BasicCollection( const OUString& rClass )
              : SbxObject( rClass )
 {
-    if( !nCountHash )
-    {
-        nCountHash  = MakeHashCode( pCountStr );
-        nAddHash    = MakeHashCode( pAddStr );
-        nItemHash   = MakeHashCode( pItemStr );
-        nRemoveHash = MakeHashCode( pRemoveStr );
-    }
     Initialize();
-
 }
 
 BasicCollection::~BasicCollection()
@@ -2059,7 +2054,7 @@ sal_Int32 BasicCollection::implGetIndex( SbxVariable const * pIndexVar )
     return nIndex;
 }
 
-sal_Int32 BasicCollection::implGetIndexForName( const OUString& rName )
+sal_Int32 BasicCollection::implGetIndexForName(std::u16string_view rName)
 {
     sal_Int32 nIndex = -1;
     sal_Int32 nCount = xItemArray->Count32();
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index d2458ef6b86b..6476c3f65c01 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -350,7 +350,7 @@ class BasicCollection : public SbxObject
     virtual ~BasicCollection() override;
     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
     sal_Int32 implGetIndex( SbxVariable const * pIndexVar );
-    sal_Int32 implGetIndexForName( const OUString& rName );
+    sal_Int32 implGetIndexForName(std::u16string_view rName);
     void CollAdd( SbxArray* pPar_ );
     void CollItem( SbxArray* pPar_ );
     void CollRemove( SbxArray* pPar_ );
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 18f8f255d4d2..3b835a921be0 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -57,676 +57,869 @@
 
 namespace {
 
-struct Methods {
-    const char* pName;
+struct Method {
+    std::u16string_view sName;
     SbxDataType eType;
     short       nArgs;
     RtlCall     pFunc;
     sal_uInt16      nHash;
+    constexpr Method(std::u16string_view name, SbxDataType type, short args, RtlCall func)
+        : sName(name)
+        , eType(type)
+        , nArgs(args)
+        , pFunc(func)
+        , nHash(SbxVariable::MakeHashCode(name))
+    {
+    }
 };
 
+constexpr Method arg(std::u16string_view name, SbxDataType type, short args = 0)
+{
+    return Method(name, type, args, nullptr);
 }
 
-static Methods aMethods[] = {
-
-{ "Abs",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Abs,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "Array",          SbxOBJECT,        FUNCTION_, SbRtl_Array,0           },
-{ "Asc",            SbxLONG,      1 | FUNCTION_, SbRtl_Asc,0             },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "AscW",           SbxLONG,      1 | FUNCTION_ | COMPATONLY_, SbRtl_Asc,0},
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "Atn",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Atn,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "ATTR_ARCHIVE",   SbxINTEGER,       CPROP_,    SbRtl_ATTR_ARCHIVE,0    },
-{ "ATTR_DIRECTORY", SbxINTEGER,       CPROP_,    SbRtl_ATTR_DIRECTORY,0  },
-{ "ATTR_HIDDEN",    SbxINTEGER,       CPROP_,    SbRtl_ATTR_HIDDEN,0     },
-{ "ATTR_NORMAL",    SbxINTEGER,       CPROP_,    SbRtl_ATTR_NORMAL,0     },
-{ "ATTR_READONLY",  SbxINTEGER,       CPROP_,    SbRtl_ATTR_READONLY,0   },
-{ "ATTR_SYSTEM",    SbxINTEGER,       CPROP_,    SbRtl_ATTR_SYSTEM,0     },
-{ "ATTR_VOLUME",    SbxINTEGER,       CPROP_,    SbRtl_ATTR_VOLUME,0     },
-
-{ "Beep",           SbxNULL,          FUNCTION_, SbRtl_Beep,0            },
-{ "Blue",        SbxINTEGER,   1 | FUNCTION_ | NORMONLY_, SbRtl_Blue,0               },
-  { "RGB-Value",     SbxLONG, 0,nullptr,0 },
-
-{ "CallByName",     SbxVARIANT,   3 | FUNCTION_, SbRtl_CallByName,0 },
-  { "Object",       SbxOBJECT,  0,nullptr,0 },
-  { "ProcedureName",SbxSTRING,  0,nullptr,0 },
-  { "CallType",     SbxINTEGER, 0,nullptr,0 },
-{ "CBool",          SbxBOOL,      1 | FUNCTION_, SbRtl_CBool,0           },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CByte",          SbxBYTE,      1 | FUNCTION_, SbRtl_CByte,0           },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CCur",           SbxCURRENCY,  1 | FUNCTION_, SbRtl_CCur,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CDate",          SbxDATE,      1 | FUNCTION_, SbRtl_CDate,0           },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CDateFromUnoDate",   SbxDATE,      1 | FUNCTION_, SbRtl_CDateFromUnoDate,0    },
-  { "UnoDate",      SbxOBJECT, 0,nullptr,0 },
-{ "CDateToUnoDate", SbxOBJECT,    1 | FUNCTION_, SbRtl_CDateToUnoDate,0      },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "CDateFromUnoTime",   SbxDATE,      1 | FUNCTION_, SbRtl_CDateFromUnoTime,0    },
-  { "UnoTime",      SbxOBJECT, 0,nullptr,0 },
-{ "CDateToUnoTime", SbxOBJECT,    1 | FUNCTION_, SbRtl_CDateToUnoTime,0      },
-  { "Time",         SbxDATE, 0,nullptr,0 },
-{ "CDateFromUnoDateTime",   SbxDATE,      1 | FUNCTION_, SbRtl_CDateFromUnoDateTime,0    },
-  { "UnoDateTime",      SbxOBJECT, 0,nullptr,0 },
-{ "CDateToUnoDateTime", SbxOBJECT,    1 | FUNCTION_, SbRtl_CDateToUnoDateTime,0      },
-  { "DateTime",         SbxDATE, 0,nullptr,0 },
-{ "CDateFromIso",   SbxDATE,      1 | FUNCTION_, SbRtl_CDateFromIso,0    },
-  { "IsoDate",      SbxSTRING, 0,nullptr,0 },
-{ "CDateToIso",     SbxSTRING,    1 | FUNCTION_, SbRtl_CDateToIso,0      },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "CDec",           SbxDECIMAL,   1 | FUNCTION_, SbRtl_CDec,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CDbl",           SbxDOUBLE,    1 | FUNCTION_, SbRtl_CDbl,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CF_BITMAP",      SbxINTEGER,       CPROP_,    SbRtl_CF_BITMAP,0       },
-{ "CF_METAFILEPICT",SbxINTEGER,       CPROP_,    SbRtl_CF_METAFILEPICT,0 },
-{ "CF_TEXT",        SbxINTEGER,       CPROP_,    SbRtl_CF_TEXT,0         },
-{ "ChDir",          SbxNULL,      1 | FUNCTION_, SbRtl_ChDir,0           },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "ChDrive",        SbxNULL,      1 | FUNCTION_, SbRtl_ChDrive,0         },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-
-{ "Choose",         SbxVARIANT,   2 | FUNCTION_, SbRtl_Choose,0          },
-  { "Index",        SbxINTEGER, 0,nullptr,0 },
-  { "Expression",   SbxVARIANT, 0,nullptr,0 },
-
-{ "Chr",            SbxSTRING,    1 | FUNCTION_, SbRtl_Chr,0             },
-  { "string",       SbxINTEGER, 0,nullptr,0 },
-{ "ChrW",           SbxSTRING,    1 | FUNCTION_ | COMPATONLY_, SbRtl_ChrW,0},
-  { "string",       SbxINTEGER, 0,nullptr,0 },
-
-{ "CInt",           SbxINTEGER,   1 | FUNCTION_, SbRtl_CInt,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CLEAR_ALLTABS",  SbxINTEGER,       CPROP_,    SbRtl_CLEAR_ALLTABS,0   },
-{ "CLEAR_TAB",      SbxINTEGER,       CPROP_,    SbRtl_CLEAR_TAB,0       },
-{ "CLng",           SbxLONG,      1 | FUNCTION_, SbRtl_CLng,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CompatibilityMode",  SbxBOOL,  1 | FUNCTION_, SbRtl_CompatibilityMode,0},
-  { "bEnable",      SbxBOOL, 0,nullptr,0 },
-{ "ConvertFromUrl", SbxSTRING,    1 | FUNCTION_, SbRtl_ConvertFromUrl,0  },
-  { "Url",          SbxSTRING, 0,nullptr,0 },
-{ "ConvertToUrl",   SbxSTRING,    1 | FUNCTION_, SbRtl_ConvertToUrl,0    },
-  { "SystemPath",   SbxSTRING, 0,nullptr,0 },
-{ "Cos",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Cos,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "CreateObject",   SbxOBJECT,    1 | FUNCTION_, SbRtl_CreateObject,0  },
-  { "class",        SbxSTRING, 0,nullptr,0 },
-{ "CreateUnoListener",SbxOBJECT,   1 | FUNCTION_, SbRtl_CreateUnoListener,0 },
-  { "prefix",  SbxSTRING, 0,nullptr,0 },
-  { "typename",  SbxSTRING, 0,nullptr,0 },
-{ "CreateUnoDialog",SbxOBJECT,    2 | FUNCTION_, SbRtl_CreateUnoDialog,0 },
-  { "dialoglibrary",SbxOBJECT, 0,nullptr,0 },
-  { "dialogname",   SbxSTRING, 0,nullptr,0 },
-{ "CreateUnoService",SbxOBJECT,   1 | FUNCTION_, SbRtl_CreateUnoService,0 },
-  { "servicename",  SbxSTRING, 0,nullptr,0 },
-{ "CreateUnoServiceWithArguments",SbxOBJECT,   2 | FUNCTION_, SbRtl_CreateUnoServiceWithArguments,0 },
-  { "servicename",  SbxSTRING, 0,nullptr,0 },
-  { "arguments",  SbxARRAY, 0,nullptr,0 },
-{ "CreateUnoStruct",SbxOBJECT,    1 | FUNCTION_, SbRtl_CreateUnoStruct,0 },
-  { "classname",    SbxSTRING, 0,nullptr,0 },
-{ "CreateUnoValue", SbxOBJECT,    2 | FUNCTION_, SbRtl_CreateUnoValue,0 },
-  { "type",         SbxSTRING, 0,nullptr,0 },
-  { "value",        SbxVARIANT, 0,nullptr,0 },
-{ "CreatePropertySet",SbxOBJECT, 1 | FUNCTION_, SbRtl_CreatePropertySet,0 },
-  { "values",  SbxARRAY, 0,nullptr,0 },
-{ "CSng",           SbxSINGLE,    1 | FUNCTION_, SbRtl_CSng,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CStr",           SbxSTRING,    1 | FUNCTION_, SbRtl_CStr,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CurDir",         SbxSTRING,    1 | FUNCTION_, SbRtl_CurDir,0          },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "CVar",           SbxVARIANT,   1 | FUNCTION_, SbRtl_CVar,0            },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "CVErr",          SbxVARIANT,   1 | FUNCTION_, SbRtl_CVErr,0           },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-{ "DDB",      SbxDOUBLE,      5 | FUNCTION_ | COMPATONLY_, SbRtl_DDB,0       },
-  { "Cost",       SbxDOUBLE,  0, nullptr,0 },
-  { "Salvage",       SbxDOUBLE,  0, nullptr,0 },
-  { "Life",       SbxDOUBLE,  0, nullptr,0 },
-  { "Period",       SbxDOUBLE,  0, nullptr,0 },
-  { "Factor",     SbxVARIANT,  OPT_, nullptr,0 },
-{ "Date",           SbxDATE,          LFUNCTION_,SbRtl_Date,0            },
-{ "DateAdd",        SbxDATE,      3 | FUNCTION_, SbRtl_DateAdd,0         },
-  { "Interval",     SbxSTRING, 0,nullptr,0 },
-  { "Number",       SbxLONG, 0,nullptr,0 },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "DateDiff",       SbxDOUBLE,    5 | FUNCTION_, SbRtl_DateDiff,0        },
-  { "Interval",     SbxSTRING, 0,nullptr,0 },
-  { "Date1",        SbxDATE, 0,nullptr,0 },
-  { "Date2",        SbxDATE, 0,nullptr,0 },
-  { "Firstdayofweek" , SbxINTEGER, OPT_,nullptr,0 },
-  { "Firstweekofyear", SbxINTEGER, OPT_,nullptr,0 },
-{ "DatePart",       SbxLONG,      4 | FUNCTION_, SbRtl_DatePart,0        },
-  { "Interval",     SbxSTRING, 0,nullptr,0 },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-  { "Firstdayofweek" , SbxINTEGER, OPT_, nullptr,0 },
-  { "Firstweekofyear", SbxINTEGER, OPT_, nullptr,0 },
-{ "DateSerial",     SbxDATE,      3 | FUNCTION_, SbRtl_DateSerial,0      },
-  { "Year",         SbxINTEGER, 0,nullptr,0 },
-  { "Month",        SbxINTEGER, 0,nullptr,0 },
-  { "Day",          SbxINTEGER, 0,nullptr,0 },
-{ "DateValue",      SbxDATE,      1 | FUNCTION_, SbRtl_DateValue,0       },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-{ "Day",            SbxINTEGER,   1 | FUNCTION_, SbRtl_Day,0             },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "Ddeexecute",     SbxNULL,   2 | FUNCTION_, SbRtl_DDEExecute,0         },
-  { "Channel",         SbxLONG, 0,nullptr,0 },
-  { "Command",         SbxSTRING, 0,nullptr,0 },
-{ "Ddeinitiate",    SbxINTEGER,   2 | FUNCTION_, SbRtl_DDEInitiate,0     },
-  { "Application",     SbxSTRING, 0,nullptr,0 },
-  { "Topic",           SbxSTRING, 0,nullptr,0 },
-{ "Ddepoke",        SbxNULL,   3 | FUNCTION_, SbRtl_DDEPoke,0            },
-  { "Channel",         SbxLONG, 0,nullptr,0 },
-  { "Item",            SbxSTRING, 0,nullptr,0 },
-  { "Data",            SbxSTRING, 0,nullptr,0 },
-{ "Dderequest",     SbxSTRING,   2 | FUNCTION_, SbRtl_DDERequest,0       },
-  { "Channel",         SbxLONG, 0,nullptr,0 },
-  { "Item",            SbxSTRING, 0,nullptr,0 },
-{ "Ddeterminate",   SbxNULL,   1 | FUNCTION_, SbRtl_DDETerminate,0       },
-  { "Channel",         SbxLONG, 0,nullptr,0 },
-{ "Ddeterminateall",   SbxNULL,   FUNCTION_, SbRtl_DDETerminateAll,0     },
-{ "DimArray",       SbxOBJECT,    FUNCTION_, SbRtl_DimArray,0            },
-{ "Dir",            SbxSTRING,    2 | FUNCTION_, SbRtl_Dir,0             },
-  { "FileSpec",     SbxSTRING,        OPT_, nullptr,0 },
-  { "attrmask",     SbxINTEGER,       OPT_, nullptr,0 },
-{ "DoEvents",       SbxINTEGER,     FUNCTION_, SbRtl_DoEvents,0          },
-{ "DumpAllObjects", SbxEMPTY,     2 | SUB_, SbRtl_DumpAllObjects,0       },
-  { "FileSpec",     SbxSTRING, 0,nullptr,0 },
-  { "DumpAll",      SbxINTEGER,       OPT_, nullptr,0 },
-
-{ "Empty",        SbxVARIANT,        CPROP_,    SbRtl_Empty,0         },
-{ "EqualUnoObjects",SbxBOOL,      2 | FUNCTION_, SbRtl_EqualUnoObjects,0 },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "EnableReschedule",   SbxNULL,  1 | FUNCTION_, SbRtl_EnableReschedule,0},
-  { "bEnable",      SbxBOOL, 0,nullptr,0 },
-{ "Environ",            SbxSTRING,   1 | FUNCTION_, SbRtl_Environ,0      },
-  { "Environmentstring",SbxSTRING, 0,nullptr,0 },
-{ "EOF",            SbxBOOL,      1 | FUNCTION_, SbRtl_EOF,0             },
-  { "Channel",      SbxINTEGER, 0,nullptr,0 },
-{ "Erl",            SbxLONG,          ROPROP_,   SbRtl_Erl,0           },
-{ "Err",            SbxVARIANT,       RWPROP_,   SbRtl_Err,0           },
-{ "Error",          SbxSTRING,    1 | FUNCTION_, SbRtl_Error,0         },
-  { "code",         SbxLONG, 0,nullptr,0 },
-{ "Exp",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Exp,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-
-{ "False",          SbxBOOL,          CPROP_,    SbRtl_False,0           },
-{ "FileAttr",       SbxINTEGER,   2 | FUNCTION_, SbRtl_FileAttr,0        },
-  { "Channel",      SbxINTEGER, 0,nullptr,0 },
-  { "Attributes",   SbxINTEGER, 0,nullptr,0 },
-{ "FileCopy",       SbxNULL,      2 | FUNCTION_, SbRtl_FileCopy,0        },
-  { "Source",       SbxSTRING, 0,nullptr,0 },
-  { "Destination",  SbxSTRING, 0,nullptr,0 },
-{ "FileDateTime",   SbxSTRING,    1 | FUNCTION_, SbRtl_FileDateTime,0    },
-  { "filename",     SbxSTRING, 0,nullptr,0 },
-{ "FileExists",     SbxBOOL,   1 | FUNCTION_, SbRtl_FileExists,0         },
-  { "filename",     SbxSTRING, 0,nullptr,0 },
-{ "FileLen",        SbxLONG,      1 | FUNCTION_, SbRtl_FileLen,0         },
-  { "filename",     SbxSTRING, 0,nullptr,0 },
-{ "FindObject",     SbxOBJECT,    1 | FUNCTION_, SbRtl_FindObject,0      },
-  { "Name",  SbxSTRING, 0,nullptr,0 },
-{ "FindPropertyObject",   SbxOBJECT,      2 | FUNCTION_, SbRtl_FindPropertyObject,0 },
-  { "Object",       SbxOBJECT, 0,nullptr,0 },
-  { "Name",  SbxSTRING, 0,nullptr,0 },
-{ "Fix",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Fix,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "Format",         SbxSTRING,    2 | FUNCTION_, SbRtl_Format,0          },
-  { "expression",   SbxVARIANT, 0,nullptr,0 },
-  { "format",       SbxSTRING,        OPT_, nullptr,0 },
-{ "FormatDateTime", SbxSTRING,    2 | FUNCTION_ | COMPATONLY_, SbRtl_FormatDateTime,0 },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-  { "NamedFormat",  SbxINTEGER,        OPT_, nullptr,0 },
-{ "FormatNumber",   SbxSTRING, 5 | FUNCTION_ | COMPATONLY_, SbRtl_FormatNumber, 0 },
-  { "expression",                  SbxDOUBLE,  0,    nullptr, 0 },
-  { "numDigitsAfterDecimal",       SbxINTEGER, OPT_, nullptr, 0 },
-  { "includeLeadingDigit",         SbxINTEGER, OPT_, nullptr, 0 }, // vbTriState
-  { "useParensForNegativeNumbers", SbxINTEGER, OPT_, nullptr, 0 }, // vbTriState
-  { "groupDigits",                 SbxINTEGER, OPT_, nullptr, 0 }, // vbTriState
-{ "Frac",           SbxDOUBLE,    1 | FUNCTION_, SbRtl_Frac,0            },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "FRAMEANCHORCHAR",        SbxINTEGER,       CPROP_,    SbRtl_FRAMEANCHORCHAR,0 },
-{ "FRAMEANCHORPAGE",        SbxINTEGER,       CPROP_,    SbRtl_FRAMEANCHORPAGE,0 },
-{ "FRAMEANCHORPARA",        SbxINTEGER,       CPROP_,    SbRtl_FRAMEANCHORPARA,0 },
-{ "FreeFile",       SbxINTEGER,    FUNCTION_, SbRtl_FreeFile,0           },
-{ "FreeLibrary",    SbxNULL,      1 | FUNCTION_, SbRtl_FreeLibrary,0     },
-  { "Modulename",   SbxSTRING, 0,nullptr,0 },
-
-{ "FV",      SbxDOUBLE,      5 | FUNCTION_ | COMPATONLY_, SbRtl_FV,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "NPer",       SbxDOUBLE,  0, nullptr,0 },
-  { "Pmt",       SbxDOUBLE,  0, nullptr,0 },
-  { "PV",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-{ "Get",            SbxNULL,   3 | FUNCTION_, SbRtl_Get,0                },
-  { "filenumber",   SbxINTEGER, 0,nullptr,0 },
-  { "recordnumber", SbxLONG, 0,nullptr,0 },
-  { "variablename", SbxVARIANT, 0,nullptr,0 },
-{ "GetAttr",        SbxINTEGER,   1 | FUNCTION_, SbRtl_GetAttr,0         },
-  { "filename",     SbxSTRING, 0,nullptr,0 },
-{ "GetDefaultContext", SbxOBJECT, 0 | FUNCTION_, SbRtl_GetDefaultContext,0 },
-{ "GetDialogZoomFactorX",  SbxDOUBLE,     FUNCTION_,SbRtl_GetDialogZoomFactorX,0 },
-{ "GetDialogZoomFactorY",  SbxDOUBLE,     FUNCTION_,SbRtl_GetDialogZoomFactorY,0 },
-{ "GetGUIType",  SbxINTEGER,     FUNCTION_,SbRtl_GetGUIType,0            },
-{ "GetGUIVersion",  SbxLONG,     FUNCTION_,SbRtl_GetGUIVersion,0         },
-{ "GetPathSeparator",  SbxSTRING,     FUNCTION_,SbRtl_GetPathSeparator,0 },
-{ "GetProcessServiceManager", SbxOBJECT, 0 | FUNCTION_, SbRtl_GetProcessServiceManager,0 },
-{ "GetSolarVersion",  SbxLONG,     FUNCTION_,SbRtl_GetSolarVersion,0     },
-{ "GetSystemTicks",  SbxLONG,      FUNCTION_,SbRtl_GetSystemTicks,0      },
-{ "GetSystemType",  SbxINTEGER,    FUNCTION_,SbRtl_GetSystemType,0       },
-{ "GlobalScope",    SbxOBJECT,     FUNCTION_,SbRtl_GlobalScope,0         },
-{ "Green",          SbxINTEGER,   1 | FUNCTION_ | NORMONLY_, SbRtl_Green,0           },
-  { "RGB-Value",     SbxLONG, 0,nullptr,0 },
-
-{ "HasUnoInterfaces",   SbxBOOL,  1 | FUNCTION_, SbRtl_HasUnoInterfaces,0},
-  { "InterfaceName",SbxSTRING, 0,nullptr,0 },
-{ "Hex",            SbxSTRING,    1 | FUNCTION_, SbRtl_Hex,0             },
-  { "number",       SbxLONG, 0,nullptr,0 },
-{ "Hour",           SbxINTEGER,   1 | FUNCTION_, SbRtl_Hour,0            },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-
-{ "IDABORT",        SbxINTEGER,       CPROP_,    SbRtl_IDABORT,0         },
-{ "IDCANCEL",       SbxINTEGER,       CPROP_,    SbRtl_IDCANCEL,0        },
-{ "IDNO",           SbxINTEGER,       CPROP_,    SbRtl_IDNO,0            },
-{ "IDOK",           SbxINTEGER,       CPROP_,    SbRtl_IDOK,0            },
-{ "IDRETRY",        SbxINTEGER,       CPROP_,    SbRtl_IDRETRY,0         },
-{ "IDYES",          SbxINTEGER,       CPROP_,    SbRtl_IDYES,0           },
-
-{ "Iif",            SbxVARIANT,   3 | FUNCTION_, SbRtl_Iif,0             },
-  { "Bool",         SbxBOOL, 0,nullptr,0 },
-  { "Variant1",     SbxVARIANT, 0,nullptr,0 },
-  { "Variant2",     SbxVARIANT, 0,nullptr,0 },
-
-{ "Input",          SbxSTRING,    2 | FUNCTION_ | COMPATONLY_, SbRtl_Input,0},
-  { "Number",       SbxLONG, 0,nullptr,0 },
-  { "FileNumber",   SbxLONG, 0,nullptr,0 },
-{ "InputBox",       SbxSTRING,    5 | FUNCTION_, SbRtl_InputBox,0        },
-  { "Prompt",       SbxSTRING, 0,nullptr,0 },
-  { "Title",        SbxSTRING,        OPT_, nullptr,0 },
-  { "Default",      SbxSTRING,        OPT_, nullptr,0 },
-  { "XPosTwips",    SbxLONG,          OPT_, nullptr,0 },
-  { "YPosTwips",    SbxLONG,          OPT_, nullptr,0 },
-{ "InStr",          SbxLONG,      4 | FUNCTION_, SbRtl_InStr,0           },
-  { "Start",        SbxSTRING,        OPT_, nullptr,0 },
-  { "String1",      SbxSTRING, 0,nullptr,0 },
-  { "String2",      SbxSTRING, 0,nullptr,0 },
-  { "Compare",      SbxINTEGER,       OPT_, nullptr,0 },
-{ "InStrRev",       SbxLONG,      4 | FUNCTION_ | COMPATONLY_, SbRtl_InStrRev,0},
-  { "String1",      SbxSTRING, 0,nullptr,0 },
-  { "String2",      SbxSTRING, 0,nullptr,0 },
-  { "Start",        SbxSTRING,        OPT_, nullptr,0 },
-  { "Compare",      SbxINTEGER,       OPT_, nullptr,0 },
-{ "Int",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Int,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "IPmt",      SbxDOUBLE,      6 | FUNCTION_ | COMPATONLY_, SbRtl_IPmt,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "Per",       SbxDOUBLE,  0, nullptr,0 },
-  { "NPer",       SbxDOUBLE,  0, nullptr,0 },
-  { "PV",     SbxDOUBLE,  0, nullptr,0 },
-  { "FV",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-{ "IRR",      SbxDOUBLE,      2 | FUNCTION_ | COMPATONLY_, SbRtl_IRR,0       },
-  { "ValueArray",       SbxARRAY,  0, nullptr,0 },
-  { "Guess",       SbxVARIANT,  OPT_, nullptr,0 },
-{ "IsArray",        SbxBOOL,      1 | FUNCTION_, SbRtl_IsArray,0         },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsDate",         SbxBOOL,      1 | FUNCTION_, SbRtl_IsDate,0          },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsEmpty",        SbxBOOL,      1 | FUNCTION_, SbRtl_IsEmpty,0         },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsError",        SbxBOOL,      1 | FUNCTION_, SbRtl_IsError,0         },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsMissing",        SbxBOOL,      1 | FUNCTION_, SbRtl_IsMissing,0     },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsNull",         SbxBOOL,      1 | FUNCTION_, SbRtl_IsNull,0          },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsNumeric",      SbxBOOL,      1 | FUNCTION_, SbRtl_IsNumeric,0       },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsObject",       SbxBOOL,      1 | FUNCTION_, SbRtl_IsObject,0        },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "IsUnoStruct",    SbxBOOL,      1 | FUNCTION_, SbRtl_IsUnoStruct,0     },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "Join",           SbxSTRING,      2 | FUNCTION_, SbRtl_Join,0          },
-  { "list",         SbxOBJECT, 0,nullptr,0 },
-  { "delimiter",    SbxSTRING, 0,nullptr,0 },
-{ "Kill",           SbxNULL,      1 | FUNCTION_, SbRtl_Kill,0            },
-  { "filespec",     SbxSTRING, 0,nullptr,0 },
-{ "LBound",         SbxLONG,      1 | FUNCTION_, SbRtl_LBound,0          },
-  { "Variant",      SbxVARIANT, 0,nullptr,0 },
-{ "LCase",          SbxSTRING,    1 | FUNCTION_, SbRtl_LCase,0           },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "Left",           SbxSTRING,    2 | FUNCTION_, SbRtl_Left,0            },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-  { "Count",        SbxLONG, 0,nullptr,0 },
-{ "Len",            SbxLONG,      1 | FUNCTION_, SbRtl_Len,0             },
-  { "StringOrVariant", SbxVARIANT, 0,nullptr,0 },
-{ "LenB",           SbxLONG,      1 | FUNCTION_, SbRtl_Len,0             },
-  { "StringOrVariant", SbxVARIANT, 0,nullptr,0 },
-{ "Load",           SbxNULL,      1 | FUNCTION_, SbRtl_Load,0            },
-  { "object",       SbxOBJECT, 0,nullptr,0 },
-{ "LoadPicture",    SbxOBJECT,    1 | FUNCTION_, SbRtl_LoadPicture,0     },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "Loc",            SbxLONG,      1 | FUNCTION_, SbRtl_Loc,0             },
-  { "Channel",      SbxINTEGER, 0,nullptr,0 },
-{ "Lof",            SbxLONG,      1 | FUNCTION_, SbRtl_Lof,0             },
-  { "Channel",      SbxINTEGER, 0,nullptr,0 },
-{ "Log",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Log,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "LTrim",          SbxSTRING,    1 | FUNCTION_, SbRtl_LTrim,0           },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-
-{ "MB_ABORTRETRYIGNORE", SbxINTEGER,  CPROP_,    SbRtl_MB_ABORTRETRYIGNORE,0},
-{ "MB_APPLMODAL",   SbxINTEGER,       CPROP_,    SbRtl_MB_APPLMODAL,0    },
-{ "MB_DEFBUTTON1",  SbxINTEGER,       CPROP_,    SbRtl_MB_DEFBUTTON1,0   },
-{ "MB_DEFBUTTON2",  SbxINTEGER,       CPROP_,    SbRtl_MB_DEFBUTTON2,0   },
-{ "MB_DEFBUTTON3",  SbxINTEGER,       CPROP_,    SbRtl_MB_DEFBUTTON3,0   },
-{ "MB_ICONEXCLAMATION", SbxINTEGER,   CPROP_,    SbRtl_MB_ICONEXCLAMATION,0},
-{ "MB_ICONINFORMATION", SbxINTEGER,   CPROP_,    SbRtl_MB_ICONINFORMATION,0},
-{ "MB_ICONQUESTION",SbxINTEGER,       CPROP_,    SbRtl_MB_ICONQUESTION,0 },
-{ "MB_ICONSTOP",    SbxINTEGER,       CPROP_,    SbRtl_MB_ICONSTOP,0     },
-{ "MB_OK",          SbxINTEGER,       CPROP_,    SbRtl_MB_OK,0           },
-{ "MB_OKCANCEL",    SbxINTEGER,       CPROP_,    SbRtl_MB_OKCANCEL,0     },
-{ "MB_RETRYCANCEL", SbxINTEGER,       CPROP_,    SbRtl_MB_RETRYCANCEL,0  },
-{ "MB_SYSTEMMODAL", SbxINTEGER,       CPROP_,    SbRtl_MB_SYSTEMMODAL,0  },
-{ "MB_YESNO",       SbxINTEGER,       CPROP_,    SbRtl_MB_YESNO,0        },
-{ "MB_YESNOCANCEL", SbxINTEGER,       CPROP_,    SbRtl_MB_YESNOCANCEL,0  },
-
-{ "Me",             SbxOBJECT,    0 | FUNCTION_ | COMPATONLY_, SbRtl_Me,0 },
-{ "Mid",            SbxSTRING,    3 | LFUNCTION_,SbRtl_Mid,0             },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-  { "StartPos",     SbxLONG, 0,nullptr,0 },
-  { "Length",       SbxLONG,          OPT_, nullptr,0 },
-{ "Minute",         SbxINTEGER,   1 | FUNCTION_, SbRtl_Minute,0          },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "MIRR",      SbxDOUBLE,      2 | FUNCTION_ | COMPATONLY_, SbRtl_MIRR,0       },
-  { "ValueArray",       SbxARRAY,  0, nullptr,0 },
-  { "FinanceRate",       SbxDOUBLE,  0, nullptr,0 },
-  { "ReinvestRate",       SbxDOUBLE,  0, nullptr,0 },
-{ "MkDir",          SbxNULL,      1 | FUNCTION_, SbRtl_MkDir,0           },
-  { "pathname",     SbxSTRING, 0,nullptr,0 },
-{ "Month",          SbxINTEGER,   1 | FUNCTION_, SbRtl_Month,0           },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "MonthName",      SbxSTRING,    2 | FUNCTION_ | COMPATONLY_, SbRtl_MonthName,0 },
-  { "Month",        SbxINTEGER, 0,nullptr,0 },
-  { "Abbreviate",   SbxBOOL,          OPT_, nullptr,0 },
-{ "MsgBox",         SbxINTEGER,    5 | FUNCTION_, SbRtl_MsgBox,0         },
-  { "Prompt",       SbxSTRING, 0,nullptr,0 },
-  { "Buttons",      SbxINTEGER,       OPT_, nullptr,0 },
-  { "Title",        SbxSTRING,        OPT_, nullptr,0 },
-  { "Helpfile",     SbxSTRING,        OPT_, nullptr,0 },
-  { "Context",      SbxINTEGER,       OPT_, nullptr,0 },
-
-{ "Nothing",        SbxOBJECT,        CPROP_,    SbRtl_Nothing,0         },
-{ "Now",            SbxDATE,          FUNCTION_, SbRtl_Now,0             },
-{ "NPer",      SbxDOUBLE,      5 | FUNCTION_ | COMPATONLY_, SbRtl_NPer,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "Pmt",       SbxDOUBLE,  0, nullptr,0 },
-  { "PV",       SbxDOUBLE,  0, nullptr,0 },
-  { "FV",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-{ "NPV",      SbxDOUBLE,      2 | FUNCTION_ | COMPATONLY_, SbRtl_NPV,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "ValueArray",       SbxARRAY,  0, nullptr,0 },
-{ "Null",           SbxNULL,          CPROP_,    SbRtl_Null,0            },
-
-{ "Oct",            SbxSTRING,    1 | FUNCTION_, SbRtl_Oct,0             },
-  { "number",       SbxLONG, 0,nullptr,0 },
-
-{ "Partition",      SbxSTRING,    4 | FUNCTION_, SbRtl_Partition,0       },
-  { "number",       SbxLONG,    0,nullptr,0 },
-  { "start",        SbxLONG,    0,nullptr,0 },
-  { "stop",         SbxLONG,    0,nullptr,0 },
-  { "interval",     SbxLONG,    0,nullptr,0 },
-{ "Pi",             SbxDOUBLE,        CPROP_,    SbRtl_PI,0              },
-
-{ "Pmt",      SbxDOUBLE,      5 | FUNCTION_ | COMPATONLY_, SbRtl_Pmt,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "NPer",       SbxDOUBLE,  0, nullptr,0 },
-  { "PV",     SbxDOUBLE,  0, nullptr,0 },
-  { "FV",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-
-{ "PPmt",      SbxDOUBLE,      6 | FUNCTION_ | COMPATONLY_, SbRtl_PPmt,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "Per",       SbxDOUBLE,  0, nullptr,0 },
-  { "NPer",       SbxDOUBLE,  0, nullptr,0 },
-  { "PV",     SbxDOUBLE,  0, nullptr,0 },
-  { "FV",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-
-{ "Put",            SbxNULL,   3 | FUNCTION_, SbRtl_Put,0                },
-  { "filenumber",   SbxINTEGER, 0,nullptr,0 },
-  { "recordnumber", SbxLONG, 0,nullptr,0 },
-  { "variablename", SbxVARIANT, 0,nullptr,0 },
-
-{ "PV",      SbxDOUBLE,      5 | FUNCTION_ | COMPATONLY_, SbRtl_PV,0       },
-  { "Rate",       SbxDOUBLE,  0, nullptr,0 },
-  { "NPer",       SbxDOUBLE,  0, nullptr,0 },
-  { "Pmt",     SbxDOUBLE,  0, nullptr,0 },
-  { "FV",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-
-{ "QBColor",        SbxLONG,      1 | FUNCTION_, SbRtl_QBColor,0         },
-  { "number",       SbxINTEGER, 0,nullptr,0 },
-
-{ "Randomize",      SbxNULL,      1 | FUNCTION_, SbRtl_Randomize,0       },
-  { "Number",       SbxDOUBLE,        OPT_, nullptr,0 },
-{ "Rate",      SbxDOUBLE,      6 | FUNCTION_ | COMPATONLY_, SbRtl_Rate,0       },
-  { "NPer",       SbxDOUBLE,  0, nullptr,0 },
-  { "Pmt",       SbxDOUBLE,  0, nullptr,0 },
-  { "PV",       SbxDOUBLE,  0, nullptr,0 },
-  { "FV",       SbxVARIANT,  OPT_, nullptr,0 },
-  { "Due",     SbxVARIANT,  OPT_, nullptr,0 },
-  { "Guess",    SbxVARIANT,  OPT_, nullptr,0 },
-{ "Red",        SbxINTEGER,   1 | FUNCTION_ | NORMONLY_, SbRtl_Red,0                 },
-  { "RGB-Value",     SbxLONG, 0,nullptr,0 },
-{ "Reset",          SbxNULL,      0 | FUNCTION_, SbRtl_Reset,0           },
-{ "ResolvePath",    SbxSTRING,    1 | FUNCTION_, SbRtl_ResolvePath,0     },
-  { "Path",         SbxSTRING, 0,nullptr,0 },
-{ "RGB",            SbxLONG,      3 | FUNCTION_, SbRtl_RGB,0             },
-  { "Red",          SbxINTEGER, 0,nullptr,0 },
-  { "Green",        SbxINTEGER, 0,nullptr,0 },
-  { "Blue",         SbxINTEGER, 0,nullptr,0 },
-{ "Replace",        SbxSTRING,    6 | FUNCTION_, SbRtl_Replace,0         },
-  { "Expression",   SbxSTRING, 0,nullptr,0 },
-  { "Find",         SbxSTRING, 0,nullptr,0 },
-  { "Replace",      SbxSTRING, 0,nullptr,0 },
-  { "Start",        SbxINTEGER,     OPT_, nullptr,0 },
-  { "Count",        SbxINTEGER,     OPT_, nullptr,0 },
-  { "Compare",      SbxINTEGER,     OPT_, nullptr,0 },
-{ "Right",          SbxSTRING,    2 | FUNCTION_, SbRtl_Right,0           },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-  { "Count",        SbxLONG, 0,nullptr,0 },
-{ "RmDir",          SbxNULL,      1 | FUNCTION_, SbRtl_RmDir,0           },
-  { "pathname",     SbxSTRING, 0,nullptr,0 },
-{ "Round",          SbxDOUBLE,    2 | FUNCTION_ | COMPATONLY_, SbRtl_Round,0},
-  { "Expression",   SbxDOUBLE, 0,nullptr,0 },
-  { "Numdecimalplaces", SbxINTEGER,   OPT_, nullptr,0 },
-{ "Rnd",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Rnd,0             },
-  { "Number",       SbxDOUBLE,        OPT_, nullptr,0 },
-{ "RTL",            SbxOBJECT,    0 | FUNCTION_ | COMPATONLY_, SbRtl_RTL,0},
-{ "RTrim",          SbxSTRING,    1 | FUNCTION_, SbRtl_RTrim,0           },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-
-{ "SavePicture",    SbxNULL,      2 | FUNCTION_, SbRtl_SavePicture,0     },
-  { "object",       SbxOBJECT, 0,nullptr,0 },
-  { "string",       SbxSTRING, 0,nullptr,0 },
-{ "Second",         SbxINTEGER,   1 | FUNCTION_, SbRtl_Second,0          },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-{ "Seek",           SbxLONG,      1 | FUNCTION_, SbRtl_Seek,0            },
-  { "Channel",      SbxINTEGER, 0,nullptr,0 },
-{ "SendKeys",       SbxNULL,      2 | FUNCTION_, SbRtl_SendKeys,0        },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-  { "Wait",         SbxBOOL,          OPT_, nullptr,0 },
-{ "SetAttr",        SbxNULL,      2 | FUNCTION_, SbRtl_SetAttr,0         },
-  { "File"  ,       SbxSTRING, 0,nullptr,0 },
-  { "Attributes",   SbxINTEGER, 0,nullptr,0 },
-{ "SET_OFF",        SbxINTEGER,       CPROP_,    SbRtl_SET_OFF,0         },
-{ "SET_ON",         SbxINTEGER,       CPROP_,    SbRtl_SET_ON,0          },
-{ "SET_TAB",        SbxINTEGER,       CPROP_,    SbRtl_SET_TAB,0         },
-{ "Sgn",            SbxINTEGER,   1 | FUNCTION_, SbRtl_Sgn,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "Shell",          SbxLONG,      2 | FUNCTION_, SbRtl_Shell,0           },
-  { "Commandstring",SbxSTRING, 0,nullptr,0 },
-  { "WindowStyle",  SbxINTEGER,       OPT_, nullptr,0 },
-{ "Sin",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Sin,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "SLN",            SbxDOUBLE,    2 |  FUNCTION_ | COMPATONLY_, SbRtl_SLN,0             },
-  { "Cost",       SbxDOUBLE, 0,nullptr,0 },
-  { "Double",       SbxDOUBLE, 0,nullptr,0 },
-  { "Life",       SbxDOUBLE, 0,nullptr,0 },
-{ "SYD",            SbxDOUBLE,    2 |  FUNCTION_ | COMPATONLY_, SbRtl_SYD,0             },
-  { "Cost",       SbxDOUBLE, 0,nullptr,0 },
-  { "Salvage",       SbxDOUBLE, 0,nullptr,0 },
-  { "Life",       SbxDOUBLE, 0,nullptr,0 },
-  { "Period",       SbxDOUBLE, 0,nullptr,0 },
-{ "Space",          SbxSTRING,      1 | FUNCTION_, SbRtl_Space,0         },
-  { "string",       SbxLONG, 0,nullptr,0 },
-{ "Spc",            SbxSTRING,      1 | FUNCTION_, SbRtl_Spc,0           },
-  { "Count",        SbxLONG, 0,nullptr,0 },
-{ "Split",          SbxOBJECT,      3 | FUNCTION_, SbRtl_Split,0         },
-  { "expression",   SbxSTRING, 0,nullptr,0 },
-  { "delimiter",    SbxSTRING, 0,nullptr,0 },
-  { "count",        SbxLONG, 0,nullptr,0 },
-{ "Sqr",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Sqr,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "Str",            SbxSTRING,    1 | FUNCTION_, SbRtl_Str,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "StrComp",        SbxINTEGER,   3 | FUNCTION_, SbRtl_StrComp,0         },
-  { "String1",      SbxSTRING, 0,nullptr,0 },
-  { "String2",      SbxSTRING, 0,nullptr,0 },
-  { "Compare",      SbxINTEGER,       OPT_, nullptr,0 },
-{ "StrConv",        SbxOBJECT,   3 | FUNCTION_, SbRtl_StrConv,0          },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-  { "Conversion",   SbxSTRING, 0,nullptr,0 },
-  { "LCID",         SbxINTEGER, OPT_,nullptr,0 },
-{ "String",         SbxSTRING,    2 | FUNCTION_, SbRtl_String,0          },
-  { "Count",        SbxLONG, 0,nullptr,0 },
-  { "Filler",       SbxVARIANT, 0,nullptr,0 },
-{ "StrReverse",     SbxSTRING,    1 | FUNCTION_ | COMPATONLY_, SbRtl_StrReverse,0 },
-  { "String1",      SbxSTRING, 0,nullptr,0 },
-{ "Switch",         SbxVARIANT,   2 | FUNCTION_, SbRtl_Switch,0          },
-  { "Expression",   SbxVARIANT, 0,nullptr,0 },
-  { "Value",        SbxVARIANT, 0,nullptr,0 },
-{ "Tab",            SbxSTRING,    1 | FUNCTION_, SbRtl_Tab,0             },
-  { "Count",        SbxLONG, 0,nullptr,0 },
-{ "Tan",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Tan,0             },
-  { "number",       SbxDOUBLE, 0,nullptr,0 },
-{ "Time",           SbxVARIANT,       LFUNCTION_,SbRtl_Time,0            },
-{ "Timer",          SbxDATE,          FUNCTION_, SbRtl_Timer,0           },
-{ "TimeSerial",     SbxDATE,      3 | FUNCTION_, SbRtl_TimeSerial,0      },
-  { "Hour",         SbxLONG, 0,nullptr,0 },
-  { "Minute",       SbxLONG, 0,nullptr,0 },
-  { "Second",       SbxLONG, 0,nullptr,0 },
-{ "TimeValue",      SbxDATE,      1 | FUNCTION_, SbRtl_TimeValue,0       },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-{ "TOGGLE",         SbxINTEGER,       CPROP_,    SbRtl_TOGGLE,0          },
-{ "Trim",           SbxSTRING,    1 | FUNCTION_, SbRtl_Trim,0            },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-{ "True",           SbxBOOL,          CPROP_,    SbRtl_True,0            },
-{ "TwipsPerPixelX", SbxLONG,          FUNCTION_, SbRtl_TwipsPerPixelX,0  },
-{ "TwipsPerPixelY", SbxLONG,          FUNCTION_, SbRtl_TwipsPerPixelY,0  },
-
-{ "TYP_AUTHORFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_AUTHORFLD,0       },
-{ "TYP_CHAPTERFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_CHAPTERFLD,0      },
-{ "TYP_CONDTXTFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_CONDTXTFLD,0      },
-{ "TYP_DATEFLD",            SbxINTEGER,       CPROP_,    SbRtl_TYP_DATEFLD,0         },
-{ "TYP_DBFLD",              SbxINTEGER,       CPROP_,    SbRtl_TYP_DBFLD,0           },
-{ "TYP_DBNAMEFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_DBNAMEFLD,0       },
-{ "TYP_DBNEXTSETFLD",       SbxINTEGER,       CPROP_,    SbRtl_TYP_DBNEXTSETFLD,0    },
-{ "TYP_DBNUMSETFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_DBNUMSETFLD,0     },
-{ "TYP_DBSETNUMBERFLD",     SbxINTEGER,       CPROP_,    SbRtl_TYP_DBSETNUMBERFLD,0  },
-{ "TYP_DDEFLD",             SbxINTEGER,       CPROP_,    SbRtl_TYP_DDEFLD,0          },
-{ "TYP_DOCINFOFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_DOCINFOFLD,0      },
-{ "TYP_DOCSTATFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_DOCSTATFLD,0      },
-{ "TYP_EXTUSERFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_EXTUSERFLD,0      },
-{ "TYP_FILENAMEFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_FILENAMEFLD,0     },
-{ "TYP_FIXDATEFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_FIXDATEFLD,0      },
-{ "TYP_FIXTIMEFLD",         SbxINTEGER,       CPROP_,    SbRtl_TYP_FIXTIMEFLD,0      },
-{ "TYP_FORMELFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_FORMELFLD,0       },
-{ "TYP_GETFLD",             SbxINTEGER,       CPROP_,    SbRtl_TYP_GETFLD,0          },
-{ "TYP_GETREFFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_GETREFFLD,0       },
-{ "TYP_GETREFPAGEFLD",      SbxINTEGER,       CPROP_,    SbRtl_TYP_GETREFPAGEFLD,0   },
-{ "TYP_HIDDENPARAFLD",      SbxINTEGER,       CPROP_,    SbRtl_TYP_HIDDENPARAFLD,0   },
-{ "TYP_HIDDENTXTFLD",       SbxINTEGER,       CPROP_,    SbRtl_TYP_HIDDENTXTFLD,0    },
-{ "TYP_INPUTFLD",           SbxINTEGER,       CPROP_,    SbRtl_TYP_INPUTFLD,0        },
-{ "TYP_INTERNETFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_INTERNETFLD,0     },
-{ "TYP_JUMPEDITFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_JUMPEDITFLD,0     },
-{ "TYP_MACROFLD",           SbxINTEGER,       CPROP_,    SbRtl_TYP_MACROFLD,0        },
-{ "TYP_NEXTPAGEFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_NEXTPAGEFLD,0     },
-{ "TYP_PAGENUMBERFLD",      SbxINTEGER,       CPROP_,    SbRtl_TYP_PAGENUMBERFLD,0   },
-{ "TYP_POSTITFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_POSTITFLD,0       },
-{ "TYP_PREVPAGEFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_PREVPAGEFLD,0     },
-{ "TYP_SEQFLD",             SbxINTEGER,       CPROP_,    SbRtl_TYP_SEQFLD,0          },
-{ "TYP_SETFLD",             SbxINTEGER,       CPROP_,    SbRtl_TYP_SETFLD,0          },
-{ "TYP_SETINPFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_SETINPFLD,0       },
-{ "TYP_SETREFFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_SETREFFLD,0       },
-{ "TYP_SETREFPAGEFLD",      SbxINTEGER,       CPROP_,    SbRtl_TYP_SETREFPAGEFLD,0   },
-{ "TYP_TEMPLNAMEFLD",           SbxINTEGER,       CPROP_,    SbRtl_TYP_TEMPLNAMEFLD,0},
-{ "TYP_TIMEFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_TIMEFLD,0             },
-{ "TYP_USERFLD",        SbxINTEGER,       CPROP_,    SbRtl_TYP_USERFLD,0             },
-{ "TYP_USRINPFLD",          SbxINTEGER,       CPROP_,    SbRtl_TYP_USRINPFLD,0       },
-
-{ "TypeLen",        SbxINTEGER,    1 | FUNCTION_, SbRtl_TypeLen,0        },
-  { "Var",          SbxVARIANT, 0,nullptr,0 },
-{ "TypeName",       SbxSTRING,    1 | FUNCTION_, SbRtl_TypeName,0        },
-  { "Var",          SbxVARIANT, 0,nullptr,0 },
-
-{ "UBound",         SbxLONG,      1 | FUNCTION_, SbRtl_UBound,0          },
-  { "Var",          SbxVARIANT, 0,nullptr,0 },
-{ "UCase",          SbxSTRING,    1 | FUNCTION_, SbRtl_UCase,0           },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-{ "Unload",         SbxNULL,      1 | FUNCTION_, SbRtl_Unload,0          },
-  { "Dialog",       SbxOBJECT, 0,nullptr,0 },
-
-{ "Val",            SbxDOUBLE,    1 | FUNCTION_, SbRtl_Val,0             },
-  { "String",       SbxSTRING, 0,nullptr,0 },
-{ "VarType",        SbxINTEGER,   1 | FUNCTION_, SbRtl_VarType,0         },
-  { "Var",          SbxVARIANT, 0,nullptr,0 },
-{ "V_EMPTY",        SbxINTEGER,       CPROP_,    SbRtl_V_EMPTY,0         },
-{ "V_NULL",         SbxINTEGER,       CPROP_,    SbRtl_V_NULL,0          },
-{ "V_INTEGER",      SbxINTEGER,       CPROP_,    SbRtl_V_INTEGER,0       },
-{ "V_LONG",         SbxINTEGER,       CPROP_,    SbRtl_V_LONG,0          },
-{ "V_SINGLE",       SbxINTEGER,       CPROP_,    SbRtl_V_SINGLE,0        },
-{ "V_DOUBLE",       SbxINTEGER,       CPROP_,    SbRtl_V_DOUBLE,0        },
-{ "V_CURRENCY",     SbxINTEGER,       CPROP_,    SbRtl_V_CURRENCY,0      },
-{ "V_DATE",         SbxINTEGER,       CPROP_,    SbRtl_V_DATE,0          },
-{ "V_STRING",       SbxINTEGER,       CPROP_,    SbRtl_V_STRING,0        },
-
-{ "Wait",           SbxNULL,      1 | FUNCTION_, SbRtl_Wait,0            },
-  { "Milliseconds", SbxLONG, 0,nullptr,0 },
-{ "FuncCaller",          SbxVARIANT,      FUNCTION_, SbRtl_FuncCaller,0      },
-//#i64882#
-{ "WaitUntil",          SbxNULL,      1 | FUNCTION_, SbRtl_WaitUntil,0      },
-  { "Date", SbxDOUBLE, 0,nullptr,0 },
-{ "Weekday",        SbxINTEGER,   2 | FUNCTION_, SbRtl_Weekday,0         },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-  { "Firstdayofweek", SbxINTEGER, OPT_, nullptr,0 },
-{ "WeekdayName",    SbxSTRING,    3 | FUNCTION_ | COMPATONLY_, SbRtl_WeekdayName,0 },
-  { "Weekday",      SbxINTEGER, 0,nullptr,0 },
-  { "Abbreviate",   SbxBOOL,      OPT_, nullptr,0 },
-  { "Firstdayofweek", SbxINTEGER, OPT_, nullptr,0 },
-{ "Year",           SbxINTEGER,   1 | FUNCTION_, SbRtl_Year,0            },
-  { "Date",         SbxDATE, 0,nullptr,0 },
-
-{ nullptr,             SbxNULL,     -1,nullptr,0 }};  // end of the table
-
-SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
+template <int N> constexpr bool MethodsTableValid(const Method (&rMethods)[N])
 {
-    // do we have to initialize the hashcodes?
-    Methods* p = aMethods;
-    if( !p->nHash )
-        while( p->nArgs != -1 )
+    int nCurMethArgs = 0;
+    int nArgsChecked = 0;
+    bool bFinished = false;
+    for (const auto& m : rMethods)
+    {
+        assert(!bFinished); // no entries after end-of-table entry
+        if (bFinished)
+            return false;
+        if (m.nArgs == -1) // end-of-table entry
+        {
+            assert(nCurMethArgs == nArgsChecked); // last method had correct # of arguments
+            if (nCurMethArgs != nArgsChecked)
+                return false;
+            bFinished = true;
+        }
+        else if (m.pFunc) // main (function/sub/etc) entry
         {
-            OUString aName_ = OUString::createFromAscii( p->pName );
-            p->nHash = SbxVariable::MakeHashCode( aName_ );
-            p += ( p->nArgs & ARGSMASK_ ) + 1;
+            assert(nCurMethArgs == nArgsChecked); // previous method had correct # of arguments
+            if (nCurMethArgs != nArgsChecked)
+                return false;
+            nCurMethArgs = m.nArgs & ARGSMASK_;
+            nArgsChecked = 0;
         }
+        else // subordinate (argument) entry
+            ++nArgsChecked;
+    }
+    assert(bFinished); // its last entry was end-of-table entry
+    return bFinished;
+}
+
+}
+
+constexpr Method aMethods[] = {
+
+{ u"Abs",                           SbxDOUBLE,   1 | FUNCTION_,        SbRtl_Abs                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"Array",                         SbxOBJECT,       FUNCTION_,        SbRtl_Array                },
+{ u"Asc",                           SbxLONG,     1 | FUNCTION_,        SbRtl_Asc                  },
+    arg(u"string", SbxSTRING),
+
+{ u"AscW",                          SbxLONG,     1 | FUNCTION_ | COMPATONLY_, SbRtl_Asc           },
+    arg(u"string", SbxSTRING),
+
+{ u"Atn",                           SbxDOUBLE,   1 | FUNCTION_,        SbRtl_Atn                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"ATTR_ARCHIVE",                  SbxINTEGER,      CPROP_,           SbRtl_ATTR_ARCHIVE         },
+{ u"ATTR_DIRECTORY",                SbxINTEGER,      CPROP_,           SbRtl_ATTR_DIRECTORY       },
+{ u"ATTR_HIDDEN",                   SbxINTEGER,      CPROP_,           SbRtl_ATTR_HIDDEN          },
+{ u"ATTR_NORMAL",                   SbxINTEGER,      CPROP_,           SbRtl_ATTR_NORMAL          },
+{ u"ATTR_READONLY",                 SbxINTEGER,      CPROP_,           SbRtl_ATTR_READONLY        },
+{ u"ATTR_SYSTEM",                   SbxINTEGER,      CPROP_,           SbRtl_ATTR_SYSTEM          },
+{ u"ATTR_VOLUME",                   SbxINTEGER,      CPROP_,           SbRtl_ATTR_VOLUME          },
+
+{ u"Beep",                          SbxNULL,         FUNCTION_,        SbRtl_Beep                 },
+{ u"Blue",                          SbxINTEGER,  1 | FUNCTION_ | NORMONLY_, SbRtl_Blue            },
+    arg(u"RGB-Value", SbxLONG),
+
+{ u"CallByName",                    SbxVARIANT,  3 | FUNCTION_,        SbRtl_CallByName           },
+    arg(u"Object",        SbxOBJECT),
+    arg(u"ProcedureName", SbxSTRING),
+    arg(u"CallType",      SbxINTEGER),
+
+{ u"CBool",                         SbxBOOL,     1 | FUNCTION_,        SbRtl_CBool                },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CByte",                         SbxBYTE,     1 | FUNCTION_,        SbRtl_CByte                },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CCur",                          SbxCURRENCY, 1 | FUNCTION_,        SbRtl_CCur                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CDate",                         SbxDATE,     1 | FUNCTION_,        SbRtl_CDate                },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CDateFromUnoDate",              SbxDATE,     1 | FUNCTION_,        SbRtl_CDateFromUnoDate     },
+    arg(u"UnoDate", SbxOBJECT),
+
+{ u"CDateToUnoDate",                SbxOBJECT,   1 | FUNCTION_,        SbRtl_CDateToUnoDate       },
+    arg(u"Date", SbxDATE),
+
+{ u"CDateFromUnoTime",              SbxDATE,     1 | FUNCTION_,        SbRtl_CDateFromUnoTime     },
+    arg(u"UnoTime", SbxOBJECT),
+
+{ u"CDateToUnoTime",                SbxOBJECT,   1 | FUNCTION_,        SbRtl_CDateToUnoTime       },
+    arg(u"Time", SbxDATE),
+
+{ u"CDateFromUnoDateTime",          SbxDATE,     1 | FUNCTION_,        SbRtl_CDateFromUnoDateTime },
+    arg(u"UnoDateTime", SbxOBJECT),
+
+{ u"CDateToUnoDateTime",            SbxOBJECT,   1 | FUNCTION_,        SbRtl_CDateToUnoDateTime   },
+    arg(u"DateTime", SbxDATE),
+
+{ u"CDateFromIso",                  SbxDATE,     1 | FUNCTION_,        SbRtl_CDateFromIso         },
+    arg(u"IsoDate", SbxSTRING),
+
+{ u"CDateToIso",                    SbxSTRING,   1 | FUNCTION_,        SbRtl_CDateToIso           },
+    arg(u"Date", SbxDATE),
+
+{ u"CDec",                          SbxDECIMAL,  1 | FUNCTION_,        SbRtl_CDec                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CDbl",                          SbxDOUBLE,   1 | FUNCTION_,        SbRtl_CDbl                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CF_BITMAP",                     SbxINTEGER,      CPROP_,           SbRtl_CF_BITMAP            },
+{ u"CF_METAFILEPICT",               SbxINTEGER,      CPROP_,           SbRtl_CF_METAFILEPICT      },
+{ u"CF_TEXT",                       SbxINTEGER,      CPROP_,           SbRtl_CF_TEXT              },
+{ u"ChDir",                         SbxNULL,     1 | FUNCTION_,        SbRtl_ChDir                },
+    arg(u"string", SbxSTRING),
+
+{ u"ChDrive",                       SbxNULL,     1 | FUNCTION_,        SbRtl_ChDrive              },
+    arg(u"string", SbxSTRING),
+
+{ u"Choose",                        SbxVARIANT,  2 | FUNCTION_,        SbRtl_Choose               },
+    arg(u"Index",      SbxINTEGER),
+    arg(u"Expression", SbxVARIANT),
+
+{ u"Chr",                           SbxSTRING,   1 | FUNCTION_,        SbRtl_Chr                  },
+    arg(u"string", SbxINTEGER),
+
+{ u"ChrW",                          SbxSTRING,   1 | FUNCTION_ | COMPATONLY_, SbRtl_ChrW          },
+    arg(u"string", SbxINTEGER),
+
+{ u"CInt",                          SbxINTEGER,  1 | FUNCTION_,        SbRtl_CInt                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CLEAR_ALLTABS",                 SbxINTEGER,       CPROP_,          SbRtl_CLEAR_ALLTABS        },
+{ u"CLEAR_TAB",                     SbxINTEGER,       CPROP_,          SbRtl_CLEAR_TAB            },
+{ u"CLng",                          SbxLONG,     1 | FUNCTION_,        SbRtl_CLng                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CompatibilityMode",             SbxBOOL,     1 | FUNCTION_,        SbRtl_CompatibilityMode    },
+    arg(u"bEnable", SbxBOOL),
+
+{ u"ConvertFromUrl",                SbxSTRING,   1 | FUNCTION_,        SbRtl_ConvertFromUrl       },
+    arg(u"Url", SbxSTRING),
+
+{ u"ConvertToUrl",                  SbxSTRING,   1 | FUNCTION_,        SbRtl_ConvertToUrl         },
+    arg(u"SystemPath", SbxSTRING),
+
+{ u"Cos",                           SbxDOUBLE,   1 | FUNCTION_,        SbRtl_Cos                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"CreateObject",                  SbxOBJECT,   1 | FUNCTION_,        SbRtl_CreateObject         },
+    arg(u"class", SbxSTRING),
+
+{ u"CreateUnoListener",             SbxOBJECT,   2 | FUNCTION_,        SbRtl_CreateUnoListener    },
+    arg(u"prefix",   SbxSTRING),
+    arg(u"typename", SbxSTRING),
+
+{ u"CreateUnoDialog",               SbxOBJECT,   2 | FUNCTION_,        SbRtl_CreateUnoDialog      },
+    arg(u"dialoglibrary", SbxOBJECT),
+    arg(u"dialogname",    SbxSTRING),
+
+{ u"CreateUnoService",              SbxOBJECT,   1 | FUNCTION_,        SbRtl_CreateUnoService     },
+    arg(u"servicename", SbxSTRING),
+
+{ u"CreateUnoServiceWithArguments", SbxOBJECT, 2 | FUNCTION_, SbRtl_CreateUnoServiceWithArguments },
+    arg(u"servicename", SbxSTRING),
+    arg(u"arguments",   SbxARRAY),
+
+{ u"CreateUnoStruct",               SbxOBJECT,   1 | FUNCTION_,        SbRtl_CreateUnoStruct      },
+    arg(u"classname", SbxSTRING),
+
+{ u"CreateUnoValue",                SbxOBJECT,   2 | FUNCTION_,        SbRtl_CreateUnoValue       },
+    arg(u"type",  SbxSTRING),
+    arg(u"value", SbxVARIANT),
+
+{ u"CreatePropertySet",             SbxOBJECT,   1 | FUNCTION_,        SbRtl_CreatePropertySet    },
+    arg(u"values", SbxARRAY),
+
+{ u"CSng",                          SbxSINGLE,   1 | FUNCTION_,        SbRtl_CSng                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CStr",                          SbxSTRING,   1 | FUNCTION_,        SbRtl_CStr                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CurDir",                        SbxSTRING,   1 | FUNCTION_,        SbRtl_CurDir               },
+    arg(u"string", SbxSTRING),
+
+{ u"CVar",                          SbxVARIANT,  1 | FUNCTION_,        SbRtl_CVar                 },
+    arg(u"expression", SbxVARIANT),
+
+{ u"CVErr",                         SbxVARIANT,  1 | FUNCTION_,        SbRtl_CVErr                },
+    arg(u"expression", SbxVARIANT),
+
+{ u"DDB",                           SbxDOUBLE,   5 | FUNCTION_ | COMPATONLY_, SbRtl_DDB           },
+    arg(u"Cost",    SbxDOUBLE),
+    arg(u"Salvage", SbxDOUBLE),
+    arg(u"Life",    SbxDOUBLE),
+    arg(u"Period",  SbxDOUBLE),
+    arg(u"Factor",  SbxVARIANT, OPT_),
+
+{ u"Date",                          SbxDATE,         LFUNCTION_,       SbRtl_Date                 },
+{ u"DateAdd",                       SbxDATE,     3 | FUNCTION_,        SbRtl_DateAdd              },
+    arg(u"Interval", SbxSTRING),
+    arg(u"Number",   SbxLONG),
+    arg(u"Date",     SbxDATE),
+
+{ u"DateDiff",                      SbxDOUBLE,   5 | FUNCTION_,        SbRtl_DateDiff             },
+    arg(u"Interval",        SbxSTRING),
+    arg(u"Date1",           SbxDATE),
+    arg(u"Date2",           SbxDATE),
+    arg(u"Firstdayofweek",  SbxINTEGER, OPT_),
+    arg(u"Firstweekofyear", SbxINTEGER, OPT_),
+
+{ u"DatePart",                      SbxLONG,     4 | FUNCTION_,        SbRtl_DatePart             },
+    arg(u"Interval",        SbxSTRING),
+    arg(u"Date",            SbxDATE),
+    arg(u"Firstdayofweek",  SbxINTEGER, OPT_),
+    arg(u"Firstweekofyear", SbxINTEGER, OPT_),
+
+{ u"DateSerial",                    SbxDATE,     3 | FUNCTION_,        SbRtl_DateSerial           },
+    arg(u"Year",  SbxINTEGER),
+    arg(u"Month", SbxINTEGER),
+    arg(u"Day",   SbxINTEGER),
+
+{ u"DateValue",                     SbxDATE,     1 | FUNCTION_,        SbRtl_DateValue            },
+    arg(u"String", SbxSTRING),
+
+{ u"Day",                           SbxINTEGER,  1 | FUNCTION_,        SbRtl_Day                  },
+    arg(u"Date", SbxDATE),
+
+{ u"Ddeexecute",                    SbxNULL,     2 | FUNCTION_,        SbRtl_DDEExecute           },
+    arg(u"Channel", SbxLONG),
+    arg(u"Command", SbxSTRING),
+
+{ u"Ddeinitiate",                   SbxINTEGER,  2 | FUNCTION_,        SbRtl_DDEInitiate          },
+    arg(u"Application", SbxSTRING),
+    arg(u"Topic",       SbxSTRING),
+
+{ u"Ddepoke",                       SbxNULL,     3 | FUNCTION_,        SbRtl_DDEPoke              },
+    arg(u"Channel", SbxLONG),
+    arg(u"Item",    SbxSTRING),
+    arg(u"Data",    SbxSTRING),
+
+{ u"Dderequest",                    SbxSTRING,   2 | FUNCTION_,        SbRtl_DDERequest           },
+    arg(u"Channel", SbxLONG),
+    arg(u"Item",    SbxSTRING),
+
+{ u"Ddeterminate",                  SbxNULL,     1 | FUNCTION_,        SbRtl_DDETerminate         },
+    arg(u"Channel", SbxLONG),
+
+{ 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_),
+
+{ u"DoEvents",                      SbxINTEGER,      FUNCTION_,        SbRtl_DoEvents             },
+{ u"DumpAllObjects",                SbxEMPTY,    2 | SUB_,             SbRtl_DumpAllObjects       },
+    arg(u"FileSpec", SbxSTRING),
+    arg(u"DumpAll",  SbxINTEGER, OPT_),
+
+{ u"Empty",                         SbxVARIANT,      CPROP_,           SbRtl_Empty                },
+{ u"EqualUnoObjects",               SbxBOOL,     2 | FUNCTION_,        SbRtl_EqualUnoObjects      },
+    arg(u"Variant", SbxVARIANT),
+    arg(u"Variant", SbxVARIANT),
+
+{ u"EnableReschedule",              SbxNULL,     1 | FUNCTION_,        SbRtl_EnableReschedule     },
+    arg(u"bEnable", SbxBOOL),
+
+{ u"Environ",                       SbxSTRING,   1 | FUNCTION_,        SbRtl_Environ              },
+    arg(u"Environmentstring", SbxSTRING),
+
+{ u"EOF",                           SbxBOOL,     1 | FUNCTION_,        SbRtl_EOF                  },
+    arg(u"Channel", SbxINTEGER),
+
+{ u"Erl",                           SbxLONG,         ROPROP_,          SbRtl_Erl                  },
+{ u"Err",                           SbxVARIANT,      RWPROP_,          SbRtl_Err                  },
+{ u"Error",                         SbxSTRING,   1 | FUNCTION_,        SbRtl_Error                },
+    arg(u"code", SbxLONG),
+
+{ u"Exp",                           SbxDOUBLE,   1 | FUNCTION_,        SbRtl_Exp                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"False",                         SbxBOOL,         CPROP_,           SbRtl_False                },
+{ u"FileAttr",                      SbxINTEGER,  2 | FUNCTION_,        SbRtl_FileAttr             },
+    arg(u"Channel",    SbxINTEGER),
+    arg(u"Attributes", SbxINTEGER),
+
+{ u"FileCopy",                      SbxNULL,     2 | FUNCTION_,        SbRtl_FileCopy             },
+    arg(u"Source",      SbxSTRING),
+    arg(u"Destination", SbxSTRING),
+
+{ u"FileDateTime",                  SbxSTRING,   1 | FUNCTION_,        SbRtl_FileDateTime         },
+    arg(u"filename", SbxSTRING),
+
+{ u"FileExists",                    SbxBOOL,     1 | FUNCTION_,        SbRtl_FileExists           },
+    arg(u"filename", SbxSTRING),
+
+{ u"FileLen",                       SbxLONG,     1 | FUNCTION_,        SbRtl_FileLen              },
+    arg(u"filename", SbxSTRING),
+
+{ u"FindObject",                    SbxOBJECT,   1 | FUNCTION_,        SbRtl_FindObject           },
+    arg(u"Name", SbxSTRING),
+
+{ u"FindPropertyObject",            SbxOBJECT,   2 | FUNCTION_,        SbRtl_FindPropertyObject   },
+    arg(u"Object", SbxOBJECT),
+    arg(u"Name",   SbxSTRING),
+
+{ u"Fix",                           SbxDOUBLE,   1 | FUNCTION_,        SbRtl_Fix                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"Format",                        SbxSTRING,   2 | FUNCTION_,        SbRtl_Format               },
+    arg(u"expression", SbxVARIANT),
+    arg(u"format",     SbxSTRING, OPT_),
+
+{ u"FormatDateTime",                SbxSTRING,   2 | FUNCTION_ | COMPATONLY_, SbRtl_FormatDateTime},
+    arg(u"Date",        SbxDATE),
+    arg(u"NamedFormat", SbxINTEGER, OPT_),
+
+{ u"FormatNumber",                  SbxSTRING,   5 | FUNCTION_ | COMPATONLY_, SbRtl_FormatNumber  },
+    arg(u"expression",                  SbxDOUBLE),
+    arg(u"numDigitsAfterDecimal",       SbxINTEGER, OPT_),
+    arg(u"includeLeadingDigit",         SbxINTEGER, OPT_), // vbTriState
+    arg(u"useParensForNegativeNumbers", SbxINTEGER, OPT_), // vbTriState
+    arg(u"groupDigits",                 SbxINTEGER, OPT_), // vbTriState
+
+{ u"Frac",                          SbxDOUBLE,   1 | FUNCTION_,        SbRtl_Frac                 },
+    arg(u"number", SbxDOUBLE),
+
+{ u"FRAMEANCHORCHAR",               SbxINTEGER,      CPROP_,           SbRtl_FRAMEANCHORCHAR      },
+{ u"FRAMEANCHORPAGE",               SbxINTEGER,      CPROP_,           SbRtl_FRAMEANCHORPAGE      },
+{ u"FRAMEANCHORPARA",               SbxINTEGER,      CPROP_,           SbRtl_FRAMEANCHORPARA      },
+{ u"FreeFile",                      SbxINTEGER,      FUNCTION_,        SbRtl_FreeFile             },
+{ u"FreeLibrary",                   SbxNULL,     1 | FUNCTION_,        SbRtl_FreeLibrary          },
+    arg(u"Modulename", SbxSTRING),
+
+{ u"FV",                            SbxDOUBLE,   5 | FUNCTION_ | COMPATONLY_, SbRtl_FV            },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"NPer", SbxDOUBLE),
+    arg(u"Pmt",  SbxDOUBLE),
+    arg(u"PV",   SbxVARIANT, OPT_),
+    arg(u"Due",  SbxVARIANT, OPT_),
+
+{ u"Get",                           SbxNULL,     3 | FUNCTION_,        SbRtl_Get                  },
+    arg(u"filenumber",   SbxINTEGER),
+    arg(u"recordnumber", SbxLONG),
+    arg(u"variablename", SbxVARIANT),
+
+{ u"GetAttr",                       SbxINTEGER,  1 | FUNCTION_,        SbRtl_GetAttr              },
+    arg(u"filename", SbxSTRING),
+
+{ u"GetDefaultContext",             SbxOBJECT,   0 | FUNCTION_,        SbRtl_GetDefaultContext    },
+{ u"GetDialogZoomFactorX",          SbxDOUBLE,       FUNCTION_,        SbRtl_GetDialogZoomFactorX },
+{ u"GetDialogZoomFactorY",          SbxDOUBLE,       FUNCTION_,        SbRtl_GetDialogZoomFactorY },
+{ u"GetGUIType",                    SbxINTEGER,      FUNCTION_,        SbRtl_GetGUIType           },
+{ u"GetGUIVersion",                 SbxLONG,         FUNCTION_,        SbRtl_GetGUIVersion        },
+{ u"GetPathSeparator",              SbxSTRING,       FUNCTION_,        SbRtl_GetPathSeparator     },
+{ u"GetProcessServiceManager",      SbxOBJECT,   0 | FUNCTION_,    SbRtl_GetProcessServiceManager },
+{ u"GetSolarVersion",               SbxLONG,         FUNCTION_,        SbRtl_GetSolarVersion      },
+{ u"GetSystemTicks",                SbxLONG,         FUNCTION_,        SbRtl_GetSystemTicks       },
+{ u"GetSystemType",                 SbxINTEGER,      FUNCTION_,        SbRtl_GetSystemType        },
+{ u"GlobalScope",                   SbxOBJECT,       FUNCTION_,        SbRtl_GlobalScope          },
+{ u"Green",                         SbxINTEGER,  1 | FUNCTION_ | NORMONLY_, SbRtl_Green           },
+    arg(u"RGB-Value", SbxLONG),
+
+{ u"HasUnoInterfaces",              SbxBOOL,     1 | FUNCTION_,        SbRtl_HasUnoInterfaces     },
+    arg(u"InterfaceName", SbxSTRING),
+
+{ u"Hex",                           SbxSTRING,   1 | FUNCTION_,        SbRtl_Hex                  },
+    arg(u"number", SbxLONG),
+
+{ u"Hour",                          SbxINTEGER,  1 | FUNCTION_,        SbRtl_Hour                 },
+    arg(u"Date", SbxDATE),
+
+{ u"IDABORT",                       SbxINTEGER,      CPROP_,           SbRtl_IDABORT              },
+{ u"IDCANCEL",                      SbxINTEGER,      CPROP_,           SbRtl_IDCANCEL             },
+{ u"IDNO",                          SbxINTEGER,      CPROP_,           SbRtl_IDNO                 },
+{ u"IDOK",                          SbxINTEGER,      CPROP_,           SbRtl_IDOK                 },
+{ u"IDRETRY",                       SbxINTEGER,      CPROP_,           SbRtl_IDRETRY              },
+{ u"IDYES",                         SbxINTEGER,      CPROP_,           SbRtl_IDYES                },
+
+{ u"Iif",                           SbxVARIANT,   3 | FUNCTION_,       SbRtl_Iif                  },
+    arg(u"Bool",     SbxBOOL),
+    arg(u"Variant1", SbxVARIANT),
+    arg(u"Variant2", SbxVARIANT),
+
+{ u"Input",                         SbxSTRING,    2 | FUNCTION_ | COMPATONLY_, SbRtl_Input        },
+    arg(u"Number",     SbxLONG),
+    arg(u"FileNumber", SbxLONG),
 
+{ u"InputBox",                      SbxSTRING,    5 | FUNCTION_,       SbRtl_InputBox             },
+    arg(u"Prompt",    SbxSTRING),
+    arg(u"Title",     SbxSTRING, OPT_),
+    arg(u"Default",   SbxSTRING, OPT_),
+    arg(u"XPosTwips", SbxLONG,   OPT_),
+    arg(u"YPosTwips", SbxLONG,   OPT_),
+
+{ u"InStr",                         SbxLONG,      4 | FUNCTION_,       SbRtl_InStr                },
+    arg(u"Start",   SbxSTRING,  OPT_),
+    arg(u"String1", SbxSTRING),
+    arg(u"String2", SbxSTRING),
+    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_),
+
+{ u"Int",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Int                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"IPmt",                          SbxDOUBLE,    6 | FUNCTION_ | COMPATONLY_, SbRtl_IPmt         },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"Per",  SbxDOUBLE),
+    arg(u"NPer", SbxDOUBLE),
+    arg(u"PV",   SbxDOUBLE),
+    arg(u"FV",   SbxVARIANT, OPT_),
+    arg(u"Due",  SbxVARIANT, OPT_),
+
+{ u"IRR",                           SbxDOUBLE,    2 | FUNCTION_ | COMPATONLY_, SbRtl_IRR          },
+    arg(u"ValueArray", SbxARRAY),
+    arg(u"Guess", SbxVARIANT, OPT_),
+
+{ u"IsArray",                       SbxBOOL,      1 | FUNCTION_,       SbRtl_IsArray              },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsDate",                        SbxBOOL,      1 | FUNCTION_,       SbRtl_IsDate               },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsEmpty",                       SbxBOOL,      1 | FUNCTION_,       SbRtl_IsEmpty              },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsError",                       SbxBOOL,      1 | FUNCTION_,       SbRtl_IsError              },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsMissing",                     SbxBOOL,      1 | FUNCTION_,       SbRtl_IsMissing            },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsNull",                        SbxBOOL,      1 | FUNCTION_,       SbRtl_IsNull               },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsNumeric",                     SbxBOOL,      1 | FUNCTION_,       SbRtl_IsNumeric            },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsObject",                      SbxBOOL,      1 | FUNCTION_,       SbRtl_IsObject             },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"IsUnoStruct",                   SbxBOOL,      1 | FUNCTION_,       SbRtl_IsUnoStruct          },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"Join",                          SbxSTRING,    2 | FUNCTION_,       SbRtl_Join                 },
+    arg(u"list",      SbxOBJECT),
+    arg(u"delimiter", SbxSTRING),
+
+{ u"Kill",                          SbxNULL,      1 | FUNCTION_,       SbRtl_Kill                 },
+    arg(u"filespec", SbxSTRING),
+
+{ u"LBound",                        SbxLONG,      1 | FUNCTION_,       SbRtl_LBound               },
+    arg(u"Variant", SbxVARIANT),
+
+{ u"LCase",                         SbxSTRING,    1 | FUNCTION_,       SbRtl_LCase                },
+    arg(u"string", SbxSTRING),
+
+{ u"Left",                          SbxSTRING,    2 | FUNCTION_,       SbRtl_Left                 },
+    arg(u"String", SbxSTRING),
+    arg(u"Count",  SbxLONG),
+
+{ u"Len",                           SbxLONG,      1 | FUNCTION_,       SbRtl_Len                  },
+    arg(u"StringOrVariant", SbxVARIANT),
+
+{ u"LenB",                          SbxLONG,      1 | FUNCTION_,       SbRtl_Len                  },
+    arg(u"StringOrVariant", SbxVARIANT),
+
+{ u"Load",                          SbxNULL,      1 | FUNCTION_,       SbRtl_Load                 },
+    arg(u"object", SbxOBJECT),
+
+{ u"LoadPicture",                   SbxOBJECT,    1 | FUNCTION_,       SbRtl_LoadPicture          },
+    arg(u"string", SbxSTRING),
+
+{ u"Loc",                           SbxLONG,      1 | FUNCTION_,       SbRtl_Loc                  },
+    arg(u"Channel", SbxINTEGER),
+
+{ u"Lof",                           SbxLONG,      1 | FUNCTION_,       SbRtl_Lof                  },
+    arg(u"Channel", SbxINTEGER),
+
+{ u"Log",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Log                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"LTrim",                         SbxSTRING,    1 | FUNCTION_,       SbRtl_LTrim                },
+    arg(u"string", SbxSTRING),
+
+{ u"MB_ABORTRETRYIGNORE",           SbxINTEGER,       CPROP_,          SbRtl_MB_ABORTRETRYIGNORE  },
+{ u"MB_APPLMODAL",                  SbxINTEGER,       CPROP_,          SbRtl_MB_APPLMODAL         },
+{ u"MB_DEFBUTTON1",                 SbxINTEGER,       CPROP_,          SbRtl_MB_DEFBUTTON1        },
+{ u"MB_DEFBUTTON2",                 SbxINTEGER,       CPROP_,          SbRtl_MB_DEFBUTTON2        },
+{ u"MB_DEFBUTTON3",                 SbxINTEGER,       CPROP_,          SbRtl_MB_DEFBUTTON3        },
+{ u"MB_ICONEXCLAMATION",            SbxINTEGER,       CPROP_,          SbRtl_MB_ICONEXCLAMATION   },
+{ u"MB_ICONINFORMATION",            SbxINTEGER,       CPROP_,          SbRtl_MB_ICONINFORMATION   },
+{ u"MB_ICONQUESTION",               SbxINTEGER,       CPROP_,          SbRtl_MB_ICONQUESTION      },
+{ u"MB_ICONSTOP",                   SbxINTEGER,       CPROP_,          SbRtl_MB_ICONSTOP          },
+{ u"MB_OK",                         SbxINTEGER,       CPROP_,          SbRtl_MB_OK                },
+{ u"MB_OKCANCEL",                   SbxINTEGER,       CPROP_,          SbRtl_MB_OKCANCEL          },
+{ u"MB_RETRYCANCEL",                SbxINTEGER,       CPROP_,          SbRtl_MB_RETRYCANCEL       },
+{ u"MB_SYSTEMMODAL",                SbxINTEGER,       CPROP_,          SbRtl_MB_SYSTEMMODAL       },
+{ u"MB_YESNO",                      SbxINTEGER,       CPROP_,          SbRtl_MB_YESNO             },
+{ u"MB_YESNOCANCEL",                SbxINTEGER,       CPROP_,          SbRtl_MB_YESNOCANCEL       },
+
+{ 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_),
+
+{ u"Minute",                        SbxINTEGER,   1 | FUNCTION_,       SbRtl_Minute               },
+    arg(u"Date", SbxDATE),
+
+{ u"MIRR",                          SbxDOUBLE,    3 | FUNCTION_ | COMPATONLY_, SbRtl_MIRR         },
+    arg(u"ValueArray",   SbxARRAY),
+    arg(u"FinanceRate",  SbxDOUBLE),
+    arg(u"ReinvestRate", SbxDOUBLE),
+
+{ u"MkDir",                         SbxNULL,      1 | FUNCTION_,       SbRtl_MkDir                },
+    arg(u"pathname", SbxSTRING),
+
+{ u"Month",                         SbxINTEGER,   1 | FUNCTION_,       SbRtl_Month                },
+    arg(u"Date", SbxDATE),
+
+{ u"MonthName",                     SbxSTRING,    2 | FUNCTION_ | COMPATONLY_, SbRtl_MonthName    },
+    arg(u"Month",      SbxINTEGER),
+    arg(u"Abbreviate", SbxBOOL, OPT_),
+
+{ u"MsgBox",                        SbxINTEGER,   5 | FUNCTION_,       SbRtl_MsgBox               },
+    arg(u"Prompt",   SbxSTRING),
+    arg(u"Buttons",  SbxINTEGER, OPT_),
+    arg(u"Title",    SbxSTRING,  OPT_),
+    arg(u"Helpfile", SbxSTRING,  OPT_),
+    arg(u"Context",  SbxINTEGER, OPT_),
+
+{ u"Nothing",                       SbxOBJECT,        CPROP_,          SbRtl_Nothing              },
+{ u"Now",                           SbxDATE,          FUNCTION_,       SbRtl_Now                  },
+{ u"NPer",                          SbxDOUBLE,    5 | FUNCTION_ | COMPATONLY_, SbRtl_NPer         },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"Pmt",  SbxDOUBLE),
+    arg(u"PV",   SbxDOUBLE),
+    arg(u"FV",   SbxVARIANT, OPT_),
+    arg(u"Due",  SbxVARIANT, OPT_),
+
+{ u"NPV",                           SbxDOUBLE,    2 | FUNCTION_ | COMPATONLY_, SbRtl_NPV          },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"ValueArray", SbxARRAY),
+
+{ u"Null",                          SbxNULL,          CPROP_,          SbRtl_Null                 },
+
+{ u"Oct",                           SbxSTRING,    1 | FUNCTION_,       SbRtl_Oct                  },
+    arg(u"number", SbxLONG),
+
+{ u"Partition",                     SbxSTRING,    4 | FUNCTION_,       SbRtl_Partition            },
+    arg(u"number",   SbxLONG),
+    arg(u"start",    SbxLONG),
+    arg(u"stop",     SbxLONG),
+    arg(u"interval", SbxLONG),
+
+{ u"Pi",                            SbxDOUBLE,        CPROP_,          SbRtl_PI                   },
+
+{ u"Pmt",                           SbxDOUBLE,    5 | FUNCTION_ | COMPATONLY_, SbRtl_Pmt          },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"NPer", SbxDOUBLE),
+    arg(u"PV",   SbxDOUBLE),
+    arg(u"FV",   SbxVARIANT, OPT_),
+    arg(u"Due",  SbxVARIANT, OPT_),
+
+{ u"PPmt",                          SbxDOUBLE,    6 | FUNCTION_ | COMPATONLY_, SbRtl_PPmt         },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"Per",  SbxDOUBLE),
+    arg(u"NPer", SbxDOUBLE),
+    arg(u"PV",   SbxDOUBLE),
+    arg(u"FV",   SbxVARIANT, OPT_),
+    arg(u"Due",  SbxVARIANT, OPT_),
+
+{ u"Put",                           SbxNULL,      3 | FUNCTION_,       SbRtl_Put                  },
+    arg(u"filenumber",   SbxINTEGER),
+    arg(u"recordnumber", SbxLONG),
+    arg(u"variablename", SbxVARIANT),
+
+{ u"PV",                            SbxDOUBLE,    5 | FUNCTION_ | COMPATONLY_, SbRtl_PV           },
+    arg(u"Rate", SbxDOUBLE),
+    arg(u"NPer", SbxDOUBLE),
+    arg(u"Pmt",  SbxDOUBLE),
+    arg(u"FV",   SbxVARIANT, OPT_),
+    arg(u"Due",  SbxVARIANT, OPT_),
+
+{ u"QBColor",                       SbxLONG,      1 | FUNCTION_,       SbRtl_QBColor              },
+    arg(u"number", SbxINTEGER),
+
+{ u"Randomize",                     SbxNULL,      1 | FUNCTION_,       SbRtl_Randomize            },
+    arg(u"Number", SbxDOUBLE, OPT_),
+
+{ u"Rate",                          SbxDOUBLE,    6 | FUNCTION_ | COMPATONLY_, SbRtl_Rate         },
+    arg(u"NPer",  SbxDOUBLE),
+    arg(u"Pmt",   SbxDOUBLE),
+    arg(u"PV",    SbxDOUBLE),
+    arg(u"FV",    SbxVARIANT, OPT_),
+    arg(u"Due",   SbxVARIANT, OPT_),
+    arg(u"Guess", SbxVARIANT, OPT_),
+
+{ u"Red",                           SbxINTEGER,   1 | FUNCTION_ | NORMONLY_, SbRtl_Red            },
+    arg(u"RGB-Value", SbxLONG),
+
+{ u"Reset",                         SbxNULL,      0 | FUNCTION_,       SbRtl_Reset                },
+{ u"ResolvePath",                   SbxSTRING,    1 | FUNCTION_,       SbRtl_ResolvePath          },
+    arg(u"Path", SbxSTRING),
+
+{ u"RGB",                           SbxLONG,      3 | FUNCTION_,       SbRtl_RGB                  },
+    arg(u"Red",   SbxINTEGER),
+    arg(u"Green", SbxINTEGER),
+    arg(u"Blue",  SbxINTEGER),
+
+{ u"Replace",                       SbxSTRING,    6 | FUNCTION_,       SbRtl_Replace              },
+    arg(u"Expression", SbxSTRING),
+    arg(u"Find",       SbxSTRING),
+    arg(u"Replace",    SbxSTRING),
+    arg(u"Start",      SbxINTEGER, OPT_),
+    arg(u"Count",      SbxINTEGER, OPT_),
+    arg(u"Compare",    SbxINTEGER, OPT_),
+
+{ u"Right",                         SbxSTRING,    2 | FUNCTION_,       SbRtl_Right                },
+    arg(u"String", SbxSTRING),
+    arg(u"Count",  SbxLONG),
+
+{ u"RmDir",                         SbxNULL,      1 | FUNCTION_,       SbRtl_RmDir                },
+    arg(u"pathname", SbxSTRING),
+
+{ u"Round",                         SbxDOUBLE,    2 | FUNCTION_ | COMPATONLY_, SbRtl_Round        },
+    arg(u"Expression",       SbxDOUBLE),
+    arg(u"Numdecimalplaces", SbxINTEGER, OPT_),
+
+{ u"Rnd",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Rnd                  },
+    arg(u"Number", SbxDOUBLE, OPT_),
+
+{ u"RTL",                           SbxOBJECT,    0 | FUNCTION_ | COMPATONLY_, SbRtl_RTL          },
+{ u"RTrim",                         SbxSTRING,    1 | FUNCTION_,       SbRtl_RTrim                },
+    arg(u"string", SbxSTRING),
+
+{ u"SavePicture",                   SbxNULL,      2 | FUNCTION_,       SbRtl_SavePicture          },
+    arg(u"object", SbxOBJECT),
+    arg(u"string", SbxSTRING),
+
+{ u"Second",                        SbxINTEGER,   1 | FUNCTION_,       SbRtl_Second               },
+    arg(u"Date", SbxDATE),
+
+{ u"Seek",                          SbxLONG,      1 | FUNCTION_,       SbRtl_Seek                 },
+    arg(u"Channel", SbxINTEGER),
+
+{ u"SendKeys",                      SbxNULL,      2 | FUNCTION_,       SbRtl_SendKeys             },
+    arg(u"String", SbxSTRING),
+    arg(u"Wait",   SbxBOOL, OPT_),
+
+{ u"SetAttr",                       SbxNULL,      2 | FUNCTION_,       SbRtl_SetAttr              },
+    arg(u"File",       SbxSTRING),
+    arg(u"Attributes", SbxINTEGER),
+
+{ u"SET_OFF",                       SbxINTEGER,       CPROP_,          SbRtl_SET_OFF              },
+{ u"SET_ON",                        SbxINTEGER,       CPROP_,          SbRtl_SET_ON               },
+{ u"SET_TAB",                       SbxINTEGER,       CPROP_,          SbRtl_SET_TAB              },
+{ u"Sgn",                           SbxINTEGER,   1 | FUNCTION_,       SbRtl_Sgn                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"Shell",                         SbxLONG,      2 | FUNCTION_,       SbRtl_Shell                },
+    arg(u"Commandstring", SbxSTRING),
+    arg(u"WindowStyle",   SbxINTEGER, OPT_),
+
+{ u"Sin",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Sin                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"SLN",                           SbxDOUBLE,    3 |  FUNCTION_ | COMPATONLY_, SbRtl_SLN         },
+    arg(u"Cost",   SbxDOUBLE),
+    arg(u"Double", SbxDOUBLE),
+    arg(u"Life",   SbxDOUBLE),
+
+{ u"SYD",                           SbxDOUBLE,    4 |  FUNCTION_ | COMPATONLY_, SbRtl_SYD         },
+    arg(u"Cost",    SbxDOUBLE),
+    arg(u"Salvage", SbxDOUBLE),
+    arg(u"Life",    SbxDOUBLE),
+    arg(u"Period",  SbxDOUBLE),
+
+{ u"Space",                         SbxSTRING,    1 | FUNCTION_,       SbRtl_Space                },
+    arg(u"string", SbxLONG),
+
+{ u"Spc",                           SbxSTRING,    1 | FUNCTION_,       SbRtl_Spc                  },
+    arg(u"Count", SbxLONG),
+
+{ u"Split",                         SbxOBJECT,    3 | FUNCTION_,       SbRtl_Split                },
+    arg(u"expression", SbxSTRING),
+    arg(u"delimiter",  SbxSTRING),
+    arg(u"count",      SbxLONG),
+
+{ u"Sqr",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Sqr                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"Str",                           SbxSTRING,    1 | FUNCTION_,       SbRtl_Str                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"StrComp",                       SbxINTEGER,   3 | FUNCTION_,       SbRtl_StrComp              },
+    arg(u"String1", SbxSTRING),
+    arg(u"String2", SbxSTRING),
+    arg(u"Compare", SbxINTEGER, OPT_),
+
+{ u"StrConv",                       SbxOBJECT,    3 | FUNCTION_,       SbRtl_StrConv              },
+    arg(u"String",     SbxSTRING),
+    arg(u"Conversion", SbxSTRING),
+    arg(u"LCID",       SbxINTEGER, OPT_),
+
+{ u"String",                        SbxSTRING,    2 | FUNCTION_,       SbRtl_String               },
+    arg(u"Count",  SbxLONG),
+    arg(u"Filler", SbxVARIANT),
+
+{ u"StrReverse",                    SbxSTRING,    1 | FUNCTION_ | COMPATONLY_, SbRtl_StrReverse   },
+    arg(u"String1", SbxSTRING),
+
+{ u"Switch",                        SbxVARIANT,   2 | FUNCTION_,       SbRtl_Switch               },
+    arg(u"Expression", SbxVARIANT),
+    arg(u"Value",      SbxVARIANT),
+
+{ u"Tab",                           SbxSTRING,    1 | FUNCTION_,       SbRtl_Tab                  },
+    arg(u"Count", SbxLONG),
+
+{ u"Tan",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Tan                  },
+    arg(u"number", SbxDOUBLE),
+
+{ u"Time",                          SbxVARIANT,       LFUNCTION_,      SbRtl_Time                 },
+{ u"Timer",                         SbxDATE,          FUNCTION_,       SbRtl_Timer                },
+{ u"TimeSerial",                    SbxDATE,      3 | FUNCTION_,       SbRtl_TimeSerial           },
+    arg(u"Hour",   SbxLONG),
+    arg(u"Minute", SbxLONG),
+    arg(u"Second", SbxLONG),
+
+{ u"TimeValue",                     SbxDATE,      1 | FUNCTION_,       SbRtl_TimeValue            },
+    arg(u"String", SbxSTRING),
+
+{ u"TOGGLE",                        SbxINTEGER,       CPROP_,          SbRtl_TOGGLE               },
+{ u"Trim",                          SbxSTRING,    1 | FUNCTION_,       SbRtl_Trim                 },
+    arg(u"String", SbxSTRING),
+
+{ u"True",                          SbxBOOL,          CPROP_,          SbRtl_True                 },
+{ u"TwipsPerPixelX",                SbxLONG,          FUNCTION_,       SbRtl_TwipsPerPixelX       },
+{ u"TwipsPerPixelY",                SbxLONG,          FUNCTION_,       SbRtl_TwipsPerPixelY       },
+
+{ u"TYP_AUTHORFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_AUTHORFLD        },
+{ u"TYP_CHAPTERFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_CHAPTERFLD       },
+{ u"TYP_CONDTXTFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_CONDTXTFLD       },
+{ u"TYP_DATEFLD",                   SbxINTEGER,       CPROP_,          SbRtl_TYP_DATEFLD          },
+{ u"TYP_DBFLD",                     SbxINTEGER,       CPROP_,          SbRtl_TYP_DBFLD            },
+{ u"TYP_DBNAMEFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_DBNAMEFLD        },
+{ u"TYP_DBNEXTSETFLD",              SbxINTEGER,       CPROP_,          SbRtl_TYP_DBNEXTSETFLD     },
+{ u"TYP_DBNUMSETFLD",               SbxINTEGER,       CPROP_,          SbRtl_TYP_DBNUMSETFLD      },
+{ u"TYP_DBSETNUMBERFLD",            SbxINTEGER,       CPROP_,          SbRtl_TYP_DBSETNUMBERFLD   },
+{ u"TYP_DDEFLD",                    SbxINTEGER,       CPROP_,          SbRtl_TYP_DDEFLD           },
+{ u"TYP_DOCINFOFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_DOCINFOFLD       },
+{ u"TYP_DOCSTATFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_DOCSTATFLD       },
+{ u"TYP_EXTUSERFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_EXTUSERFLD       },
+{ u"TYP_FILENAMEFLD",               SbxINTEGER,       CPROP_,          SbRtl_TYP_FILENAMEFLD      },
+{ u"TYP_FIXDATEFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_FIXDATEFLD       },
+{ u"TYP_FIXTIMEFLD",                SbxINTEGER,       CPROP_,          SbRtl_TYP_FIXTIMEFLD       },
+{ u"TYP_FORMELFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_FORMELFLD        },
+{ u"TYP_GETFLD",                    SbxINTEGER,       CPROP_,          SbRtl_TYP_GETFLD           },
+{ u"TYP_GETREFFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_GETREFFLD        },
+{ u"TYP_GETREFPAGEFLD",             SbxINTEGER,       CPROP_,          SbRtl_TYP_GETREFPAGEFLD    },
+{ u"TYP_HIDDENPARAFLD",             SbxINTEGER,       CPROP_,          SbRtl_TYP_HIDDENPARAFLD    },
+{ u"TYP_HIDDENTXTFLD",              SbxINTEGER,       CPROP_,          SbRtl_TYP_HIDDENTXTFLD     },
+{ u"TYP_INPUTFLD",                  SbxINTEGER,       CPROP_,          SbRtl_TYP_INPUTFLD         },
+{ u"TYP_INTERNETFLD",               SbxINTEGER,       CPROP_,          SbRtl_TYP_INTERNETFLD      },
+{ u"TYP_JUMPEDITFLD",               SbxINTEGER,       CPROP_,          SbRtl_TYP_JUMPEDITFLD      },
+{ u"TYP_MACROFLD",                  SbxINTEGER,       CPROP_,          SbRtl_TYP_MACROFLD         },
+{ u"TYP_NEXTPAGEFLD",               SbxINTEGER,       CPROP_,          SbRtl_TYP_NEXTPAGEFLD      },
+{ u"TYP_PAGENUMBERFLD",             SbxINTEGER,       CPROP_,          SbRtl_TYP_PAGENUMBERFLD    },
+{ u"TYP_POSTITFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_POSTITFLD        },
+{ u"TYP_PREVPAGEFLD",               SbxINTEGER,       CPROP_,          SbRtl_TYP_PREVPAGEFLD      },
+{ u"TYP_SEQFLD",                    SbxINTEGER,       CPROP_,          SbRtl_TYP_SEQFLD           },
+{ u"TYP_SETFLD",                    SbxINTEGER,       CPROP_,          SbRtl_TYP_SETFLD           },
+{ u"TYP_SETINPFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_SETINPFLD        },
+{ u"TYP_SETREFFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_SETREFFLD        },
+{ u"TYP_SETREFPAGEFLD",             SbxINTEGER,       CPROP_,          SbRtl_TYP_SETREFPAGEFLD    },
+{ u"TYP_TEMPLNAMEFLD",              SbxINTEGER,       CPROP_,          SbRtl_TYP_TEMPLNAMEFLD     },
+{ u"TYP_TIMEFLD",                   SbxINTEGER,       CPROP_,          SbRtl_TYP_TIMEFLD          },
+{ u"TYP_USERFLD",                   SbxINTEGER,       CPROP_,          SbRtl_TYP_USERFLD          },
+{ u"TYP_USRINPFLD",                 SbxINTEGER,       CPROP_,          SbRtl_TYP_USRINPFLD        },
+
+{ u"TypeLen",                       SbxINTEGER,   1 | FUNCTION_,       SbRtl_TypeLen              },
+    arg(u"Var", SbxVARIANT),
+
+{ u"TypeName",                      SbxSTRING,    1 | FUNCTION_,       SbRtl_TypeName             },
+    arg(u"Var", SbxVARIANT),
+
+{ u"UBound",                        SbxLONG,      1 | FUNCTION_,       SbRtl_UBound               },
+    arg(u"Var", SbxVARIANT),
+
+{ u"UCase",                         SbxSTRING,    1 | FUNCTION_,       SbRtl_UCase                },
+    arg(u"String", SbxSTRING),
+
+{ u"Unload",                        SbxNULL,      1 | FUNCTION_,       SbRtl_Unload               },
+    arg(u"Dialog", SbxOBJECT),
+
+{ u"Val",                           SbxDOUBLE,    1 | FUNCTION_,       SbRtl_Val                  },
+    arg(u"String", SbxSTRING),
+
+{ u"VarType",                       SbxINTEGER,   1 | FUNCTION_,       SbRtl_VarType              },
+    arg(u"Var", SbxVARIANT),
+
+{ u"V_EMPTY",                       SbxINTEGER,       CPROP_,          SbRtl_V_EMPTY              },
+{ u"V_NULL",                        SbxINTEGER,       CPROP_,          SbRtl_V_NULL               },
+{ u"V_INTEGER",                     SbxINTEGER,       CPROP_,          SbRtl_V_INTEGER            },
+{ u"V_LONG",                        SbxINTEGER,       CPROP_,          SbRtl_V_LONG               },
+{ u"V_SINGLE",                      SbxINTEGER,       CPROP_,          SbRtl_V_SINGLE             },
+{ u"V_DOUBLE",                      SbxINTEGER,       CPROP_,          SbRtl_V_DOUBLE             },
+{ u"V_CURRENCY",                    SbxINTEGER,       CPROP_,          SbRtl_V_CURRENCY           },
+{ u"V_DATE",                        SbxINTEGER,       CPROP_,          SbRtl_V_DATE               },
+{ u"V_STRING",                      SbxINTEGER,       CPROP_,          SbRtl_V_STRING             },
+
+{ u"Wait",                          SbxNULL,      1 | FUNCTION_,       SbRtl_Wait                 },
+    arg(u"Milliseconds", SbxLONG),
+
+{ u"FuncCaller",                    SbxVARIANT,       FUNCTION_,       SbRtl_FuncCaller           },
+//#i64882#
+{ u"WaitUntil",                     SbxNULL,      1 | FUNCTION_,       SbRtl_WaitUntil            },
+    arg(u"Date", SbxDOUBLE),
+
+{ u"Weekday",                       SbxINTEGER,   2 | FUNCTION_,       SbRtl_Weekday              },
+    arg(u"Date",           SbxDATE),
+    arg(u"Firstdayofweek", SbxINTEGER, OPT_),
+
+{ u"WeekdayName",                   SbxSTRING,    3 | FUNCTION_ | COMPATONLY_, SbRtl_WeekdayName  },
+    arg(u"Weekday",        SbxINTEGER),
+    arg(u"Abbreviate",     SbxBOOL,    OPT_),
+    arg(u"Firstdayofweek", SbxINTEGER, OPT_),
+
+{ u"Year",                          SbxINTEGER,   1 | FUNCTION_,       SbRtl_Year                 },
+    arg(u"Date", SbxDATE),
+
+{ {}, SbxNULL, -1, nullptr }};  // end of the table
+
+static_assert(MethodsTableValid(aMethods));
+
+SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
+{
     // #i92642: Remove default properties
     Remove( "Name", SbxClassType::DontCare );
     Remove( "Parent", SbxClassType::DontCare );
@@ -761,7 +954,7 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
     {
         // else search one
         sal_uInt16 nHash_ = SbxVariable::MakeHashCode( rName );
-        Methods* p = aMethods;
+        const Method* p = aMethods;
         bool bFound = false;
         short nIndex = 0;
         sal_uInt16 nSrchMask = TYPEMASK_;
@@ -776,7 +969,7 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
         {
             if( ( p->nArgs & nSrchMask )
              && ( p->nHash == nHash_ )
-             && ( rName.equalsIgnoreAsciiCaseAscii( p->pName ) ) )
+                && (rName.equalsIgnoreAsciiCase(p->sName)))
             {
                 bFound = true;
                 if( p->nArgs & COMPTMASK_ )
@@ -810,7 +1003,6 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
             short nType   = ( p->nArgs & TYPEMASK_ );
             if( p->nArgs & CONST_ )
                 nAccess |= SbxFlagBits::Const;
-            OUString aName_ = OUString::createFromAscii( p->pName );
             SbxClassType eCT = SbxClassType::Object;
             if( nType & PROPERTY_ )
             {
@@ -820,7 +1012,7 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
             {
                 eCT = SbxClassType::Method;
             }
-            pVar = Make( aName_, eCT, p->eType, ( p->nArgs & FUNCTION_ ) == FUNCTION_ );
+            pVar = Make(OUString(p->sName), eCT, p->eType, (p->nArgs & FUNCTION_) == FUNCTION_);
             pVar->SetUserData( nIndex + 1 );
             pVar->SetFlags( nAccess );
         }
@@ -878,19 +1070,18 @@ SbxInfo* SbiStdObject::GetInfo( short nIdx )
 {
     if( !nIdx )
         return nullptr;
-    Methods* p = &aMethods[ --nIdx ];
+    const Method* p = &aMethods[ --nIdx ];
     SbxInfo* pInfo_ = new SbxInfo;
     short nPar = p->nArgs & ARGSMASK_;
     for( short i = 0; i < nPar; i++ )
     {
         p++;
-        OUString aName_ = OUString::createFromAscii( p->pName );
         SbxFlagBits nFlags_ = static_cast<SbxFlagBits>(( p->nArgs >> 8 ) & 0x03);
         if( p->nArgs & OPT_ )
         {
             nFlags_ |= SbxFlagBits::Optional;
         }
-        pInfo_->AddParam( aName_, p->eType, nFlags_ );
+        pInfo_->AddParam(OUString(p->sName), p->eType, nFlags_);
     }
     return pInfo_;
 }
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 8e5b80ef1e08..34ab5bc24a4b 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -305,29 +305,6 @@ const OUString& SbxVariable::GetName( SbxNameType t ) const
     return aToolString;
 }
 
-// Create a simple hashcode: the first six characters are evaluated.
-
-sal_uInt16 SbxVariable::MakeHashCode( const OUString& rName )
-{
-    sal_uInt16 n = 0;
-    sal_Int32 nLen = rName.getLength();
-    if( nLen > 6 )
-    {
-        nLen = 6;
-    }
-    for( sal_Int32 i=0; i<nLen; ++i )
-    {
-        sal_uInt8 c = static_cast<sal_uInt8>(rName[i]);
-        // If we have a comment sign break!!
-        if( c >= 0x80 )
-        {
-            return 0;
-        }
-        n = sal::static_int_cast< sal_uInt16 >( ( n << 3 ) + rtl::toAsciiUpperCase( c ) );
-    }
-    return n;
-}
-
 // Operators
 
 SbxVariable& SbxVariable::operator=( const SbxVariable& r )
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 14c3eb97a788..487b910aac84 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -20,10 +20,12 @@
 #ifndef INCLUDED_BASIC_SBXVAR_HXX
 #define INCLUDED_BASIC_SBXVAR_HXX
 
+#include <rtl/character.hxx>
 #include <rtl/ustring.hxx>
 #include <basic/sbxcore.hxx>
 #include <basic/basicdllapi.h>
 
+#include <algorithm>
 #include <cstddef>
 #include <cstring>
 #include <memory>
@@ -299,7 +301,20 @@ public:
                          StarBASIC* pParentBasic );
     void ClearComListener();
 
-    static sal_uInt16 MakeHashCode( const OUString& rName );
+    // Create a simple hashcode: the first six characters are evaluated.
+    static constexpr sal_uInt16 MakeHashCode(std::u16string_view aName)
+    {
+        sal_uInt16 n = 0;
+        const auto first6 = aName.substr(0, 6);
+        for (const auto& c : first6)
+        {
+            // If we have a comment sign break!!
+            if (c >= 0x80)
+                return 0;
+            n = static_cast<sal_uInt16>((n << 3) + rtl::toAsciiUpperCase(c));
+        }
+        return n;
+    }
 };
 
 typedef tools::SvRef<SbxObject> SbxObjectRef;


More information about the Libreoffice-commits mailing list