LCOV - code coverage report
Current view: top level - basic/source/runtime - stdobj.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 96 98 98.0 %
Date: 2015-06-13 12:38:46 Functions: 7 9 77.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #include "runtime.hxx"
      22             : #include "stdobj.hxx"
      23             : #include "sbstdobj.hxx"
      24             : #include <sal/macros.h>
      25             : #include "rtlproto.hxx"
      26             : #include "sbintern.hxx"
      27             : // The nArgs-field of a table entry is encrypted as follows:
      28             : // At the moment it is assumed that properties don't need any
      29             : // parameters!
      30             : 
      31             : // previously _ARGSMASK was 0x007F ( e.g. up to 127 args ) however 63 should be
      32             : // enough, if not we need to increase the size of nArgs member in the Methods
      33             : // struct below.
      34             : // note: the limitation of 63 args is only for RTL functions defined here and
      35             : // does NOT impose a limit on User defined procedures ). This changes is to
      36             : // allow us space for a flag to blacklist some functions in vba mode
      37             : 
      38             : #define _ARGSMASK   0x003F  // 63 Arguments
      39             : #define _COMPTMASK  0x00C0  // COMPATIBILITY mask
      40             : #define _COMPATONLY 0x0080  // procedure is visible in vba mode only
      41             : #define _NORMONLY   0x0040  // procedure is visible in normal mode only
      42             : 
      43             : #define _RWMASK     0x0F00  // mask for R/W-bits
      44             : #define _TYPEMASK   0xF000  // mask for the entry's type
      45             : 
      46             : #define _OPT        0x0400  // parameter is optional
      47             : #define _CONST      0x0800  // property is const
      48             : #define _METHOD     0x3000
      49             : #define _PROPERTY   0x4000
      50             : #define _OBJECT     0x8000
      51             :                             // combination of bits above:
      52             : #define _FUNCTION   0x1100
      53             : #define _LFUNCTION  0x1300  // mask for function which also works as Lvalue
      54             : #define _SUB        0x2100
      55             : #define _ROPROP     0x4100  // mask Read Only-Property
      56             : #define _RWPROP     0x4300  // mask Read/Write-Property
      57             : #define _CPROP      0x4900  // mask for constant
      58             : 
      59             : struct Methods {
      60             :     const char* pName;
      61             :     SbxDataType eType;
      62             :     short       nArgs;
      63             :     RtlCall     pFunc;
      64             :     sal_uInt16      nHash;
      65             : };
      66             : 
      67             : static Methods aMethods[] = {
      68             : 
      69             : { "Abs",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Abs),0             },
      70             :   { "number",       SbxDOUBLE, 0,NULL,0 },
      71             : { "Array",          SbxOBJECT,        _FUNCTION, RTLNAME(Array),0           },
      72             : { "Asc",            SbxLONG,      1 | _FUNCTION, RTLNAME(Asc),0             },
      73             :   { "string",       SbxSTRING, 0,NULL,0 },
      74             : { "AscW",           SbxLONG,      1 | _FUNCTION | _COMPATONLY, RTLNAME(Asc),0},
      75             :   { "string",       SbxSTRING, 0,NULL,0 },
      76             : { "Atn",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Atn),0             },
      77             :   { "number",       SbxDOUBLE, 0,NULL,0 },
      78             : { "ATTR_ARCHIVE",   SbxINTEGER,       _CPROP,    RTLNAME(ATTR_ARCHIVE),0    },
      79             : { "ATTR_DIRECTORY", SbxINTEGER,       _CPROP,    RTLNAME(ATTR_DIRECTORY),0  },
      80             : { "ATTR_HIDDEN",    SbxINTEGER,       _CPROP,    RTLNAME(ATTR_HIDDEN),0     },
      81             : { "ATTR_NORMAL",    SbxINTEGER,       _CPROP,    RTLNAME(ATTR_NORMAL),0     },
      82             : { "ATTR_READONLY",  SbxINTEGER,       _CPROP,    RTLNAME(ATTR_READONLY),0   },
      83             : { "ATTR_SYSTEM",    SbxINTEGER,       _CPROP,    RTLNAME(ATTR_SYSTEM),0     },
      84             : { "ATTR_VOLUME",    SbxINTEGER,       _CPROP,    RTLNAME(ATTR_VOLUME),0     },
      85             : 
      86             : { "Beep",           SbxNULL,          _FUNCTION, RTLNAME(Beep),0            },
      87             : { "Blue",        SbxINTEGER,   1 | _FUNCTION | _NORMONLY, RTLNAME(Blue),0               },
      88             :   { "RGB-Value",     SbxLONG, 0,NULL,0 },
      89             : 
      90             : { "CallByName",     SbxVARIANT,   3 | _FUNCTION, RTLNAME(CallByName),0 },
      91             :   { "Object",       SbxOBJECT,  0,NULL,0 },
      92             :   { "ProcedureName",SbxSTRING,  0,NULL,0 },
      93             :   { "CallType",     SbxINTEGER, 0,NULL,0 },
      94             : { "CBool",          SbxBOOL,      1 | _FUNCTION, RTLNAME(CBool),0           },
      95             :   { "expression",   SbxVARIANT, 0,NULL,0 },
      96             : { "CByte",          SbxBYTE,      1 | _FUNCTION, RTLNAME(CByte),0           },
      97             :   { "expression",   SbxVARIANT, 0,NULL,0 },
      98             : { "CCur",           SbxCURRENCY,  1 | _FUNCTION, RTLNAME(CCur),0            },
      99             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     100             : { "CDate",          SbxDATE,      1 | _FUNCTION, RTLNAME(CDate),0           },
     101             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     102             : { "CDateFromUnoDate",   SbxDATE,      1 | _FUNCTION, RTLNAME(CDateFromUnoDate),0    },
     103             :   { "UnoDate",      SbxOBJECT, 0,NULL,0 },
     104             : { "CDateToUnoDate", SbxOBJECT,    1 | _FUNCTION, RTLNAME(CDateToUnoDate),0      },
     105             :   { "Date",         SbxDATE, 0,NULL,0 },
     106             : { "CDateFromUnoTime",   SbxDATE,      1 | _FUNCTION, RTLNAME(CDateFromUnoTime),0    },
     107             :   { "UnoTime",      SbxOBJECT, 0,NULL,0 },
     108             : { "CDateToUnoTime", SbxOBJECT,    1 | _FUNCTION, RTLNAME(CDateToUnoTime),0      },
     109             :   { "Time",         SbxDATE, 0,NULL,0 },
     110             : { "CDateFromUnoDateTime",   SbxDATE,      1 | _FUNCTION, RTLNAME(CDateFromUnoDateTime),0    },
     111             :   { "UnoDateTime",      SbxOBJECT, 0,NULL,0 },
     112             : { "CDateToUnoDateTime", SbxOBJECT,    1 | _FUNCTION, RTLNAME(CDateToUnoDateTime),0      },
     113             :   { "DateTime",         SbxDATE, 0,NULL,0 },
     114             : { "CDateFromIso",   SbxDATE,      1 | _FUNCTION, RTLNAME(CDateFromIso),0    },
     115             :   { "IsoDate",      SbxSTRING, 0,NULL,0 },
     116             : { "CDateToIso",     SbxSTRING,    1 | _FUNCTION, RTLNAME(CDateToIso),0      },
     117             :   { "Date",         SbxDATE, 0,NULL,0 },
     118             : { "CDec",           SbxDECIMAL,   1 | _FUNCTION, RTLNAME(CDec),0            },
     119             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     120             : { "CDbl",           SbxDOUBLE,    1 | _FUNCTION, RTLNAME(CDbl),0            },
     121             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     122             : { "CF_BITMAP",      SbxINTEGER,       _CPROP,    RTLNAME(CF_BITMAP),0       },
     123             : { "CF_METAFILEPICT",SbxINTEGER,       _CPROP,    RTLNAME(CF_METAFILEPICT),0 },
     124             : { "CF_TEXT",        SbxINTEGER,       _CPROP,    RTLNAME(CF_TEXT),0         },
     125             : { "ChDir",          SbxNULL,      1 | _FUNCTION, RTLNAME(ChDir),0           },
     126             :   { "string",       SbxSTRING, 0,NULL,0 },
     127             : { "ChDrive",        SbxNULL,      1 | _FUNCTION, RTLNAME(ChDrive),0         },
     128             :   { "string",       SbxSTRING, 0,NULL,0 },
     129             : 
     130             : { "Choose",         SbxVARIANT,   2 | _FUNCTION, RTLNAME(Choose),0          },
     131             :   { "Index",        SbxINTEGER, 0,NULL,0 },
     132             :   { "Expression",   SbxVARIANT, 0,NULL,0 },
     133             : 
     134             : { "Chr",            SbxSTRING,    1 | _FUNCTION, RTLNAME(Chr),0             },
     135             :   { "string",       SbxINTEGER, 0,NULL,0 },
     136             : { "ChrW",           SbxSTRING,    1 | _FUNCTION | _COMPATONLY, RTLNAME(ChrW),0},
     137             :   { "string",       SbxINTEGER, 0,NULL,0 },
     138             : 
     139             : { "CInt",           SbxINTEGER,   1 | _FUNCTION, RTLNAME(CInt),0            },
     140             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     141             : { "CLEAR_ALLTABS",  SbxINTEGER,       _CPROP,    RTLNAME(CLEAR_ALLTABS),0   },
     142             : { "CLEAR_TAB",      SbxINTEGER,       _CPROP,    RTLNAME(CLEAR_TAB),0       },
     143             : { "CLng",           SbxLONG,      1 | _FUNCTION, RTLNAME(CLng),0            },
     144             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     145             : { "CompatibilityMode",  SbxBOOL,  1 | _FUNCTION, RTLNAME(CompatibilityMode),0},
     146             :   { "bEnable",      SbxBOOL, 0,NULL,0 },
     147             : { "ConvertFromUrl", SbxSTRING,    1 | _FUNCTION, RTLNAME(ConvertFromUrl),0  },
     148             :   { "Url",          SbxSTRING, 0,NULL,0 },
     149             : { "ConvertToUrl",   SbxSTRING,    1 | _FUNCTION, RTLNAME(ConvertToUrl),0    },
     150             :   { "SystemPath",   SbxSTRING, 0,NULL,0 },
     151             : { "Cos",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Cos),0             },
     152             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     153             : { "CreateObject",   SbxOBJECT,    1 | _FUNCTION, RTLNAME( CreateObject ),0  },
     154             :   { "class",        SbxSTRING, 0,NULL,0 },
     155             : { "CreateUnoListener",SbxOBJECT,   1 | _FUNCTION, RTLNAME( CreateUnoListener ),0 },
     156             :   { "prefix",  SbxSTRING, 0,NULL,0 },
     157             :   { "typename",  SbxSTRING, 0,NULL,0 },
     158             : { "CreateUnoDialog",SbxOBJECT,    2 | _FUNCTION, RTLNAME( CreateUnoDialog ),0 },
     159             :   { "dialoglibrary",SbxOBJECT, 0,NULL,0 },
     160             :   { "dialogname",   SbxSTRING, 0,NULL,0 },
     161             : { "CreateUnoService",SbxOBJECT,   1 | _FUNCTION, RTLNAME( CreateUnoService ),0 },
     162             :   { "servicename",  SbxSTRING, 0,NULL,0 },
     163             : { "CreateUnoServiceWithArguments",SbxOBJECT,   2 | _FUNCTION, RTLNAME( CreateUnoServiceWithArguments ),0 },
     164             :   { "servicename",  SbxSTRING, 0,NULL,0 },
     165             :   { "arguments",  SbxARRAY, 0,NULL,0 },
     166             : { "CreateUnoStruct",SbxOBJECT,    1 | _FUNCTION, RTLNAME( CreateUnoStruct ),0 },
     167             :   { "classname",    SbxSTRING, 0,NULL,0 },
     168             : { "CreateUnoValue", SbxOBJECT,    2 | _FUNCTION, RTLNAME( CreateUnoValue ),0 },
     169             :   { "type",         SbxSTRING, 0,NULL,0 },
     170             :   { "value",        SbxVARIANT, 0,NULL,0 },
     171             : { "CreatePropertySet",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreatePropertySet ),0 },
     172             :   { "values",  SbxARRAY, 0,NULL,0 },
     173             : { "CSng",           SbxSINGLE,    1 | _FUNCTION, RTLNAME(CSng),0            },
     174             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     175             : { "CStr",           SbxSTRING,    1 | _FUNCTION, RTLNAME(CStr),0            },
     176             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     177             : { "CurDir",         SbxSTRING,    1 | _FUNCTION, RTLNAME(CurDir),0          },
     178             :   { "string",       SbxSTRING, 0,NULL,0 },
     179             : { "CVar",           SbxVARIANT,   1 | _FUNCTION, RTLNAME(CVar),0            },
     180             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     181             : { "CVErr",          SbxVARIANT,   1 | _FUNCTION, RTLNAME(CVErr),0           },
     182             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     183             : { "DDB",      SbxDOUBLE,      5 | _FUNCTION | _COMPATONLY, RTLNAME(DDB),0       },
     184             :   { "Cost",       SbxDOUBLE,  0, NULL,0 },
     185             :   { "Salvage",       SbxDOUBLE,  0, NULL,0 },
     186             :   { "Life",       SbxDOUBLE,  0, NULL,0 },
     187             :   { "Period",       SbxDOUBLE,  0, NULL,0 },
     188             :   { "Factor",     SbxVARIANT,  _OPT, NULL,0 },
     189             : { "Date",           SbxDATE,          _LFUNCTION,RTLNAME(Date),0            },
     190             : { "DateAdd",        SbxDATE,      3 | _FUNCTION, RTLNAME(DateAdd),0         },
     191             :   { "Interval",     SbxSTRING, 0,NULL,0 },
     192             :   { "Number",       SbxLONG, 0,NULL,0 },
     193             :   { "Date",         SbxDATE, 0,NULL,0 },
     194             : { "DateDiff",       SbxDOUBLE,    5 | _FUNCTION, RTLNAME(DateDiff),0        },
     195             :   { "Interval",     SbxSTRING, 0,NULL,0 },
     196             :   { "Date1",        SbxDATE, 0,NULL,0 },
     197             :   { "Date2",        SbxDATE, 0,NULL,0 },
     198             :   { "Firstdayofweek" , SbxINTEGER, _OPT,NULL,0 },
     199             :   { "Firstweekofyear", SbxINTEGER, _OPT,NULL,0 },
     200             : { "DatePart",       SbxLONG,      4 | _FUNCTION, RTLNAME(DatePart),0        },
     201             :   { "Interval",     SbxSTRING, 0,NULL,0 },
     202             :   { "Date",         SbxDATE, 0,NULL,0 },
     203             :   { "Firstdayofweek" , SbxINTEGER, _OPT, NULL,0 },
     204             :   { "Firstweekofyear", SbxINTEGER, _OPT, NULL,0 },
     205             : { "DateSerial",     SbxDATE,      3 | _FUNCTION, RTLNAME(DateSerial),0      },
     206             :   { "Year",         SbxINTEGER, 0,NULL,0 },
     207             :   { "Month",        SbxINTEGER, 0,NULL,0 },
     208             :   { "Day",          SbxINTEGER, 0,NULL,0 },
     209             : { "DateValue",      SbxDATE,      1 | _FUNCTION, RTLNAME(DateValue),0       },
     210             :   { "String",       SbxSTRING, 0,NULL,0 },
     211             : { "Day",            SbxINTEGER,   1 | _FUNCTION, RTLNAME(Day),0             },
     212             :   { "Date",         SbxDATE, 0,NULL,0 },
     213             : { "Ddeexecute",     SbxNULL,   2 | _FUNCTION, RTLNAME(DDEExecute),0         },
     214             :   { "Channel",         SbxLONG, 0,NULL,0 },
     215             :   { "Command",         SbxSTRING, 0,NULL,0 },
     216             : { "Ddeinitiate",    SbxINTEGER,   2 | _FUNCTION, RTLNAME(DDEInitiate),0     },
     217             :   { "Application",     SbxSTRING, 0,NULL,0 },
     218             :   { "Topic",           SbxSTRING, 0,NULL,0 },
     219             : { "Ddepoke",        SbxNULL,   3 | _FUNCTION, RTLNAME(DDEPoke),0            },
     220             :   { "Channel",         SbxLONG, 0,NULL,0 },
     221             :   { "Item",            SbxSTRING, 0,NULL,0 },
     222             :   { "Data",            SbxSTRING, 0,NULL,0 },
     223             : { "Dderequest",     SbxSTRING,   2 | _FUNCTION, RTLNAME(DDERequest),0       },
     224             :   { "Channel",         SbxLONG, 0,NULL,0 },
     225             :   { "Item",            SbxSTRING, 0,NULL,0 },
     226             : { "Ddeterminate",   SbxNULL,   1 | _FUNCTION, RTLNAME(DDETerminate),0       },
     227             :   { "Channel",         SbxLONG, 0,NULL,0 },
     228             : { "Ddeterminateall",   SbxNULL,   _FUNCTION, RTLNAME(DDETerminateAll),0     },
     229             : { "DimArray",       SbxOBJECT,    _FUNCTION, RTLNAME(DimArray),0            },
     230             : { "Dir",            SbxSTRING,    2 | _FUNCTION, RTLNAME(Dir),0             },
     231             :   { "FileSpec",     SbxSTRING,        _OPT, NULL,0 },
     232             :   { "attrmask",     SbxINTEGER,       _OPT, NULL,0 },
     233             : { "DoEvents",       SbxINTEGER,     _FUNCTION, RTLNAME(DoEvents),0          },
     234             : { "DumpAllObjects", SbxEMPTY,     2 | _SUB, RTLNAME(DumpAllObjects),0       },
     235             :   { "FileSpec",     SbxSTRING, 0,NULL,0 },
     236             :   { "DumpAll",      SbxINTEGER,       _OPT, NULL,0 },
     237             : 
     238             : { "Empty",        SbxVARIANT,        _CPROP,    RTLNAME(Empty),0         },
     239             : { "EqualUnoObjects",SbxBOOL,      2 | _FUNCTION, RTLNAME(EqualUnoObjects),0 },
     240             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     241             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     242             : { "EnableReschedule",   SbxNULL,  1 | _FUNCTION, RTLNAME(EnableReschedule),0},
     243             :   { "bEnable",      SbxBOOL, 0,NULL,0 },
     244             : { "Environ",            SbxSTRING,   1 | _FUNCTION, RTLNAME(Environ),0      },
     245             :   { "Environmentstring",SbxSTRING, 0,NULL,0 },
     246             : { "EOF",            SbxBOOL,      1 | _FUNCTION, RTLNAME(EOF),0             },
     247             :   { "Channel",      SbxINTEGER, 0,NULL,0 },
     248             : { "Erl",            SbxLONG,          _ROPROP,   RTLNAME( Erl ),0           },
     249             : { "Err",            SbxVARIANT,       _RWPROP,   RTLNAME( Err ),0           },
     250             : { "Error",          SbxSTRING,    1 | _FUNCTION, RTLNAME( Error ),0         },
     251             :   { "code",         SbxLONG, 0,NULL,0 },
     252             : { "Exp",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Exp),0             },
     253             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     254             : 
     255             : { "False",          SbxBOOL,          _CPROP,    RTLNAME(False),0           },
     256             : { "FileAttr",       SbxINTEGER,   2 | _FUNCTION, RTLNAME(FileAttr),0        },
     257             :   { "Channel",      SbxINTEGER, 0,NULL,0 },
     258             :   { "Attributes",   SbxINTEGER, 0,NULL,0 },
     259             : { "FileCopy",       SbxNULL,      2 | _FUNCTION, RTLNAME(FileCopy),0        },
     260             :   { "Source",       SbxSTRING, 0,NULL,0 },
     261             :   { "Destination",  SbxSTRING, 0,NULL,0 },
     262             : { "FileDateTime",   SbxSTRING,    1 | _FUNCTION, RTLNAME(FileDateTime),0    },
     263             :   { "filename",     SbxSTRING, 0,NULL,0 },
     264             : { "FileExists",     SbxBOOL,   1 | _FUNCTION, RTLNAME(FileExists),0         },
     265             :   { "filename",     SbxSTRING, 0,NULL,0 },
     266             : { "FileLen",        SbxLONG,      1 | _FUNCTION, RTLNAME(FileLen),0         },
     267             :   { "filename",     SbxSTRING, 0,NULL,0 },
     268             : { "FindObject",     SbxOBJECT,    1 | _FUNCTION, RTLNAME(FindObject),0      },
     269             :   { "Name",  SbxSTRING, 0,NULL,0 },
     270             : { "FindPropertyObject",   SbxOBJECT,      2 | _FUNCTION, RTLNAME(FindPropertyObject),0 },
     271             :   { "Object",       SbxOBJECT, 0,NULL,0 },
     272             :   { "Name",  SbxSTRING, 0,NULL,0 },
     273             : { "Fix",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Fix),0             },
     274             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     275             : { "Format",         SbxSTRING,    2 | _FUNCTION, RTLNAME(Format),0          },
     276             :   { "expression",   SbxVARIANT, 0,NULL,0 },
     277             :   { "format",       SbxSTRING,        _OPT, NULL,0 },
     278             : { "FormatDateTime", SbxSTRING,    2 | _FUNCTION | _COMPATONLY, RTLNAME(FormatDateTime),0 },
     279             :   { "Date",         SbxDATE, 0,NULL,0 },
     280             :   { "NamedFormat",  SbxINTEGER,        _OPT, NULL,0 },
     281             : { "Frac",           SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Frac),0            },
     282             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     283             : { "FRAMEANCHORCHAR",        SbxINTEGER,       _CPROP,    RTLNAME(FRAMEANCHORCHAR),0 },
     284             : { "FRAMEANCHORPAGE",        SbxINTEGER,       _CPROP,    RTLNAME(FRAMEANCHORPAGE),0 },
     285             : { "FRAMEANCHORPARA",        SbxINTEGER,       _CPROP,    RTLNAME(FRAMEANCHORPARA),0 },
     286             : { "FreeFile",       SbxINTEGER,    _FUNCTION, RTLNAME(FreeFile),0           },
     287             : { "FreeLibrary",    SbxNULL,      1 | _FUNCTION, RTLNAME(FreeLibrary),0     },
     288             :   { "Modulename",   SbxSTRING, 0,NULL,0 },
     289             : 
     290             : { "FV",      SbxDOUBLE,      5 | _FUNCTION | _COMPATONLY, RTLNAME(FV),0       },
     291             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     292             :   { "NPer",       SbxDOUBLE,  0, NULL,0 },
     293             :   { "Pmt",       SbxDOUBLE,  0, NULL,0 },
     294             :   { "PV",     SbxVARIANT,  _OPT, NULL,0 },
     295             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     296             : { "Get",            SbxNULL,   3 | _FUNCTION, RTLNAME(Get),0                },
     297             :   { "filenumber",   SbxINTEGER, 0,NULL,0 },
     298             :   { "recordnumber", SbxLONG, 0,NULL,0 },
     299             :   { "variablename", SbxVARIANT, 0,NULL,0 },
     300             : { "GetAttr",        SbxINTEGER,   1 | _FUNCTION, RTLNAME(GetAttr),0         },
     301             :   { "filename",     SbxSTRING, 0,NULL,0 },
     302             : { "GetDefaultContext", SbxOBJECT, 0 | _FUNCTION, RTLNAME(GetDefaultContext),0 },
     303             : { "GetDialogZoomFactorX",  SbxDOUBLE,     _FUNCTION,RTLNAME(GetDialogZoomFactorX),0 },
     304             : { "GetDialogZoomFactorY",  SbxDOUBLE,     _FUNCTION,RTLNAME(GetDialogZoomFactorY),0 },
     305             : { "GetGUIType",  SbxINTEGER,     _FUNCTION,RTLNAME(GetGUIType),0            },
     306             : { "GetGUIVersion",  SbxLONG,     _FUNCTION,RTLNAME(GetGUIVersion),0         },
     307             : { "GetPathSeparator",  SbxSTRING,     _FUNCTION,RTLNAME(GetPathSeparator),0 },
     308             : { "GetProcessServiceManager", SbxOBJECT, 0 | _FUNCTION, RTLNAME(GetProcessServiceManager),0 },
     309             : { "GetSolarVersion",  SbxLONG,     _FUNCTION,RTLNAME(GetSolarVersion),0     },
     310             : { "GetSystemTicks",  SbxLONG,      _FUNCTION,RTLNAME(GetSystemTicks),0      },
     311             : { "GetSystemType",  SbxINTEGER,    _FUNCTION,RTLNAME(GetSystemType),0       },
     312             : { "GlobalScope",    SbxOBJECT,     _FUNCTION,RTLNAME(GlobalScope),0         },
     313             : { "Green",          SbxINTEGER,   1 | _FUNCTION | _NORMONLY, RTLNAME(Green),0           },
     314             :   { "RGB-Value",     SbxLONG, 0,NULL,0 },
     315             : 
     316             : { "HasUnoInterfaces",   SbxBOOL,  1 | _FUNCTION, RTLNAME(HasUnoInterfaces),0},
     317             :   { "InterfaceName",SbxSTRING, 0,NULL,0 },
     318             : { "Hex",            SbxSTRING,    1 | _FUNCTION, RTLNAME(Hex),0             },
     319             :   { "number",       SbxLONG, 0,NULL,0 },
     320             : { "Hour",           SbxINTEGER,   1 | _FUNCTION, RTLNAME(Hour),0            },
     321             :   { "Date",         SbxDATE, 0,NULL,0 },
     322             : 
     323             : { "IDABORT",        SbxINTEGER,       _CPROP,    RTLNAME(IDABORT),0         },
     324             : { "IDCANCEL",       SbxINTEGER,       _CPROP,    RTLNAME(IDCANCEL),0        },
     325             : { "IDNO",           SbxINTEGER,       _CPROP,    RTLNAME(IDNO),0            },
     326             : { "IDOK",           SbxINTEGER,       _CPROP,    RTLNAME(IDOK),0            },
     327             : { "IDRETRY",        SbxINTEGER,       _CPROP,    RTLNAME(IDRETRY),0         },
     328             : { "IDYES",          SbxINTEGER,       _CPROP,    RTLNAME(IDYES),0           },
     329             : 
     330             : { "Iif",            SbxVARIANT,   3 | _FUNCTION, RTLNAME(Iif),0             },
     331             :   { "Bool",         SbxBOOL, 0,NULL,0 },
     332             :   { "Variant1",     SbxVARIANT, 0,NULL,0 },
     333             :   { "Variant2",     SbxVARIANT, 0,NULL,0 },
     334             : 
     335             : { "Input",          SbxSTRING,    2 | _FUNCTION | _COMPATONLY, RTLNAME(Input),0},
     336             :   { "Number",       SbxLONG, 0,NULL,0 },
     337             :   { "FileNumber",   SbxLONG, 0,NULL,0 },
     338             : { "InputBox",       SbxSTRING,    5 | _FUNCTION, RTLNAME(InputBox),0        },
     339             :   { "Prompt",       SbxSTRING, 0,NULL,0 },
     340             :   { "Title",        SbxSTRING,        _OPT, NULL,0 },
     341             :   { "Default",      SbxSTRING,        _OPT, NULL,0 },
     342             :   { "XPosTwips",    SbxLONG,          _OPT, NULL,0 },
     343             :   { "YPosTwips",    SbxLONG,          _OPT, NULL,0 },
     344             : { "InStr",          SbxLONG,      4 | _FUNCTION, RTLNAME(InStr),0           },
     345             :   { "Start",        SbxSTRING,        _OPT, NULL,0 },
     346             :   { "String1",      SbxSTRING, 0,NULL,0 },
     347             :   { "String2",      SbxSTRING, 0,NULL,0 },
     348             :   { "Compare",      SbxINTEGER,       _OPT, NULL,0 },
     349             : { "InStrRev",       SbxLONG,      4 | _FUNCTION | _COMPATONLY, RTLNAME(InStrRev),0},
     350             :   { "String1",      SbxSTRING, 0,NULL,0 },
     351             :   { "String2",      SbxSTRING, 0,NULL,0 },
     352             :   { "Start",        SbxSTRING,        _OPT, NULL,0 },
     353             :   { "Compare",      SbxINTEGER,       _OPT, NULL,0 },
     354             : { "Int",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Int),0             },
     355             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     356             : { "IPmt",      SbxDOUBLE,      6 | _FUNCTION | _COMPATONLY, RTLNAME(IPmt),0       },
     357             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     358             :   { "Per",       SbxDOUBLE,  0, NULL,0 },
     359             :   { "NPer",       SbxDOUBLE,  0, NULL,0 },
     360             :   { "PV",     SbxDOUBLE,  0, NULL,0 },
     361             :   { "FV",     SbxVARIANT,  _OPT, NULL,0 },
     362             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     363             : { "IRR",      SbxDOUBLE,      2 | _FUNCTION | _COMPATONLY, RTLNAME(IRR),0       },
     364             :   { "ValueArray",       SbxARRAY,  0, NULL,0 },
     365             :   { "Guess",       SbxVARIANT,  _OPT, NULL,0 },
     366             : { "IsArray",        SbxBOOL,      1 | _FUNCTION, RTLNAME(IsArray),0         },
     367             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     368             : { "IsDate",         SbxBOOL,      1 | _FUNCTION, RTLNAME(IsDate),0          },
     369             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     370             : { "IsEmpty",        SbxBOOL,      1 | _FUNCTION, RTLNAME(IsEmpty),0         },
     371             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     372             : { "IsError",        SbxBOOL,      1 | _FUNCTION, RTLNAME(IsError),0         },
     373             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     374             : { "IsMissing",        SbxBOOL,      1 | _FUNCTION, RTLNAME(IsMissing),0     },
     375             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     376             : { "IsNull",         SbxBOOL,      1 | _FUNCTION, RTLNAME(IsNull),0          },
     377             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     378             : { "IsNumeric",      SbxBOOL,      1 | _FUNCTION, RTLNAME(IsNumeric),0       },
     379             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     380             : { "IsObject",       SbxBOOL,      1 | _FUNCTION, RTLNAME(IsObject),0        },
     381             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     382             : { "IsUnoStruct",    SbxBOOL,      1 | _FUNCTION, RTLNAME(IsUnoStruct),0     },
     383             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     384             : { "Join",           SbxSTRING,      2 | _FUNCTION, RTLNAME(Join),0          },
     385             :   { "list",         SbxOBJECT, 0,NULL,0 },
     386             :   { "delimiter",    SbxSTRING, 0,NULL,0 },
     387             : { "Kill",           SbxNULL,      1 | _FUNCTION, RTLNAME(Kill),0            },
     388             :   { "filespec",     SbxSTRING, 0,NULL,0 },
     389             : { "LBound",         SbxLONG,      1 | _FUNCTION, RTLNAME(LBound),0          },
     390             :   { "Variant",      SbxVARIANT, 0,NULL,0 },
     391             : { "LCase",          SbxSTRING,    1 | _FUNCTION, RTLNAME(LCase),0           },
     392             :   { "string",       SbxSTRING, 0,NULL,0 },
     393             : { "Left",           SbxSTRING,    2 | _FUNCTION, RTLNAME(Left),0            },
     394             :   { "String",       SbxSTRING, 0,NULL,0 },
     395             :   { "Count",        SbxLONG, 0,NULL,0 },
     396             : { "Len",            SbxLONG,      1 | _FUNCTION, RTLNAME(Len),0             },
     397             :   { "StringOrVariant", SbxVARIANT, 0,NULL,0 },
     398             : { "LenB",           SbxLONG,      1 | _FUNCTION, RTLNAME(Len),0             },
     399             :   { "StringOrVariant", SbxVARIANT, 0,NULL,0 },
     400             : { "Load",           SbxNULL,      1 | _FUNCTION, RTLNAME(Load),0            },
     401             :   { "object",       SbxOBJECT, 0,NULL,0 },
     402             : { "LoadPicture",    SbxOBJECT,    1 | _FUNCTION, RTLNAME(LoadPicture),0     },
     403             :   { "string",       SbxSTRING, 0,NULL,0 },
     404             : { "Loc",            SbxLONG,      1 | _FUNCTION, RTLNAME(Loc),0             },
     405             :   { "Channel",      SbxINTEGER, 0,NULL,0 },
     406             : { "Lof",            SbxLONG,      1 | _FUNCTION, RTLNAME(Lof),0             },
     407             :   { "Channel",      SbxINTEGER, 0,NULL,0 },
     408             : { "Log",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Log),0             },
     409             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     410             : { "LTrim",          SbxSTRING,    1 | _FUNCTION, RTLNAME(LTrim),0           },
     411             :   { "string",       SbxSTRING, 0,NULL,0 },
     412             : 
     413             : { "MB_ABORTRETRYIGNORE", SbxINTEGER,  _CPROP,    RTLNAME(MB_ABORTRETRYIGNORE),0},
     414             : { "MB_APPLMODAL",   SbxINTEGER,       _CPROP,    RTLNAME(MB_APPLMODAL),0    },
     415             : { "MB_DEFBUTTON1",  SbxINTEGER,       _CPROP,    RTLNAME(MB_DEFBUTTON1),0   },
     416             : { "MB_DEFBUTTON2",  SbxINTEGER,       _CPROP,    RTLNAME(MB_DEFBUTTON2),0   },
     417             : { "MB_DEFBUTTON3",  SbxINTEGER,       _CPROP,    RTLNAME(MB_DEFBUTTON3),0   },
     418             : { "MB_ICONEXCLAMATION", SbxINTEGER,   _CPROP,    RTLNAME(MB_ICONEXCLAMATION),0},
     419             : { "MB_ICONINFORMATION", SbxINTEGER,   _CPROP,    RTLNAME(MB_ICONINFORMATION),0},
     420             : { "MB_ICONQUESTION",SbxINTEGER,       _CPROP,    RTLNAME(MB_ICONQUESTION),0 },
     421             : { "MB_ICONSTOP",    SbxINTEGER,       _CPROP,    RTLNAME(MB_ICONSTOP),0     },
     422             : { "MB_OK",          SbxINTEGER,       _CPROP,    RTLNAME(MB_OK),0           },
     423             : { "MB_OKCANCEL",    SbxINTEGER,       _CPROP,    RTLNAME(MB_OKCANCEL),0     },
     424             : { "MB_RETRYCANCEL", SbxINTEGER,       _CPROP,    RTLNAME(MB_RETRYCANCEL),0  },
     425             : { "MB_SYSTEMMODAL", SbxINTEGER,       _CPROP,    RTLNAME(MB_SYSTEMMODAL),0  },
     426             : { "MB_YESNO",       SbxINTEGER,       _CPROP,    RTLNAME(MB_YESNO),0        },
     427             : { "MB_YESNOCANCEL", SbxINTEGER,       _CPROP,    RTLNAME(MB_YESNOCANCEL),0  },
     428             : 
     429             : { "Me",             SbxOBJECT,    0 | _FUNCTION | _COMPATONLY, RTLNAME(Me),0 },
     430             : { "Mid",            SbxSTRING,    3 | _LFUNCTION,RTLNAME(Mid),0             },
     431             :   { "String",       SbxSTRING, 0,NULL,0 },
     432             :   { "StartPos",     SbxLONG, 0,NULL,0 },
     433             :   { "Length",       SbxLONG,          _OPT, NULL,0 },
     434             : { "Minute",         SbxINTEGER,   1 | _FUNCTION, RTLNAME(Minute),0          },
     435             :   { "Date",         SbxDATE, 0,NULL,0 },
     436             : { "MIRR",      SbxDOUBLE,      2 | _FUNCTION | _COMPATONLY, RTLNAME(MIRR),0       },
     437             :   { "ValueArray",       SbxARRAY,  0, NULL,0 },
     438             :   { "FinanceRate",       SbxDOUBLE,  0, NULL,0 },
     439             :   { "ReinvestRate",       SbxDOUBLE,  0, NULL,0 },
     440             : { "MkDir",          SbxNULL,      1 | _FUNCTION, RTLNAME(MkDir),0           },
     441             :   { "pathname",     SbxSTRING, 0,NULL,0 },
     442             : { "Month",          SbxINTEGER,   1 | _FUNCTION, RTLNAME(Month),0           },
     443             :   { "Date",         SbxDATE, 0,NULL,0 },
     444             : { "MonthName",      SbxSTRING,    2 | _FUNCTION | _COMPATONLY, RTLNAME(MonthName),0 },
     445             :   { "Month",        SbxINTEGER, 0,NULL,0 },
     446             :   { "Abbreviate",   SbxBOOL,          _OPT, NULL,0 },
     447             : { "MsgBox",         SbxINTEGER,    5 | _FUNCTION, RTLNAME(MsgBox),0         },
     448             :   { "Prompt",       SbxSTRING, 0,NULL,0 },
     449             :   { "Buttons",      SbxINTEGER,       _OPT, NULL,0 },
     450             :   { "Title",        SbxSTRING,        _OPT, NULL,0 },
     451             :   { "Helpfile",     SbxSTRING,        _OPT, NULL,0 },
     452             :   { "Context",      SbxINTEGER,       _OPT, NULL,0 },
     453             : 
     454             : { "Nothing",        SbxOBJECT,        _CPROP,    RTLNAME(Nothing),0         },
     455             : { "Now",            SbxDATE,          _FUNCTION, RTLNAME(Now),0             },
     456             : { "NPer",      SbxDOUBLE,      5 | _FUNCTION | _COMPATONLY, RTLNAME(NPer),0       },
     457             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     458             :   { "Pmt",       SbxDOUBLE,  0, NULL,0 },
     459             :   { "PV",       SbxDOUBLE,  0, NULL,0 },
     460             :   { "FV",     SbxVARIANT,  _OPT, NULL,0 },
     461             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     462             : { "NPV",      SbxDOUBLE,      2 | _FUNCTION | _COMPATONLY, RTLNAME(NPV),0       },
     463             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     464             :   { "ValueArray",       SbxARRAY,  0, NULL,0 },
     465             : { "Null",           SbxNULL,          _CPROP,    RTLNAME(Null),0            },
     466             : 
     467             : { "Oct",            SbxSTRING,    1 | _FUNCTION, RTLNAME(Oct),0             },
     468             :   { "number",       SbxLONG, 0,NULL,0 },
     469             : 
     470             : { "Partition",      SbxSTRING,    4 | _FUNCTION, RTLNAME(Partition),0       },
     471             :   { "number",       SbxLONG,    0,NULL,0 },
     472             :   { "start",        SbxLONG,    0,NULL,0 },
     473             :   { "stop",         SbxLONG,    0,NULL,0 },
     474             :   { "interval",     SbxLONG,    0,NULL,0 },
     475             : { "Pi",             SbxDOUBLE,        _CPROP,    RTLNAME(PI),0              },
     476             : 
     477             : { "Pmt",      SbxDOUBLE,      5 | _FUNCTION | _COMPATONLY, RTLNAME(Pmt),0       },
     478             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     479             :   { "NPer",       SbxDOUBLE,  0, NULL,0 },
     480             :   { "PV",     SbxDOUBLE,  0, NULL,0 },
     481             :   { "FV",     SbxVARIANT,  _OPT, NULL,0 },
     482             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     483             : 
     484             : { "PPmt",      SbxDOUBLE,      6 | _FUNCTION | _COMPATONLY, RTLNAME(PPmt),0       },
     485             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     486             :   { "Per",       SbxDOUBLE,  0, NULL,0 },
     487             :   { "NPer",       SbxDOUBLE,  0, NULL,0 },
     488             :   { "PV",     SbxDOUBLE,  0, NULL,0 },
     489             :   { "FV",     SbxVARIANT,  _OPT, NULL,0 },
     490             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     491             : 
     492             : { "Put",            SbxNULL,   3 | _FUNCTION, RTLNAME(Put),0                },
     493             :   { "filenumber",   SbxINTEGER, 0,NULL,0 },
     494             :   { "recordnumber", SbxLONG, 0,NULL,0 },
     495             :   { "variablename", SbxVARIANT, 0,NULL,0 },
     496             : 
     497             : { "PV",      SbxDOUBLE,      5 | _FUNCTION | _COMPATONLY, RTLNAME(PV),0       },
     498             :   { "Rate",       SbxDOUBLE,  0, NULL,0 },
     499             :   { "NPer",       SbxDOUBLE,  0, NULL,0 },
     500             :   { "Pmt",     SbxDOUBLE,  0, NULL,0 },
     501             :   { "FV",     SbxVARIANT,  _OPT, NULL,0 },
     502             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     503             : 
     504             : { "QBColor",        SbxLONG,      1 | _FUNCTION, RTLNAME(QBColor),0         },
     505             :   { "number",       SbxINTEGER, 0,NULL,0 },
     506             : 
     507             : { "Randomize",      SbxNULL,      1 | _FUNCTION, RTLNAME(Randomize),0       },
     508             :   { "Number",       SbxDOUBLE,        _OPT, NULL,0 },
     509             : { "Rate",      SbxDOUBLE,      6 | _FUNCTION | _COMPATONLY, RTLNAME(Rate),0       },
     510             :   { "NPer",       SbxDOUBLE,  0, NULL,0 },
     511             :   { "Pmt",       SbxDOUBLE,  0, NULL,0 },
     512             :   { "PV",       SbxDOUBLE,  0, NULL,0 },
     513             :   { "FV",       SbxVARIANT,  _OPT, NULL,0 },
     514             :   { "Due",     SbxVARIANT,  _OPT, NULL,0 },
     515             :   { "Guess",    SbxVARIANT,  _OPT, NULL,0 },
     516             : { "Red",        SbxINTEGER,   1 | _FUNCTION | _NORMONLY, RTLNAME(Red),0                 },
     517             :   { "RGB-Value",     SbxLONG, 0,NULL,0 },
     518             : { "Reset",          SbxNULL,      0 | _FUNCTION, RTLNAME(Reset),0           },
     519             : { "ResolvePath",    SbxSTRING,    1 | _FUNCTION, RTLNAME(ResolvePath),0     },
     520             :   { "Path",         SbxSTRING, 0,NULL,0 },
     521             : { "RGB",            SbxLONG,      3 | _FUNCTION, RTLNAME(RGB),0             },
     522             :   { "Red",          SbxINTEGER, 0,NULL,0 },
     523             :   { "Green",        SbxINTEGER, 0,NULL,0 },
     524             :   { "Blue",         SbxINTEGER, 0,NULL,0 },
     525             : { "Replace",        SbxSTRING,    6 | _FUNCTION, RTLNAME(Replace),0         },
     526             :   { "Expression",   SbxSTRING, 0,NULL,0 },
     527             :   { "Find",         SbxSTRING, 0,NULL,0 },
     528             :   { "Replace",      SbxSTRING, 0,NULL,0 },
     529             :   { "Start",        SbxINTEGER,     _OPT, NULL,0 },
     530             :   { "Count",        SbxINTEGER,     _OPT, NULL,0 },
     531             :   { "Compare",      SbxINTEGER,     _OPT, NULL,0 },
     532             : { "Right",          SbxSTRING,    2 | _FUNCTION, RTLNAME(Right),0           },
     533             :   { "String",       SbxSTRING, 0,NULL,0 },
     534             :   { "Count",        SbxLONG, 0,NULL,0 },
     535             : { "RmDir",          SbxNULL,      1 | _FUNCTION, RTLNAME(RmDir),0           },
     536             :   { "pathname",     SbxSTRING, 0,NULL,0 },
     537             : { "Round",          SbxDOUBLE,    2 | _FUNCTION | _COMPATONLY, RTLNAME(Round),0},
     538             :   { "Expression",   SbxDOUBLE, 0,NULL,0 },
     539             :   { "Numdecimalplaces", SbxINTEGER,   _OPT, NULL,0 },
     540             : { "Rnd",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Rnd),0             },
     541             :   { "Number",       SbxDOUBLE,        _OPT, NULL,0 },
     542             : { "RTL",            SbxOBJECT,    0 | _FUNCTION | _COMPATONLY, RTLNAME(RTL),0},
     543             : { "RTrim",          SbxSTRING,    1 | _FUNCTION, RTLNAME(RTrim),0           },
     544             :   { "string",       SbxSTRING, 0,NULL,0 },
     545             : 
     546             : { "SavePicture",    SbxNULL,      2 | _FUNCTION, RTLNAME(SavePicture),0     },
     547             :   { "object",       SbxOBJECT, 0,NULL,0 },
     548             :   { "string",       SbxSTRING, 0,NULL,0 },
     549             : { "Second",         SbxINTEGER,   1 | _FUNCTION, RTLNAME(Second),0          },
     550             :   { "Date",         SbxDATE, 0,NULL,0 },
     551             : { "Seek",           SbxLONG,      1 | _FUNCTION, RTLNAME(Seek),0            },
     552             :   { "Channel",      SbxINTEGER, 0,NULL,0 },
     553             : { "SendKeys",       SbxNULL,      2 | _FUNCTION, RTLNAME(SendKeys),0        },
     554             :   { "String",       SbxSTRING, 0,NULL,0 },
     555             :   { "Wait",         SbxBOOL,          _OPT, NULL,0 },
     556             : { "SetAttr",        SbxNULL,      2 | _FUNCTION, RTLNAME(SetAttr),0         },
     557             :   { "File"  ,       SbxSTRING, 0,NULL,0 },
     558             :   { "Attributes",   SbxINTEGER, 0,NULL,0 },
     559             : { "SET_OFF",        SbxINTEGER,       _CPROP,    RTLNAME(SET_OFF),0         },
     560             : { "SET_ON",         SbxINTEGER,       _CPROP,    RTLNAME(SET_ON),0          },
     561             : { "SET_TAB",        SbxINTEGER,       _CPROP,    RTLNAME(SET_TAB),0         },
     562             : { "Sgn",            SbxINTEGER,   1 | _FUNCTION, RTLNAME(Sgn),0             },
     563             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     564             : { "Shell",          SbxLONG,      2 | _FUNCTION, RTLNAME(Shell),0           },
     565             :   { "Commandstring",SbxSTRING, 0,NULL,0 },
     566             :   { "WindowStyle",  SbxINTEGER,       _OPT, NULL,0 },
     567             : { "Sin",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Sin),0             },
     568             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     569             : { "SLN",            SbxDOUBLE,    2 |  _FUNCTION | _COMPATONLY, RTLNAME(SLN),0             },
     570             :   { "Cost",       SbxDOUBLE, 0,NULL,0 },
     571             :   { "Double",       SbxDOUBLE, 0,NULL,0 },
     572             :   { "Life",       SbxDOUBLE, 0,NULL,0 },
     573             : { "SYD",            SbxDOUBLE,    2 |  _FUNCTION | _COMPATONLY, RTLNAME(SYD),0             },
     574             :   { "Cost",       SbxDOUBLE, 0,NULL,0 },
     575             :   { "Salvage",       SbxDOUBLE, 0,NULL,0 },
     576             :   { "Life",       SbxDOUBLE, 0,NULL,0 },
     577             :   { "Period",       SbxDOUBLE, 0,NULL,0 },
     578             : { "Space",          SbxSTRING,      1 | _FUNCTION, RTLNAME(Space),0         },
     579             :   { "string",       SbxLONG, 0,NULL,0 },
     580             : { "Spc",            SbxSTRING,      1 | _FUNCTION, RTLNAME(Spc),0           },
     581             :   { "Count",        SbxLONG, 0,NULL,0 },
     582             : { "Split",          SbxOBJECT,      3 | _FUNCTION, RTLNAME(Split),0         },
     583             :   { "expression",   SbxSTRING, 0,NULL,0 },
     584             :   { "delimiter",    SbxSTRING, 0,NULL,0 },
     585             :   { "count",        SbxLONG, 0,NULL,0 },
     586             : { "Sqr",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Sqr),0             },
     587             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     588             : { "Str",            SbxSTRING,    1 | _FUNCTION, RTLNAME(Str),0             },
     589             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     590             : { "StrComp",        SbxINTEGER,   3 | _FUNCTION, RTLNAME(StrComp),0         },
     591             :   { "String1",      SbxSTRING, 0,NULL,0 },
     592             :   { "String2",      SbxSTRING, 0,NULL,0 },
     593             :   { "Compare",      SbxINTEGER,       _OPT, NULL,0 },
     594             : { "StrConv",        SbxOBJECT,   3 | _FUNCTION, RTLNAME(StrConv),0          },
     595             :   { "String",       SbxSTRING, 0,NULL,0 },
     596             :   { "Conversion",   SbxSTRING, 0,NULL,0 },
     597             :   { "LCID",         SbxINTEGER, _OPT,NULL,0 },
     598             : { "String",         SbxSTRING,    2 | _FUNCTION, RTLNAME(String),0          },
     599             :   { "Count",        SbxLONG, 0,NULL,0 },
     600             :   { "Filler",       SbxVARIANT, 0,NULL,0 },
     601             : { "StrReverse",     SbxSTRING,    1 | _FUNCTION | _COMPATONLY, RTLNAME(StrReverse),0 },
     602             :   { "String1",      SbxSTRING, 0,NULL,0 },
     603             : { "Switch",         SbxVARIANT,   2 | _FUNCTION, RTLNAME(Switch),0          },
     604             :   { "Expression",   SbxVARIANT, 0,NULL,0 },
     605             :   { "Value",        SbxVARIANT, 0,NULL,0 },
     606             : 
     607             : { "Tan",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Tan),0             },
     608             :   { "number",       SbxDOUBLE, 0,NULL,0 },
     609             : { "Time",           SbxVARIANT,       _LFUNCTION,RTLNAME(Time),0            },
     610             : { "Timer",          SbxDATE,          _FUNCTION, RTLNAME(Timer),0           },
     611             : { "TimeSerial",     SbxDATE,      3 | _FUNCTION, RTLNAME(TimeSerial),0      },
     612             :   { "Hour",         SbxLONG, 0,NULL,0 },
     613             :   { "Minute",       SbxLONG, 0,NULL,0 },
     614             :   { "Second",       SbxLONG, 0,NULL,0 },
     615             : { "TimeValue",      SbxDATE,      1 | _FUNCTION, RTLNAME(TimeValue),0       },
     616             :   { "String",       SbxSTRING, 0,NULL,0 },
     617             : { "TOGGLE",         SbxINTEGER,       _CPROP,    RTLNAME(TOGGLE),0          },
     618             : #ifdef DBG_TRACE_BASIC
     619             : { "TraceCommand",   SbxNULL,      1 | _FUNCTION, RTLNAME(TraceCommand),0 },
     620             :   { "Command",      SbxSTRING,  0,NULL,0 },
     621             : #endif
     622             : { "Trim",           SbxSTRING,    1 | _FUNCTION, RTLNAME(Trim),0            },
     623             :   { "String",       SbxSTRING, 0,NULL,0 },
     624             : { "True",           SbxBOOL,          _CPROP,    RTLNAME(True),0            },
     625             : { "TwipsPerPixelX", SbxLONG,          _FUNCTION, RTLNAME(TwipsPerPixelX),0  },
     626             : { "TwipsPerPixelY", SbxLONG,          _FUNCTION, RTLNAME(TwipsPerPixelY),0  },
     627             : 
     628             : { "TYP_AUTHORFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_AUTHORFLD),0       },
     629             : { "TYP_CHAPTERFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_CHAPTERFLD),0      },
     630             : { "TYP_CONDTXTFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_CONDTXTFLD),0      },
     631             : { "TYP_DATEFLD",            SbxINTEGER,       _CPROP,    RTLNAME(TYP_DATEFLD),0         },
     632             : { "TYP_DBFLD",              SbxINTEGER,       _CPROP,    RTLNAME(TYP_DBFLD),0           },
     633             : { "TYP_DBNAMEFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_DBNAMEFLD),0       },
     634             : { "TYP_DBNEXTSETFLD",       SbxINTEGER,       _CPROP,    RTLNAME(TYP_DBNEXTSETFLD),0    },
     635             : { "TYP_DBNUMSETFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_DBNUMSETFLD),0     },
     636             : { "TYP_DBSETNUMBERFLD",     SbxINTEGER,       _CPROP,    RTLNAME(TYP_DBSETNUMBERFLD),0  },
     637             : { "TYP_DDEFLD",             SbxINTEGER,       _CPROP,    RTLNAME(TYP_DDEFLD),0          },
     638             : { "TYP_DOCINFOFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_DOCINFOFLD),0      },
     639             : { "TYP_DOCSTATFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_DOCSTATFLD),0      },
     640             : { "TYP_EXTUSERFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_EXTUSERFLD),0      },
     641             : { "TYP_FILENAMEFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_FILENAMEFLD),0     },
     642             : { "TYP_FIXDATEFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_FIXDATEFLD),0      },
     643             : { "TYP_FIXTIMEFLD",         SbxINTEGER,       _CPROP,    RTLNAME(TYP_FIXTIMEFLD),0      },
     644             : { "TYP_FORMELFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_FORMELFLD),0       },
     645             : { "TYP_GETFLD",             SbxINTEGER,       _CPROP,    RTLNAME(TYP_GETFLD),0          },
     646             : { "TYP_GETREFFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_GETREFFLD),0       },
     647             : { "TYP_GETREFPAGEFLD",      SbxINTEGER,       _CPROP,    RTLNAME(TYP_GETREFPAGEFLD),0   },
     648             : { "TYP_HIDDENPARAFLD",      SbxINTEGER,       _CPROP,    RTLNAME(TYP_HIDDENPARAFLD),0   },
     649             : { "TYP_HIDDENTXTFLD",       SbxINTEGER,       _CPROP,    RTLNAME(TYP_HIDDENTXTFLD),0    },
     650             : { "TYP_INPUTFLD",           SbxINTEGER,       _CPROP,    RTLNAME(TYP_INPUTFLD),0        },
     651             : { "TYP_INTERNETFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_INTERNETFLD),0     },
     652             : { "TYP_JUMPEDITFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_JUMPEDITFLD),0     },
     653             : { "TYP_MACROFLD",           SbxINTEGER,       _CPROP,    RTLNAME(TYP_MACROFLD),0        },
     654             : { "TYP_NEXTPAGEFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_NEXTPAGEFLD),0     },
     655             : { "TYP_PAGENUMBERFLD",      SbxINTEGER,       _CPROP,    RTLNAME(TYP_PAGENUMBERFLD),0   },
     656             : { "TYP_POSTITFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_POSTITFLD),0       },
     657             : { "TYP_PREVPAGEFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_PREVPAGEFLD),0     },
     658             : { "TYP_SEQFLD",             SbxINTEGER,       _CPROP,    RTLNAME(TYP_SEQFLD),0          },
     659             : { "TYP_SETFLD",             SbxINTEGER,       _CPROP,    RTLNAME(TYP_SETFLD),0          },
     660             : { "TYP_SETINPFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_SETINPFLD),0       },
     661             : { "TYP_SETREFFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_SETREFFLD),0       },
     662             : { "TYP_SETREFPAGEFLD",      SbxINTEGER,       _CPROP,    RTLNAME(TYP_SETREFPAGEFLD),0   },
     663             : { "TYP_TEMPLNAMEFLD",           SbxINTEGER,       _CPROP,    RTLNAME(TYP_TEMPLNAMEFLD),0},
     664             : { "TYP_TIMEFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_TIMEFLD),0             },
     665             : { "TYP_USERFLD",        SbxINTEGER,       _CPROP,    RTLNAME(TYP_USERFLD),0             },
     666             : { "TYP_USRINPFLD",          SbxINTEGER,       _CPROP,    RTLNAME(TYP_USRINPFLD),0       },
     667             : 
     668             : { "TypeLen",        SbxINTEGER,    1 | _FUNCTION, RTLNAME(TypeLen),0        },
     669             :   { "Var",          SbxVARIANT, 0,NULL,0 },
     670             : { "TypeName",       SbxSTRING,    1 | _FUNCTION, RTLNAME(TypeName),0        },
     671             :   { "Var",          SbxVARIANT, 0,NULL,0 },
     672             : 
     673             : { "UBound",         SbxLONG,      1 | _FUNCTION, RTLNAME(UBound),0          },
     674             :   { "Var",          SbxVARIANT, 0,NULL,0 },
     675             : { "UCase",          SbxSTRING,    1 | _FUNCTION, RTLNAME(UCase),0           },
     676             :   { "String",       SbxSTRING, 0,NULL,0 },
     677             : { "Unload",         SbxNULL,      1 | _FUNCTION, RTLNAME(Unload),0          },
     678             :   { "Dialog",       SbxOBJECT, 0,NULL,0 },
     679             : 
     680             : { "Val",            SbxDOUBLE,    1 | _FUNCTION, RTLNAME(Val),0             },
     681             :   { "String",       SbxSTRING, 0,NULL,0 },
     682             : { "VarType",        SbxINTEGER,   1 | _FUNCTION, RTLNAME(VarType),0         },
     683             :   { "Var",          SbxVARIANT, 0,NULL,0 },
     684             : { "V_EMPTY",        SbxINTEGER,       _CPROP,    RTLNAME(V_EMPTY),0         },
     685             : { "V_NULL",         SbxINTEGER,       _CPROP,    RTLNAME(V_NULL),0          },
     686             : { "V_INTEGER",      SbxINTEGER,       _CPROP,    RTLNAME(V_INTEGER),0       },
     687             : { "V_LONG",         SbxINTEGER,       _CPROP,    RTLNAME(V_LONG),0          },
     688             : { "V_SINGLE",       SbxINTEGER,       _CPROP,    RTLNAME(V_SINGLE),0        },
     689             : { "V_DOUBLE",       SbxINTEGER,       _CPROP,    RTLNAME(V_DOUBLE),0        },
     690             : { "V_CURRENCY",     SbxINTEGER,       _CPROP,    RTLNAME(V_CURRENCY),0      },
     691             : { "V_DATE",         SbxINTEGER,       _CPROP,    RTLNAME(V_DATE),0          },
     692             : { "V_STRING",       SbxINTEGER,       _CPROP,    RTLNAME(V_STRING),0        },
     693             : 
     694             : { "Wait",           SbxNULL,      1 | _FUNCTION, RTLNAME(Wait),0            },
     695             :   { "Milliseconds", SbxLONG, 0,NULL,0 },
     696             : { "FuncCaller",          SbxVARIANT,      _FUNCTION, RTLNAME(FuncCaller),0      },
     697             : //#i64882#
     698             : { "WaitUntil",          SbxNULL,      1 | _FUNCTION, RTLNAME(WaitUntil),0      },
     699             :   { "Date", SbxDOUBLE, 0,NULL,0 },
     700             : { "Weekday",        SbxINTEGER,   2 | _FUNCTION, RTLNAME(Weekday),0         },
     701             :   { "Date",         SbxDATE, 0,NULL,0 },
     702             :   { "Firstdayofweek", SbxINTEGER, _OPT, NULL,0 },
     703             : { "WeekdayName",    SbxSTRING,    3 | _FUNCTION | _COMPATONLY, RTLNAME(WeekdayName),0 },
     704             :   { "Weekday",      SbxINTEGER, 0,NULL,0 },
     705             :   { "Abbreviate",   SbxBOOL,      _OPT, NULL,0 },
     706             :   { "Firstdayofweek", SbxINTEGER, _OPT, NULL,0 },
     707             : { "Year",           SbxINTEGER,   1 | _FUNCTION, RTLNAME(Year),0            },
     708             :   { "Date",         SbxDATE, 0,NULL,0 },
     709             : 
     710             : { NULL,             SbxNULL,     -1,NULL,0 }};  // end of the table
     711             : 
     712        3188 : SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r )
     713             : {
     714             :     // do we have to initialize the hashcodes?
     715        3188 :     Methods* p = aMethods;
     716        3188 :     if( !p->nHash )
     717       35496 :       while( p->nArgs != -1 )
     718             :     {
     719       35264 :         OUString aName_ = OUString::createFromAscii( p->pName );
     720       35264 :         p->nHash = SbxVariable::MakeHashCode( aName_ );
     721       35264 :         p += ( p->nArgs & _ARGSMASK ) + 1;
     722       35264 :     }
     723             : 
     724             :     // #i92642: Remove default properties
     725        3188 :     Remove( OUString("Name"), SbxCLASS_DONTCARE );
     726        3188 :     Remove( OUString("Parent"), SbxCLASS_DONTCARE );
     727             : 
     728        3188 :     SetParent( pb );
     729             : 
     730        3188 :     pStdFactory = new SbStdFactory;
     731        3188 :     SbxBase::AddFactory( pStdFactory );
     732             : 
     733        3188 :     Insert( new SbStdClipboard );
     734        3188 : }
     735             : 
     736       10148 : SbiStdObject::~SbiStdObject()
     737             : {
     738        2537 :     SbxBase::RemoveFactory( pStdFactory );
     739        2537 :     delete pStdFactory;
     740        7611 : }
     741             : 
     742             : // Finding an element:
     743             : // It runs linearly through the method table here until an
     744             : // adequate method is has been found. Because of the bits in
     745             : // the nArgs-field the adequate instance of an SbxObjElement
     746             : // is created then. If the method/property hasn't been found,
     747             : // return NULL without error code, so that a whole chain of
     748             : // objects can be asked for the method/property.
     749             : 
     750      644003 : SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
     751             : {
     752             :     // entered already?
     753      644003 :     SbxVariable* pVar = SbxObject::Find( rName, t );
     754      644003 :     if( !pVar )
     755             :     {
     756             :         // else search one
     757      641223 :         sal_uInt16 nHash_ = SbxVariable::MakeHashCode( rName );
     758      641223 :         Methods* p = aMethods;
     759      641223 :         bool bFound = false;
     760      641223 :         short nIndex = 0;
     761      641223 :         sal_uInt16 nSrchMask = _TYPEMASK;
     762      641223 :         switch( t )
     763             :         {
     764        1119 :             case SbxCLASS_METHOD:   nSrchMask = _METHOD; break;
     765        2703 :             case SbxCLASS_PROPERTY: nSrchMask = _PROPERTY; break;
     766      250057 :             case SbxCLASS_OBJECT:   nSrchMask = _OBJECT; break;
     767      387344 :             default: break;
     768             :         }
     769   196066477 :         while( p->nArgs != -1 )
     770             :         {
     771   389569336 :             if( ( p->nArgs & nSrchMask )
     772   116194058 :              && ( p->nHash == nHash_ )
     773   194785905 :              && ( rName.equalsIgnoreAsciiCaseAscii( p->pName ) ) )
     774             :             {
     775         637 :                 SbiInstance* pInst = GetSbData()->pInst;
     776         637 :                 bFound = true;
     777         637 :                 if( p->nArgs & _COMPTMASK )
     778             :                 {
     779           2 :                     if ( !pInst || ( pInst->IsCompatibility()  && ( _NORMONLY & p->nArgs )  ) || ( !pInst->IsCompatibility()  && ( _COMPATONLY & p->nArgs )  ) )
     780           1 :                         bFound = false;
     781             :                 }
     782         637 :                 break;
     783             :             }
     784   194784031 :             nIndex += ( p->nArgs & _ARGSMASK ) + 1;
     785   194784031 :             p = aMethods + nIndex;
     786             :         }
     787             : 
     788      641223 :         if( bFound )
     789             :         {
     790             :             // isolate Args-fields:
     791         636 :             SbxFlagBits nAccess = static_cast<SbxFlagBits>(( p->nArgs & _RWMASK ) >> 8);
     792         636 :             short nType   = ( p->nArgs & _TYPEMASK );
     793         636 :             if( p->nArgs & _CONST )
     794          56 :                 nAccess |= SBX_CONST;
     795         636 :             OUString aName_ = OUString::createFromAscii( p->pName );
     796         636 :             SbxClassType eCT = SbxCLASS_OBJECT;
     797         636 :             if( nType & _PROPERTY )
     798             :             {
     799          60 :                 eCT = SbxCLASS_PROPERTY;
     800             :             }
     801         576 :             else if( nType & _METHOD )
     802             :             {
     803         576 :                 eCT = SbxCLASS_METHOD;
     804             :             }
     805         636 :             pVar = Make( aName_, eCT, p->eType, ( p->nArgs & _FUNCTION ) == _FUNCTION );
     806         636 :             pVar->SetUserData( nIndex + 1 );
     807         636 :             pVar->SetFlags( nAccess );
     808             :         }
     809             :     }
     810      644003 :     return pVar;
     811             : }
     812             : 
     813             : // SetModified must be pinched off at the RTL
     814       12066 : void SbiStdObject::SetModified( bool )
     815             : {
     816       12066 : }
     817             : 
     818             : 
     819        1589 : void SbiStdObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
     820             :                              const SfxHint& rHint, const TypeId& rHintType )
     821             : 
     822             : {
     823        1589 :     const SbxHint* pHint = dynamic_cast<const SbxHint*>(&rHint);
     824        1589 :     if( pHint )
     825             :     {
     826        1589 :         SbxVariable* pVar = pHint->GetVar();
     827        1589 :         SbxArray* pPar_ = pVar->GetParameters();
     828        1589 :         sal_uLong t = pHint->GetId();
     829        1589 :         sal_uInt16 nCallId = (sal_uInt16) pVar->GetUserData();
     830        1589 :         if( nCallId )
     831             :         {
     832        1589 :             if( t == SBX_HINT_INFOWANTED )
     833           1 :                 pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) );
     834             :             else
     835             :             {
     836        1588 :                 bool bWrite = false;
     837        1588 :                 if( t == SBX_HINT_DATACHANGED )
     838           0 :                     bWrite = true;
     839        1588 :                 if( t == SBX_HINT_DATAWANTED || bWrite )
     840             :                 {
     841        1588 :                     RtlCall p = aMethods[ nCallId-1 ].pFunc;
     842        1588 :                     SbxArrayRef rPar( pPar_ );
     843        1588 :                     if( !pPar_ )
     844             :                     {
     845        1008 :                         rPar = pPar_ = new SbxArray;
     846        1008 :                         pPar_->Put( pVar, 0 );
     847             :                     }
     848        1588 :                     p( static_cast<StarBASIC*>(GetParent()), *pPar_, bWrite );
     849        3177 :                     return;
     850             :                 }
     851             :             }
     852             :         }
     853           1 :         SbxObject::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
     854             :     }
     855             : }
     856             : 
     857             : // building the info-structure for single elements
     858             : // if nIdx = 0, don't create anything (Std-Props!)
     859             : 
     860           1 : SbxInfo* SbiStdObject::GetInfo( short nIdx )
     861             : {
     862           1 :     if( !nIdx )
     863           0 :         return NULL;
     864           1 :     Methods* p = &aMethods[ --nIdx ];
     865           1 :     SbxInfo* pInfo_ = new SbxInfo;
     866           1 :     short nPar = p->nArgs & _ARGSMASK;
     867           7 :     for( short i = 0; i < nPar; i++ )
     868             :     {
     869           6 :         p++;
     870           6 :         OUString aName_ = OUString::createFromAscii( p->pName );
     871           6 :         SbxFlagBits nFlags_ = static_cast<SbxFlagBits>(( p->nArgs >> 8 ) & 0x03);
     872           6 :         if( p->nArgs & _OPT )
     873             :         {
     874           3 :             nFlags_ |= SBX_OPTIONAL;
     875             :         }
     876           6 :         pInfo_->AddParam( aName_, p->eType, nFlags_ );
     877           6 :     }
     878           1 :     return pInfo_;
     879             : }
     880             : 
     881             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11