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