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

Generated by: LCOV version 1.10