merge the formfield patch from ooo-build
[ooovba.git] / basic / source / runtime / stdobj.cxx
blob38ba7cd57f89c2570ea6291995396e3f9df59650
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: stdobj.cxx,v $
10 * $Revision: 1.28 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_basic.hxx"
34 #include "runtime.hxx"
35 #include "stdobj.hxx"
36 #include <basic/sbstdobj.hxx>
37 #include "rtlproto.hxx"
38 #include "sbintern.hxx"
39 #include "errobject.hxx"
41 // Das nArgs-Feld eines Tabelleneintrags ist wie folgt verschluesselt:
42 // Zur Zeit wird davon ausgegangen, dass Properties keine Parameter
43 // benoetigen!
45 #define _ARGSMASK 0x007F // Bis zu 127 Argumente
46 #define _COMPTMASK 0x0080 // Only valid in compatibility mode
47 #define _RWMASK 0x0F00 // Maske fuer R/W-Bits
48 #define _TYPEMASK 0xF000 // Maske fuer den Typ des Eintrags
50 #define _READ 0x0100 // kann gelesen werden
51 #define _BWRITE 0x0200 // kann as Lvalue verwendet werden
52 #define _LVALUE _BWRITE // kann as Lvalue verwendet werden
53 #define _READWRITE 0x0300 // beides
54 #define _OPT 0x0400 // Parameter ist optional
55 #define _CONST 0x0800 // Property ist const
56 #define _METHOD 0x3000 // Masken-Bits fuer eine Methode
57 #define _PROPERTY 0x4000 // Masken-Bit fuer eine Property
58 #define _OBJECT 0x8000 // Masken-Bit fuer ein Objekt
59 // Kombination von oberen Bits:
60 #define _FUNCTION 0x1100 // Maske fuer Function
61 #define _LFUNCTION 0x1300 // Maske fuer Function, die auch als Lvalue geht
62 #define _SUB 0x2100 // Maske fuer Sub
63 #define _ROPROP 0x4100 // Maske Read Only-Property
64 #define _WOPROP 0x4200 // Maske Write Only-Property
65 #define _RWPROP 0x4300 // Maske Read/Write-Property
66 #define _CPROP 0x4900 // Maske fuer Konstante
68 struct Methods {
69 const char* pName; // Name des Eintrags
70 SbxDataType eType; // Datentyp
71 short nArgs; // Argumente und Flags
72 RtlCall pFunc; // Function Pointer
73 USHORT nHash; // Hashcode
76 static Methods aMethods[] = {
78 { "AboutStarBasic", SbxNULL, 1 | _FUNCTION, RTLNAME(AboutStarBasic),0 },
79 { "Name", SbxSTRING, 0,NULL,0 },
80 { "Abs", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Abs),0 },
81 { "number", SbxDOUBLE, 0,NULL,0 },
82 { "Array", SbxOBJECT, _FUNCTION, RTLNAME(Array),0 },
83 { "Asc", SbxLONG, 1 | _FUNCTION, RTLNAME(Asc),0 },
84 { "string", SbxSTRING, 0,NULL,0 },
85 { "AscW", SbxLONG, 1 | _FUNCTION | _COMPTMASK, RTLNAME(Asc),0},
86 { "string", SbxSTRING, 0,NULL,0 },
87 { "Atn", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Atn),0 },
88 { "number", SbxDOUBLE, 0,NULL,0 },
89 { "ATTR_ARCHIVE", SbxINTEGER, _CPROP, RTLNAME(ATTR_ARCHIVE),0 },
90 { "ATTR_DIRECTORY", SbxINTEGER, _CPROP, RTLNAME(ATTR_DIRECTORY),0 },
91 { "ATTR_HIDDEN", SbxINTEGER, _CPROP, RTLNAME(ATTR_HIDDEN),0 },
92 { "ATTR_NORMAL", SbxINTEGER, _CPROP, RTLNAME(ATTR_NORMAL),0 },
93 { "ATTR_READONLY", SbxINTEGER, _CPROP, RTLNAME(ATTR_READONLY),0 },
94 { "ATTR_SYSTEM", SbxINTEGER, _CPROP, RTLNAME(ATTR_SYSTEM),0 },
95 { "ATTR_VOLUME", SbxINTEGER, _CPROP, RTLNAME(ATTR_VOLUME),0 },
97 { "Beep", SbxNULL, _FUNCTION, RTLNAME(Beep),0 },
98 { "Blue", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Blue),0 },
99 { "RGB-Value", SbxLONG, 0,NULL,0 },
101 { "CBool", SbxBOOL, 1 | _FUNCTION, RTLNAME(CBool),0 },
102 { "expression", SbxVARIANT, 0,NULL,0 },
103 { "CByte", SbxBYTE, 1 | _FUNCTION, RTLNAME(CByte),0 },
104 { "expression", SbxVARIANT, 0,NULL,0 },
105 { "CCur", SbxCURRENCY, 1 | _FUNCTION, RTLNAME(CCur),0 },
106 { "expression", SbxVARIANT, 0,NULL,0 },
107 { "CDate", SbxDATE, 1 | _FUNCTION, RTLNAME(CDate),0 },
108 { "expression", SbxVARIANT, 0,NULL,0 },
109 { "CDateFromIso", SbxDATE, 1 | _FUNCTION, RTLNAME(CDateFromIso),0 },
110 { "IsoDate", SbxSTRING, 0,NULL,0 },
111 { "CDateToIso", SbxSTRING, 1 | _FUNCTION, RTLNAME(CDateToIso),0 },
112 { "Date", SbxDATE, 0,NULL,0 },
113 { "CDec", SbxDECIMAL, 1 | _FUNCTION, RTLNAME(CDec),0 },
114 { "expression", SbxVARIANT, 0,NULL,0 },
115 { "CDbl", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(CDbl),0 },
116 { "expression", SbxVARIANT, 0,NULL,0 },
117 { "CF_BITMAP", SbxINTEGER, _CPROP, RTLNAME(CF_BITMAP),0 },
118 { "CF_METAFILEPICT",SbxINTEGER, _CPROP, RTLNAME(CF_METAFILEPICT),0 },
119 { "CF_TEXT", SbxINTEGER, _CPROP, RTLNAME(CF_TEXT),0 },
120 { "ChDir", SbxNULL, 1 | _FUNCTION, RTLNAME(ChDir),0 },
121 { "string", SbxSTRING, 0,NULL,0 },
122 { "ChDrive", SbxNULL, 1 | _FUNCTION, RTLNAME(ChDrive),0 },
123 { "string", SbxSTRING, 0,NULL,0 },
125 { "Choose", SbxVARIANT, 2 | _FUNCTION, RTLNAME(Choose),0 },
126 { "Index", SbxINTEGER, 0,NULL,0 },
127 { "Expression", SbxVARIANT, 0,NULL,0 },
129 { "Chr", SbxSTRING, 1 | _FUNCTION, RTLNAME(Chr),0 },
130 { "string", SbxINTEGER, 0,NULL,0 },
131 { "ChrW", SbxSTRING, 1 | _FUNCTION | _COMPTMASK, RTLNAME(Chr),0},
132 { "string", SbxINTEGER, 0,NULL,0 },
134 { "CInt", SbxINTEGER, 1 | _FUNCTION, RTLNAME(CInt),0 },
135 { "expression", SbxVARIANT, 0,NULL,0 },
136 { "CLEAR_ALLTABS", SbxINTEGER, _CPROP, RTLNAME(CLEAR_ALLTABS),0 },
137 { "CLEAR_TAB", SbxINTEGER, _CPROP, RTLNAME(CLEAR_TAB),0 },
138 { "CLng", SbxLONG, 1 | _FUNCTION, RTLNAME(CLng),0 },
139 { "expression", SbxVARIANT, 0,NULL,0 },
140 { "CompatibilityMode", SbxBOOL, 1 | _FUNCTION, RTLNAME(CompatibilityMode),0},
141 { "bEnable", SbxBOOL, 0,NULL,0 },
142 { "ConvertFromUrl", SbxSTRING, 1 | _FUNCTION, RTLNAME(ConvertFromUrl),0 },
143 { "Url", SbxSTRING, 0,NULL,0 },
144 { "ConvertToUrl", SbxSTRING, 1 | _FUNCTION, RTLNAME(ConvertToUrl),0 },
145 { "SystemPath", SbxSTRING, 0,NULL,0 },
146 { "Cos", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Cos),0 },
147 { "number", SbxDOUBLE, 0,NULL,0 },
148 { "CreateObject", SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateObject ),0 },
149 { "class", SbxSTRING, 0,NULL,0 },
150 { "CreateUnoListener",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateUnoListener ),0 },
151 { "prefix", SbxSTRING, 0,NULL,0 },
152 { "typename", SbxSTRING, 0,NULL,0 },
153 { "CreateUnoDialog",SbxOBJECT, 2 | _FUNCTION, RTLNAME( CreateUnoDialog ),0 },
154 { "dialoglibrary",SbxOBJECT, 0,NULL,0 },
155 { "dialogname", SbxSTRING, 0,NULL,0 },
156 { "CreateUnoService",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateUnoService ),0 },
157 { "servicename", SbxSTRING, 0,NULL,0 },
158 { "CreateUnoServiceWithArguments",SbxOBJECT, 2 | _FUNCTION, RTLNAME( CreateUnoServiceWithArguments ),0 },
159 { "servicename", SbxSTRING, 0,NULL,0 },
160 { "arguments", SbxARRAY, 0,NULL,0 },
161 { "CreateUnoStruct",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateUnoStruct ),0 },
162 { "classname", SbxSTRING, 0,NULL,0 },
163 { "CreateUnoValue", SbxOBJECT, 2 | _FUNCTION, RTLNAME( CreateUnoValue ),0 },
164 { "type", SbxSTRING, 0,NULL,0 },
165 { "value", SbxVARIANT, 0,NULL,0 },
166 { "CreatePropertySet",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreatePropertySet ),0 },
167 { "values", SbxARRAY, 0,NULL,0 },
168 { "CSng", SbxSINGLE, 1 | _FUNCTION, RTLNAME(CSng),0 },
169 { "expression", SbxVARIANT, 0,NULL,0 },
170 { "CStr", SbxSTRING, 1 | _FUNCTION, RTLNAME(CStr),0 },
171 { "expression", SbxVARIANT, 0,NULL,0 },
172 { "CurDir", SbxSTRING, 1 | _FUNCTION, RTLNAME(CurDir),0 },
173 { "string", SbxSTRING, 0,NULL,0 },
174 { "CVar", SbxVARIANT, 1 | _FUNCTION, RTLNAME(CVar),0 },
175 { "expression", SbxVARIANT, 0,NULL,0 },
176 { "CVErr", SbxVARIANT, 1 | _FUNCTION, RTLNAME(CVErr),0 },
177 { "expression", SbxVARIANT, 0,NULL,0 },
178 { "DDB", SbxDOUBLE, 5 | _FUNCTION | _COMPTMASK, RTLNAME(DDB),0 },
179 { "Cost", SbxDOUBLE, 0, NULL,0 },
180 { "Salvage", SbxDOUBLE, 0, NULL,0 },
181 { "Life", SbxDOUBLE, 0, NULL,0 },
182 { "Period", SbxDOUBLE, 0, NULL,0 },
183 { "Factor", SbxVARIANT, _OPT, NULL,0 },
184 { "Date", SbxDATE, _LFUNCTION,RTLNAME(Date),0 },
185 { "DateAdd", SbxDATE, 3 | _FUNCTION, RTLNAME(DateAdd),0 },
186 { "Interval", SbxSTRING, 0,NULL,0 },
187 { "Number", SbxLONG, 0,NULL,0 },
188 { "Date", SbxDATE, 0,NULL,0 },
189 { "DateDiff", SbxDOUBLE, 5 | _FUNCTION, RTLNAME(DateDiff),0 },
190 { "Interval", SbxSTRING, 0,NULL,0 },
191 { "Date1", SbxDATE, 0,NULL,0 },
192 { "Date2", SbxDATE, 0,NULL,0 },
193 { "Firstdayofweek" , SbxINTEGER, _OPT,NULL,0 },
194 { "Firstweekofyear", SbxINTEGER, _OPT,NULL,0 },
195 { "DatePart", SbxLONG, 4 | _FUNCTION, RTLNAME(DatePart),0 },
196 { "Interval", SbxSTRING, 0,NULL,0 },
197 { "Date", SbxDATE, 0,NULL,0 },
198 { "Firstdayofweek" , SbxINTEGER, _OPT, NULL,0 },
199 { "Firstweekofyear", SbxINTEGER, _OPT, NULL,0 },
200 { "DateSerial", SbxDATE, 3 | _FUNCTION, RTLNAME(DateSerial),0 },
201 { "Year", SbxINTEGER, 0,NULL,0 },
202 { "Month", SbxINTEGER, 0,NULL,0 },
203 { "Day", SbxINTEGER, 0,NULL,0 },
204 { "DateValue", SbxDATE, 1 | _FUNCTION, RTLNAME(DateValue),0 },
205 { "String", SbxSTRING, 0,NULL,0 },
206 { "Day", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Day),0 },
207 { "Date", SbxDATE, 0,NULL,0 },
208 { "Ddeexecute", SbxNULL, 2 | _FUNCTION, RTLNAME(DDEExecute),0 },
209 { "Channel", SbxLONG, 0,NULL,0 },
210 { "Command", SbxSTRING, 0,NULL,0 },
211 { "Ddeinitiate", SbxINTEGER, 2 | _FUNCTION, RTLNAME(DDEInitiate),0 },
212 { "Application", SbxSTRING, 0,NULL,0 },
213 { "Topic", SbxSTRING, 0,NULL,0 },
214 { "Ddepoke", SbxNULL, 3 | _FUNCTION, RTLNAME(DDEPoke),0 },
215 { "Channel", SbxLONG, 0,NULL,0 },
216 { "Item", SbxSTRING, 0,NULL,0 },
217 { "Data", SbxSTRING, 0,NULL,0 },
218 { "Dderequest", SbxSTRING, 2 | _FUNCTION, RTLNAME(DDERequest),0 },
219 { "Channel", SbxLONG, 0,NULL,0 },
220 { "Item", SbxSTRING, 0,NULL,0 },
221 { "Ddeterminate", SbxNULL, 1 | _FUNCTION, RTLNAME(DDETerminate),0 },
222 { "Channel", SbxLONG, 0,NULL,0 },
223 { "Ddeterminateall", SbxNULL, _FUNCTION, RTLNAME(DDETerminateAll),0 },
224 { "DimArray", SbxOBJECT, _FUNCTION, RTLNAME(DimArray),0 },
225 { "Dir", SbxSTRING, 2 | _FUNCTION, RTLNAME(Dir),0 },
226 { "FileSpec", SbxSTRING, _OPT, NULL,0 },
227 { "attrmask", SbxINTEGER, _OPT, NULL,0 },
228 { "DumpAllObjects", SbxEMPTY, 2 | _SUB, RTLNAME(DumpAllObjects),0 },
229 { "FileSpec", SbxSTRING, 0,NULL,0 },
230 { "DumpAll", SbxINTEGER, _OPT, NULL,0 },
232 { "EqualUnoObjects",SbxBOOL, 2 | _FUNCTION, RTLNAME(EqualUnoObjects),0 },
233 { "Variant", SbxVARIANT, 0,NULL,0 },
234 { "Variant", SbxVARIANT, 0,NULL,0 },
235 { "EnableReschedule", SbxNULL, 1 | _FUNCTION, RTLNAME(EnableReschedule),0},
236 { "bEnable", SbxBOOL, 0,NULL,0 },
237 { "Environ", SbxSTRING, 1 | _FUNCTION, RTLNAME(Environ),0 },
238 { "Environmentstring",SbxSTRING, 0,NULL,0 },
239 { "EOF", SbxBOOL, 1 | _FUNCTION, RTLNAME(EOF),0 },
240 { "Channel", SbxINTEGER, 0,NULL,0 },
241 { "Erl", SbxLONG, _ROPROP, RTLNAME( Erl ),0 },
242 { "Err", SbxLONG, _RWPROP, RTLNAME( Err ),0 },
243 { "Error", SbxSTRING, 1 | _FUNCTION, RTLNAME( Error ),0 },
244 { "code", SbxLONG, 0,NULL,0 },
245 { "Exp", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Exp),0 },
246 { "number", SbxDOUBLE, 0,NULL,0 },
248 { "False", SbxBOOL, _CPROP, RTLNAME(False),0 },
249 { "FileAttr", SbxINTEGER, 2 | _FUNCTION, RTLNAME(FileAttr),0 },
250 { "Channel", SbxINTEGER, 0,NULL,0 },
251 { "Attributes", SbxINTEGER, 0,NULL,0 },
252 { "FileCopy", SbxNULL, 2 | _FUNCTION, RTLNAME(FileCopy),0 },
253 { "Source", SbxSTRING, 0,NULL,0 },
254 { "Destination", SbxSTRING, 0,NULL,0 },
255 { "FileDateTime", SbxSTRING, 1 | _FUNCTION, RTLNAME(FileDateTime),0 },
256 { "filename", SbxSTRING, 0,NULL,0 },
257 { "FileExists", SbxBOOL, 1 | _FUNCTION, RTLNAME(FileExists),0 },
258 { "filename", SbxSTRING, 0,NULL,0 },
259 { "FileLen", SbxLONG, 1 | _FUNCTION, RTLNAME(FileLen),0 },
260 { "filename", SbxSTRING, 0,NULL,0 },
261 { "FindObject", SbxOBJECT, 1 | _FUNCTION, RTLNAME(FindObject),0 },
262 { "Name", SbxSTRING, 0,NULL,0 },
263 { "FindPropertyObject", SbxOBJECT, 2 | _FUNCTION, RTLNAME(FindPropertyObject),0 },
264 { "Object", SbxOBJECT, 0,NULL,0 },
265 { "Name", SbxSTRING, 0,NULL,0 },
266 { "Fix", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Fix),0 },
267 { "number", SbxDOUBLE, 0,NULL,0 },
268 { "Format", SbxSTRING, 2 | _FUNCTION, RTLNAME(Format),0 },
269 { "expression", SbxVARIANT, 0,NULL,0 },
270 { "format", SbxSTRING, _OPT, NULL,0 },
271 { "FormatDateTime", SbxSTRING, 2 | _FUNCTION | _COMPTMASK, RTLNAME(FormatDateTime),0 },
272 { "Date", SbxDATE, 0,NULL,0 },
273 { "NamedFormat", SbxINTEGER, _OPT, NULL,0 },
274 { "FRAMEANCHORCHAR", SbxINTEGER, _CPROP, RTLNAME(FRAMEANCHORCHAR),0 },
275 { "FRAMEANCHORPAGE", SbxINTEGER, _CPROP, RTLNAME(FRAMEANCHORPAGE),0 },
276 { "FRAMEANCHORPARA", SbxINTEGER, _CPROP, RTLNAME(FRAMEANCHORPARA),0 },
277 { "FreeFile", SbxINTEGER, _FUNCTION, RTLNAME(FreeFile),0 },
278 { "FreeLibrary", SbxNULL, 1 | _FUNCTION, RTLNAME(FreeLibrary),0 },
279 { "Modulename", SbxSTRING, 0,NULL,0 },
281 { "FV", SbxDOUBLE, 5 | _FUNCTION | _COMPTMASK, RTLNAME(FV),0 },
282 { "Rate", SbxDOUBLE, 0, NULL,0 },
283 { "NPer", SbxDOUBLE, 0, NULL,0 },
284 { "Pmt", SbxDOUBLE, 0, NULL,0 },
285 { "PV", SbxVARIANT, _OPT, NULL,0 },
286 { "Due", SbxVARIANT, _OPT, NULL,0 },
287 { "Get", SbxNULL, 3 | _FUNCTION, RTLNAME(Get),0 },
288 { "filenumber", SbxINTEGER, 0,NULL,0 },
289 { "recordnumber", SbxLONG, 0,NULL,0 },
290 { "variablename", SbxVARIANT, 0,NULL,0 },
291 { "GetAttr", SbxINTEGER, 1 | _FUNCTION, RTLNAME(GetAttr),0 },
292 { "filename", SbxSTRING, 0,NULL,0 },
293 { "GetDefaultContext", SbxOBJECT, 0 | _FUNCTION, RTLNAME(GetDefaultContext),0 },
294 { "GetDialogZoomFactorX", SbxDOUBLE, _FUNCTION,RTLNAME(GetDialogZoomFactorX),0 },
295 { "GetDialogZoomFactorY", SbxDOUBLE, _FUNCTION,RTLNAME(GetDialogZoomFactorY),0 },
296 { "GetGUIType", SbxINTEGER, _FUNCTION,RTLNAME(GetGUIType),0 },
297 { "GetGUIVersion", SbxLONG, _FUNCTION,RTLNAME(GetGUIVersion),0 },
298 { "GetPathSeparator", SbxSTRING, _FUNCTION,RTLNAME(GetPathSeparator),0 },
299 { "GetProcessServiceManager", SbxOBJECT, 0 | _FUNCTION, RTLNAME(GetProcessServiceManager),0 },
300 { "GetSolarVersion", SbxLONG, _FUNCTION,RTLNAME(GetSolarVersion),0 },
301 { "GetSystemTicks", SbxLONG, _FUNCTION,RTLNAME(GetSystemTicks),0 },
302 { "GetSystemType", SbxINTEGER, _FUNCTION,RTLNAME(GetSystemType),0 },
303 { "GlobalScope", SbxOBJECT, _FUNCTION,RTLNAME(GlobalScope),0 },
304 { "Green", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Green),0 },
305 { "RGB-Value", SbxLONG, 0,NULL,0 },
307 { "HasUnoInterfaces", SbxBOOL, 1 | _FUNCTION, RTLNAME(HasUnoInterfaces),0},
308 { "InterfaceName",SbxSTRING, 0,NULL,0 },
309 { "Hex", SbxSTRING, 1 | _FUNCTION, RTLNAME(Hex),0 },
310 { "number", SbxLONG, 0,NULL,0 },
311 { "Hour", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Hour),0 },
312 { "Date", SbxDATE, 0,NULL,0 },
314 { "IDABORT", SbxINTEGER, _CPROP, RTLNAME(IDABORT),0 },
315 { "IDCANCEL", SbxINTEGER, _CPROP, RTLNAME(IDCANCEL),0 },
316 { "IDNO", SbxINTEGER, _CPROP, RTLNAME(IDNO),0 },
317 { "IDOK", SbxINTEGER, _CPROP, RTLNAME(IDOK),0 },
318 { "IDRETRY", SbxINTEGER, _CPROP, RTLNAME(IDRETRY),0 },
319 { "IDYES", SbxINTEGER, _CPROP, RTLNAME(IDYES),0 },
321 { "Iif", SbxVARIANT, 3 | _FUNCTION, RTLNAME(Iif),0 },
322 { "Bool", SbxBOOL, 0,NULL,0 },
323 { "Variant1", SbxVARIANT, 0,NULL,0 },
324 { "Variant2", SbxVARIANT, 0,NULL,0 },
326 { "Input", SbxSTRING, 2 | _FUNCTION | _COMPTMASK, RTLNAME(Input),0},
327 { "Number", SbxLONG, 0,NULL,0 },
328 { "FileNumber", SbxLONG, 0,NULL,0 },
329 { "InputBox", SbxSTRING, 5 | _FUNCTION, RTLNAME(InputBox),0 },
330 { "Prompt", SbxSTRING, 0,NULL,0 },
331 { "Title", SbxSTRING, _OPT, NULL,0 },
332 { "Default", SbxSTRING, _OPT, NULL,0 },
333 { "XPosTwips", SbxLONG, _OPT, NULL,0 },
334 { "YPosTwips", SbxLONG, _OPT, NULL,0 },
335 { "InStr", SbxLONG, 4 | _FUNCTION, RTLNAME(InStr),0 },
336 { "Start", SbxSTRING, _OPT, NULL,0 },
337 { "String1", SbxSTRING, 0,NULL,0 },
338 { "String2", SbxSTRING, 0,NULL,0 },
339 { "Compare", SbxINTEGER, _OPT, NULL,0 },
340 { "InStrRev", SbxLONG, 4 | _FUNCTION | _COMPTMASK, RTLNAME(InStrRev),0},
341 { "String1", SbxSTRING, 0,NULL,0 },
342 { "String2", SbxSTRING, 0,NULL,0 },
343 { "Start", SbxSTRING, _OPT, NULL,0 },
344 { "Compare", SbxINTEGER, _OPT, NULL,0 },
345 { "Int", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Int),0 },
346 { "number", SbxDOUBLE, 0,NULL,0 },
347 { "IPmt", SbxDOUBLE, 6 | _FUNCTION | _COMPTMASK, RTLNAME(IPmt),0 },
348 { "Rate", SbxDOUBLE, 0, NULL,0 },
349 { "Per", SbxDOUBLE, 0, NULL,0 },
350 { "NPer", SbxDOUBLE, 0, NULL,0 },
351 { "PV", SbxDOUBLE, 0, NULL,0 },
352 { "FV", SbxVARIANT, _OPT, NULL,0 },
353 { "Due", SbxVARIANT, _OPT, NULL,0 },
354 { "IRR", SbxDOUBLE, 2 | _FUNCTION | _COMPTMASK, RTLNAME(IRR),0 },
355 { "ValueArray", SbxARRAY, 0, NULL,0 },
356 { "Guess", SbxVARIANT, _OPT, NULL,0 },
357 { "IsArray", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsArray),0 },
358 { "Variant", SbxVARIANT, 0,NULL,0 },
359 { "IsDate", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsDate),0 },
360 { "Variant", SbxVARIANT, 0,NULL,0 },
361 { "IsEmpty", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsEmpty),0 },
362 { "Variant", SbxVARIANT, 0,NULL,0 },
363 { "IsError", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsError),0 },
364 { "Variant", SbxVARIANT, 0,NULL,0 },
365 { "IsMissing", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsMissing),0 },
366 { "Variant", SbxVARIANT, 0,NULL,0 },
367 { "IsNull", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsNull),0 },
368 { "Variant", SbxVARIANT, 0,NULL,0 },
369 { "IsNumeric", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsNumeric),0 },
370 { "Variant", SbxVARIANT, 0,NULL,0 },
371 { "IsObject", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsObject),0 },
372 { "Variant", SbxVARIANT, 0,NULL,0 },
373 { "IsUnoStruct", SbxBOOL, 1 | _FUNCTION, RTLNAME(IsUnoStruct),0 },
374 { "Variant", SbxVARIANT, 0,NULL,0 },
375 { "Join", SbxSTRING, 2 | _FUNCTION, RTLNAME(Join),0 },
376 { "list", SbxOBJECT, 0,NULL,0 },
377 { "delimiter", SbxSTRING, 0,NULL,0 },
378 { "Kill", SbxNULL, 1 | _FUNCTION, RTLNAME(Kill),0 },
379 { "filespec", SbxSTRING, 0,NULL,0 },
380 { "LBound", SbxLONG, 1 | _FUNCTION, RTLNAME(LBound),0 },
381 { "Variant", SbxVARIANT, 0,NULL,0 },
382 { "LCase", SbxSTRING, 1 | _FUNCTION, RTLNAME(LCase),0 },
383 { "string", SbxSTRING, 0,NULL,0 },
384 { "Left", SbxSTRING, 2 | _FUNCTION, RTLNAME(Left),0 },
385 { "String", SbxSTRING, 0,NULL,0 },
386 { "Count", SbxLONG, 0,NULL,0 },
387 { "Len", SbxLONG, 1 | _FUNCTION, RTLNAME(Len),0 },
388 { "StringOrVariant", SbxVARIANT, 0,NULL,0 },
389 { "Load", SbxNULL, 1 | _FUNCTION, RTLNAME(Load),0 },
390 { "object", SbxOBJECT, 0,NULL,0 },
391 { "LoadPicture", SbxOBJECT, 1 | _FUNCTION, RTLNAME(LoadPicture),0 },
392 { "string", SbxSTRING, 0,NULL,0 },
393 { "Loc", SbxLONG, 1 | _FUNCTION, RTLNAME(Loc),0 },
394 { "Channel", SbxINTEGER, 0,NULL,0 },
395 { "Lof", SbxLONG, 1 | _FUNCTION, RTLNAME(Lof),0 },
396 { "Channel", SbxINTEGER, 0,NULL,0 },
397 { "Log", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Log),0 },
398 { "number", SbxDOUBLE, 0,NULL,0 },
399 { "LTrim", SbxSTRING, 1 | _FUNCTION, RTLNAME(LTrim),0 },
400 { "string", SbxSTRING, 0,NULL,0 },
402 { "MB_ABORTRETRYIGNORE", SbxINTEGER, _CPROP, RTLNAME(MB_ABORTRETRYIGNORE),0},
403 { "MB_APPLMODAL", SbxINTEGER, _CPROP, RTLNAME(MB_APPLMODAL),0 },
404 { "MB_DEFBUTTON1", SbxINTEGER, _CPROP, RTLNAME(MB_DEFBUTTON1),0 },
405 { "MB_DEFBUTTON2", SbxINTEGER, _CPROP, RTLNAME(MB_DEFBUTTON2),0 },
406 { "MB_DEFBUTTON3", SbxINTEGER, _CPROP, RTLNAME(MB_DEFBUTTON3),0 },
407 { "MB_ICONEXCLAMATION", SbxINTEGER, _CPROP, RTLNAME(MB_ICONEXCLAMATION),0},
408 { "MB_ICONINFORMATION", SbxINTEGER, _CPROP, RTLNAME(MB_ICONINFORMATION),0},
409 { "MB_ICONQUESTION",SbxINTEGER, _CPROP, RTLNAME(MB_ICONQUESTION),0 },
410 { "MB_ICONSTOP", SbxINTEGER, _CPROP, RTLNAME(MB_ICONSTOP),0 },
411 { "MB_OK", SbxINTEGER, _CPROP, RTLNAME(MB_OK),0 },
412 { "MB_OKCANCEL", SbxINTEGER, _CPROP, RTLNAME(MB_OKCANCEL),0 },
413 { "MB_RETRYCANCEL", SbxINTEGER, _CPROP, RTLNAME(MB_RETRYCANCEL),0 },
414 { "MB_SYSTEMMODAL", SbxINTEGER, _CPROP, RTLNAME(MB_SYSTEMMODAL),0 },
415 { "MB_YESNO", SbxINTEGER, _CPROP, RTLNAME(MB_YESNO),0 },
416 { "MB_YESNOCANCEL", SbxINTEGER, _CPROP, RTLNAME(MB_YESNOCANCEL),0 },
418 { "Me", SbxOBJECT, 0 | _FUNCTION | _COMPTMASK, RTLNAME(Me),0 },
419 { "Mid", SbxSTRING, 3 | _LFUNCTION,RTLNAME(Mid),0 },
420 { "String", SbxSTRING, 0,NULL,0 },
421 { "StartPos", SbxLONG, 0,NULL,0 },
422 { "Length", SbxLONG, _OPT, NULL,0 },
423 { "Minute", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Minute),0 },
424 { "Date", SbxDATE, 0,NULL,0 },
425 { "MIRR", SbxDOUBLE, 2 | _FUNCTION | _COMPTMASK, RTLNAME(MIRR),0 },
426 { "ValueArray", SbxARRAY, 0, NULL,0 },
427 { "FinanceRate", SbxDOUBLE, 0, NULL,0 },
428 { "ReinvestRate", SbxDOUBLE, 0, NULL,0 },
429 { "MkDir", SbxNULL, 1 | _FUNCTION, RTLNAME(MkDir),0 },
430 { "pathname", SbxSTRING, 0,NULL,0 },
431 { "Month", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Month),0 },
432 { "Date", SbxDATE, 0,NULL,0 },
433 { "MonthName", SbxSTRING, 2 | _FUNCTION | _COMPTMASK, RTLNAME(MonthName),0 },
434 { "Month", SbxINTEGER, 0,NULL,0 },
435 { "Abbreviate", SbxBOOL, _OPT, NULL,0 },
436 { "MsgBox", SbxINTEGER, 5 | _FUNCTION, RTLNAME(MsgBox),0 },
437 { "Prompt", SbxSTRING, 0,NULL,0 },
438 { "Buttons", SbxINTEGER, _OPT, NULL,0 },
439 { "Title", SbxSTRING, _OPT, NULL,0 },
440 { "Helpfile", SbxSTRING, _OPT, NULL,0 },
441 { "Context", SbxINTEGER, _OPT, NULL,0 },
443 { "Nothing", SbxOBJECT, _CPROP, RTLNAME(Nothing),0 },
444 { "Now", SbxDATE, _FUNCTION, RTLNAME(Now),0 },
445 { "NPer", SbxDOUBLE, 5 | _FUNCTION | _COMPTMASK, RTLNAME(NPer),0 },
446 { "Rate", SbxDOUBLE, 0, NULL,0 },
447 { "Pmt", SbxDOUBLE, 0, NULL,0 },
448 { "PV", SbxDOUBLE, 0, NULL,0 },
449 { "FV", SbxVARIANT, _OPT, NULL,0 },
450 { "Due", SbxVARIANT, _OPT, NULL,0 },
451 { "NPV", SbxDOUBLE, 2 | _FUNCTION | _COMPTMASK, RTLNAME(NPV),0 },
452 { "Rate", SbxDOUBLE, 0, NULL,0 },
453 { "ValueArray", SbxARRAY, 0, NULL,0 },
454 { "Null", SbxNULL, _CPROP, RTLNAME(Null),0 },
456 { "Oct", SbxSTRING, 1 | _FUNCTION, RTLNAME(Oct),0 },
457 { "number", SbxLONG, 0,NULL,0 },
459 { "Partition", SbxSTRING, 4 | _FUNCTION, RTLNAME(Partition),0 },
460 { "number", SbxLONG, 0,NULL,0 },
461 { "start", SbxLONG, 0,NULL,0 },
462 { "stop", SbxLONG, 0,NULL,0 },
463 { "interval", SbxLONG, 0,NULL,0 },
464 { "Pi", SbxDOUBLE, _CPROP, RTLNAME(PI),0 },
466 { "Pmt", SbxDOUBLE, 5 | _FUNCTION | _COMPTMASK, RTLNAME(Pmt),0 },
467 { "Rate", SbxDOUBLE, 0, NULL,0 },
468 { "NPer", SbxDOUBLE, 0, NULL,0 },
469 { "PV", SbxDOUBLE, 0, NULL,0 },
470 { "FV", SbxVARIANT, _OPT, NULL,0 },
471 { "Due", SbxVARIANT, _OPT, NULL,0 },
473 { "PPmt", SbxDOUBLE, 6 | _FUNCTION | _COMPTMASK, RTLNAME(PPmt),0 },
474 { "Rate", SbxDOUBLE, 0, NULL,0 },
475 { "Per", SbxDOUBLE, 0, NULL,0 },
476 { "NPer", SbxDOUBLE, 0, NULL,0 },
477 { "PV", SbxDOUBLE, 0, NULL,0 },
478 { "FV", SbxVARIANT, _OPT, NULL,0 },
479 { "Due", SbxVARIANT, _OPT, NULL,0 },
481 { "Put", SbxNULL, 3 | _FUNCTION, RTLNAME(Put),0 },
482 { "filenumber", SbxINTEGER, 0,NULL,0 },
483 { "recordnumber", SbxLONG, 0,NULL,0 },
484 { "variablename", SbxVARIANT, 0,NULL,0 },
486 { "PV", SbxDOUBLE, 5 | _FUNCTION | _COMPTMASK, RTLNAME(PV),0 },
487 { "Rate", SbxDOUBLE, 0, NULL,0 },
488 { "NPer", SbxDOUBLE, 0, NULL,0 },
489 { "Pmt", SbxDOUBLE, 0, NULL,0 },
490 { "FV", SbxVARIANT, _OPT, NULL,0 },
491 { "Due", SbxVARIANT, _OPT, NULL,0 },
493 { "QBColor", SbxLONG, 1 | _FUNCTION, RTLNAME(QBColor),0 },
494 { "number", SbxINTEGER, 0,NULL,0 },
496 { "Randomize", SbxNULL, 1 | _FUNCTION, RTLNAME(Randomize),0 },
497 { "Number", SbxDOUBLE, _OPT, NULL,0 },
498 { "Rate", SbxDOUBLE, 6 | _FUNCTION | _COMPTMASK, RTLNAME(Rate),0 },
499 { "NPer", SbxDOUBLE, 0, NULL,0 },
500 { "Pmt", SbxDOUBLE, 0, NULL,0 },
501 { "PV", SbxDOUBLE, 0, NULL,0 },
502 { "FV", SbxVARIANT, _OPT, NULL,0 },
503 { "Due", SbxVARIANT, _OPT, NULL,0 },
504 { "Guess", SbxVARIANT, _OPT, NULL,0 },
505 { "Red", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Red),0 },
506 { "RGB-Value", SbxLONG, 0,NULL,0 },
507 { "Reset", SbxNULL, 0 | _FUNCTION, RTLNAME(Reset),0 },
508 { "ResolvePath", SbxSTRING, 1 | _FUNCTION, RTLNAME(ResolvePath),0 },
509 { "Path", SbxSTRING, 0,NULL,0 },
510 { "RGB", SbxLONG, 3 | _FUNCTION, RTLNAME(RGB),0 },
511 { "Red", SbxINTEGER, 0,NULL,0 },
512 { "Green", SbxINTEGER, 0,NULL,0 },
513 { "Blue", SbxINTEGER, 0,NULL,0 },
514 { "Replace", SbxSTRING, 6 | _FUNCTION, RTLNAME(Replace),0 },
515 { "Expression", SbxSTRING, 0,NULL,0 },
516 { "Find", SbxSTRING, 0,NULL,0 },
517 { "Replace", SbxSTRING, 0,NULL,0 },
518 { "Start", SbxINTEGER, _OPT, NULL,0 },
519 { "Count", SbxINTEGER, _OPT, NULL,0 },
520 { "Compare", SbxINTEGER, _OPT, NULL,0 },
521 { "Right", SbxSTRING, 2 | _FUNCTION, RTLNAME(Right),0 },
522 { "String", SbxSTRING, 0,NULL,0 },
523 { "Count", SbxLONG, 0,NULL,0 },
524 { "RmDir", SbxNULL, 1 | _FUNCTION, RTLNAME(RmDir),0 },
525 { "pathname", SbxSTRING, 0,NULL,0 },
526 { "Round", SbxDOUBLE, 2 | _FUNCTION | _COMPTMASK, RTLNAME(Round),0},
527 { "Expression", SbxDOUBLE, 0,NULL,0 },
528 { "Numdecimalplaces", SbxINTEGER, _OPT, NULL,0 },
529 { "Rnd", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Rnd),0 },
530 { "Number", SbxDOUBLE, _OPT, NULL,0 },
531 { "RTL", SbxOBJECT, 0 | _FUNCTION | _COMPTMASK, RTLNAME(RTL),0},
532 { "RTrim", SbxSTRING, 1 | _FUNCTION, RTLNAME(RTrim),0 },
533 { "string", SbxSTRING, 0,NULL,0 },
535 { "SavePicture", SbxNULL, 2 | _FUNCTION, RTLNAME(SavePicture),0 },
536 { "object", SbxOBJECT, 0,NULL,0 },
537 { "string", SbxSTRING, 0,NULL,0 },
538 { "Second", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Second),0 },
539 { "Date", SbxDATE, 0,NULL,0 },
540 { "Seek", SbxLONG, 1 | _FUNCTION, RTLNAME(Seek),0 },
541 { "Channel", SbxINTEGER, 0,NULL,0 },
542 { "SendKeys", SbxNULL, 2 | _FUNCTION, RTLNAME(SendKeys),0 },
543 { "String", SbxSTRING, 0,NULL,0 },
544 { "Wait", SbxBOOL, _OPT, NULL,0 },
545 { "DoEvents", SbxINTEGER, 0 | _FUNCTION, RTLNAME(DoEvents),0 },
546 { "SetAttr", SbxNULL, 2 | _FUNCTION, RTLNAME(SetAttr),0 },
547 { "File" , SbxSTRING, 0,NULL,0 },
548 { "Attributes", SbxINTEGER, 0,NULL,0 },
549 { "SET_OFF", SbxINTEGER, _CPROP, RTLNAME(SET_OFF),0 },
550 { "SET_ON", SbxINTEGER, _CPROP, RTLNAME(SET_ON),0 },
551 { "SET_TAB", SbxINTEGER, _CPROP, RTLNAME(SET_TAB),0 },
552 { "Sgn", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Sgn),0 },
553 { "number", SbxDOUBLE, 0,NULL,0 },
554 { "Shell", SbxLONG, 2 | _FUNCTION, RTLNAME(Shell),0 },
555 { "Commandstring",SbxSTRING, 0,NULL,0 },
556 { "WindowStyle", SbxINTEGER, _OPT, NULL,0 },
557 { "Sin", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Sin),0 },
558 { "number", SbxDOUBLE, 0,NULL,0 },
559 { "SLN", SbxDOUBLE, 2 | _FUNCTION | _COMPTMASK, RTLNAME(SLN),0 },
560 { "Cost", SbxDOUBLE, 0,NULL,0 },
561 { "Double", SbxDOUBLE, 0,NULL,0 },
562 { "Life", SbxDOUBLE, 0,NULL,0 },
563 { "SYD", SbxDOUBLE, 2 | _FUNCTION | _COMPTMASK, RTLNAME(SYD),0 },
564 { "Cost", SbxDOUBLE, 0,NULL,0 },
565 { "Salvage", SbxDOUBLE, 0,NULL,0 },
566 { "Life", SbxDOUBLE, 0,NULL,0 },
567 { "Period", SbxDOUBLE, 0,NULL,0 },
568 { "Space", SbxSTRING, 1 | _FUNCTION, RTLNAME(Space),0 },
569 { "string", SbxLONG, 0,NULL,0 },
570 { "Spc", SbxSTRING, 1 | _FUNCTION, RTLNAME(Spc),0 },
571 { "Count", SbxLONG, 0,NULL,0 },
572 { "Split", SbxOBJECT, 3 | _FUNCTION, RTLNAME(Split),0 },
573 { "expression", SbxSTRING, 0,NULL,0 },
574 { "delimiter", SbxSTRING, 0,NULL,0 },
575 { "count", SbxLONG, 0,NULL,0 },
576 { "Sqr", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Sqr),0 },
577 { "number", SbxDOUBLE, 0,NULL,0 },
578 { "Str", SbxSTRING, 1 | _FUNCTION, RTLNAME(Str),0 },
579 { "number", SbxDOUBLE, 0,NULL,0 },
580 { "StrComp", SbxINTEGER, 3 | _FUNCTION, RTLNAME(StrComp),0 },
581 { "String1", SbxSTRING, 0,NULL,0 },
582 { "String2", SbxSTRING, 0,NULL,0 },
583 { "Compare", SbxINTEGER, _OPT, NULL,0 },
584 { "StrConv", SbxOBJECT, 3 | _FUNCTION, RTLNAME(StrConv),0 },
585 { "String", SbxSTRING, 0,NULL,0 },
586 { "Conversion", SbxSTRING, 0,NULL,0 },
587 { "LCID", SbxINTEGER, _OPT,NULL,0 },
588 { "String", SbxSTRING, 2 | _FUNCTION, RTLNAME(String),0 },
589 { "Count", SbxLONG, 0,NULL,0 },
590 { "Filler", SbxVARIANT, 0,NULL,0 },
591 { "StrReverse", SbxSTRING, 1 | _FUNCTION | _COMPTMASK, RTLNAME(StrReverse),0 },
592 { "String1", SbxSTRING, 0,NULL,0 },
593 { "Switch", SbxVARIANT, 2 | _FUNCTION, RTLNAME(Switch),0 },
594 { "Expression", SbxVARIANT, 0,NULL,0 },
595 { "Value", SbxVARIANT, 0,NULL,0 },
597 { "Tan", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Tan),0 },
598 { "number", SbxDOUBLE, 0,NULL,0 },
599 { "Time", SbxVARIANT, _LFUNCTION,RTLNAME(Time),0 },
600 { "Timer", SbxDATE, _FUNCTION, RTLNAME(Timer),0 },
601 { "TimeSerial", SbxDATE, 3 | _FUNCTION, RTLNAME(TimeSerial),0 },
602 { "Hour", SbxLONG, 0,NULL,0 },
603 { "Minute", SbxLONG, 0,NULL,0 },
604 { "Second", SbxLONG, 0,NULL,0 },
605 { "TimeValue", SbxDATE, 1 | _FUNCTION, RTLNAME(TimeValue),0 },
606 { "String", SbxSTRING, 0,NULL,0 },
607 { "TOGGLE", SbxINTEGER, _CPROP, RTLNAME(TOGGLE),0 },
608 { "Trim", SbxSTRING, 1 | _FUNCTION, RTLNAME(Trim),0 },
609 { "String", SbxSTRING, 0,NULL,0 },
610 { "True", SbxBOOL, _CPROP, RTLNAME(True),0 },
611 { "TwipsPerPixelX", SbxLONG, _FUNCTION, RTLNAME(TwipsPerPixelX),0 },
612 { "TwipsPerPixelY", SbxLONG, _FUNCTION, RTLNAME(TwipsPerPixelY),0 },
614 { "TYP_AUTHORFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_AUTHORFLD),0 },
615 { "TYP_CHAPTERFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_CHAPTERFLD),0 },
616 { "TYP_CONDTXTFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_CONDTXTFLD),0 },
617 { "TYP_DATEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DATEFLD),0 },
618 { "TYP_DBFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DBFLD),0 },
619 { "TYP_DBNAMEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DBNAMEFLD),0 },
620 { "TYP_DBNEXTSETFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DBNEXTSETFLD),0 },
621 { "TYP_DBNUMSETFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DBNUMSETFLD),0 },
622 { "TYP_DBSETNUMBERFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DBSETNUMBERFLD),0 },
623 { "TYP_DDEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DDEFLD),0 },
624 { "TYP_DOCINFOFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DOCINFOFLD),0 },
625 { "TYP_DOCSTATFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_DOCSTATFLD),0 },
626 { "TYP_EXTUSERFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_EXTUSERFLD),0 },
627 { "TYP_FILENAMEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_FILENAMEFLD),0 },
628 { "TYP_FIXDATEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_FIXDATEFLD),0 },
629 { "TYP_FIXTIMEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_FIXTIMEFLD),0 },
630 { "TYP_FORMELFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_FORMELFLD),0 },
631 { "TYP_GETFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_GETFLD),0 },
632 { "TYP_GETREFFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_GETREFFLD),0 },
633 { "TYP_GETREFPAGEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_GETREFPAGEFLD),0 },
634 { "TYP_HIDDENPARAFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_HIDDENPARAFLD),0 },
635 { "TYP_HIDDENTXTFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_HIDDENTXTFLD),0 },
636 { "TYP_INPUTFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_INPUTFLD),0 },
637 { "TYP_INTERNETFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_INTERNETFLD),0 },
638 { "TYP_JUMPEDITFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_JUMPEDITFLD),0 },
639 { "TYP_MACROFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_MACROFLD),0 },
640 { "TYP_NEXTPAGEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_NEXTPAGEFLD),0 },
641 { "TYP_PAGENUMBERFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_PAGENUMBERFLD),0 },
642 { "TYP_POSTITFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_POSTITFLD),0 },
643 { "TYP_PREVPAGEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_PREVPAGEFLD),0 },
644 { "TYP_SEQFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_SEQFLD),0 },
645 { "TYP_SETFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_SETFLD),0 },
646 { "TYP_SETINPFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_SETINPFLD),0 },
647 { "TYP_SETREFFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_SETREFFLD),0 },
648 { "TYP_SETREFPAGEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_SETREFPAGEFLD),0 },
649 { "TYP_TEMPLNAMEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_TEMPLNAMEFLD),0},
650 { "TYP_TIMEFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_TIMEFLD),0 },
651 { "TYP_USERFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_USERFLD),0 },
652 { "TYP_USRINPFLD", SbxINTEGER, _CPROP, RTLNAME(TYP_USRINPFLD),0 },
654 { "TypeLen", SbxINTEGER, 1 | _FUNCTION, RTLNAME(TypeLen),0 },
655 { "Var", SbxVARIANT, 0,NULL,0 },
656 { "TypeName", SbxSTRING, 1 | _FUNCTION, RTLNAME(TypeName),0 },
657 { "Var", SbxVARIANT, 0,NULL,0 },
659 { "UBound", SbxLONG, 1 | _FUNCTION, RTLNAME(UBound),0 },
660 { "Var", SbxVARIANT, 0,NULL,0 },
661 { "UCase", SbxSTRING, 1 | _FUNCTION, RTLNAME(UCase),0 },
662 { "String", SbxSTRING, 0,NULL,0 },
663 { "Unload", SbxNULL, 1 | _FUNCTION, RTLNAME(Unload),0 },
664 { "Dialog", SbxOBJECT, 0,NULL,0 },
666 { "Val", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Val),0 },
667 { "String", SbxSTRING, 0,NULL,0 },
668 { "VarType", SbxINTEGER, 1 | _FUNCTION, RTLNAME(VarType),0 },
669 { "Var", SbxVARIANT, 0,NULL,0 },
670 { "V_EMPTY", SbxINTEGER, _CPROP, RTLNAME(V_EMPTY),0 },
671 { "V_NULL", SbxINTEGER, _CPROP, RTLNAME(V_NULL),0 },
672 { "V_INTEGER", SbxINTEGER, _CPROP, RTLNAME(V_INTEGER),0 },
673 { "V_LONG", SbxINTEGER, _CPROP, RTLNAME(V_LONG),0 },
674 { "V_SINGLE", SbxINTEGER, _CPROP, RTLNAME(V_SINGLE),0 },
675 { "V_DOUBLE", SbxINTEGER, _CPROP, RTLNAME(V_DOUBLE),0 },
676 { "V_CURRENCY", SbxINTEGER, _CPROP, RTLNAME(V_CURRENCY),0 },
677 { "V_DATE", SbxINTEGER, _CPROP, RTLNAME(V_DATE),0 },
678 { "V_STRING", SbxINTEGER, _CPROP, RTLNAME(V_STRING),0 },
680 { "Wait", SbxNULL, 1 | _FUNCTION, RTLNAME(Wait),0 },
681 { "Milliseconds", SbxLONG, 0,NULL,0 },
682 { "FuncCaller", SbxVARIANT, _FUNCTION, RTLNAME(FuncCaller),0 },
683 //#i64882#
684 { "WaitUntil", SbxNULL, 1 | _FUNCTION, RTLNAME(WaitUntil),0 },
685 { "Date", SbxDOUBLE, 0,NULL,0 },
686 { "Weekday", SbxINTEGER, 2 | _FUNCTION, RTLNAME(Weekday),0 },
687 { "Date", SbxDATE, 0,NULL,0 },
688 { "Firstdayofweek", SbxINTEGER, _OPT, NULL,0 },
689 { "WeekdayName", SbxSTRING, 3 | _FUNCTION | _COMPTMASK, RTLNAME(WeekdayName),0 },
690 { "Weekday", SbxINTEGER, 0,NULL,0 },
691 { "Abbreviate", SbxBOOL, _OPT, NULL,0 },
692 { "Firstdayofweek", SbxINTEGER, _OPT, NULL,0 },
693 { "Year", SbxINTEGER, 1 | _FUNCTION, RTLNAME(Year),0 },
694 { "Date", SbxDATE, 0,NULL,0 },
696 { NULL, SbxNULL, -1,NULL,0 }}; // Tabellenende
698 SbiStdObject::SbiStdObject( const String& r, StarBASIC* pb ) : SbxObject( r )
700 // Muessen wir die Hashcodes initialisieren?
701 Methods* p = aMethods;
702 if( !p->nHash )
703 while( p->nArgs != -1 )
705 String aName_ = String::CreateFromAscii( p->pName );
706 p->nHash = SbxVariable::MakeHashCode( aName_ );
707 p += ( p->nArgs & _ARGSMASK ) + 1;
710 SetParent( pb );
712 pStdFactory = new SbStdFactory;
713 SbxBase::AddFactory( pStdFactory );
715 Insert( new SbStdClipboard );
718 SbiStdObject::~SbiStdObject()
720 SbxBase::RemoveFactory( pStdFactory );
721 delete pStdFactory;
724 // Suche nach einem Element:
725 // Hier wird linear durch die Methodentabelle gegangen, bis eine
726 // passende Methode gefunden wurde. Auf Grund der Bits im nArgs-Feld
727 // wird dann die passende Instanz eines SbxObjElement generiert.
728 // Wenn die Methode/Property nicht gefunden wurde, nur NULL ohne
729 // Fehlercode zurueckliefern, da so auch eine ganze Chain von
730 // Objekten nach der Methode/Property befragt werden kann.
732 SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t )
734 // #TODO #FIXME hack for substituting ooo-basic Err with vba-ish
735 // ErrObject object
736 static String sErr( RTL_CONSTASCII_USTRINGPARAM("Err") );
737 if ( rName.EqualsIgnoreCaseAscii( sErr ) )
738 return SbxErrObject::getErrObject();
739 // Bereits eingetragen?
740 SbxVariable* pVar = SbxObject::Find( rName, t );
741 if( !pVar )
743 // sonst suchen
744 USHORT nHash_ = SbxVariable::MakeHashCode( rName );
745 Methods* p = aMethods;
746 BOOL bFound = FALSE;
747 short nIndex = 0;
748 USHORT nSrchMask = _TYPEMASK;
749 switch( t )
751 case SbxCLASS_METHOD: nSrchMask = _METHOD; break;
752 case SbxCLASS_PROPERTY: nSrchMask = _PROPERTY; break;
753 case SbxCLASS_OBJECT: nSrchMask = _OBJECT; break;
754 default: break;
756 while( p->nArgs != -1 )
758 if( ( p->nArgs & nSrchMask )
759 && ( p->nHash == nHash_ )
760 && ( rName.EqualsIgnoreCaseAscii( p->pName ) ) )
762 bFound = TRUE;
763 if( p->nArgs & _COMPTMASK )
765 SbiInstance* pInst = pINST;
766 if( !pInst || !pInst->IsCompatibility() )
767 bFound = FALSE;
769 break;
771 nIndex += ( p->nArgs & _ARGSMASK ) + 1;
772 p = aMethods + nIndex;
775 if( bFound )
777 // Args-Felder isolieren:
778 short nAccess = ( p->nArgs & _RWMASK ) >> 8;
779 short nType = ( p->nArgs & _TYPEMASK );
780 if( p->nArgs & _CONST )
781 nAccess |= SBX_CONST;
782 String aName_ = String::CreateFromAscii( p->pName );
783 SbxClassType eCT = SbxCLASS_OBJECT;
784 if( nType & _PROPERTY )
785 eCT = SbxCLASS_PROPERTY;
786 else if( nType & _METHOD )
787 eCT = SbxCLASS_METHOD;
788 pVar = Make( aName_, eCT, p->eType );
789 pVar->SetUserData( nIndex + 1 );
790 pVar->SetFlags( nAccess );
793 return pVar;
796 // SetModified muß bei der RTL abgklemmt werden
797 void SbiStdObject::SetModified( BOOL )
801 // Aufruf einer Property oder Methode.
803 void SbiStdObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
804 const SfxHint& rHint, const TypeId& rHintType )
807 const SbxHint* pHint = PTR_CAST(SbxHint,&rHint);
808 if( pHint )
810 SbxVariable* pVar = pHint->GetVar();
811 SbxArray* pPar_ = pVar->GetParameters();
812 ULONG t = pHint->GetId();
813 USHORT nCallId = (USHORT) pVar->GetUserData();
814 if( nCallId )
816 if( t == SBX_HINT_INFOWANTED )
817 pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) );
818 else
820 BOOL bWrite = FALSE;
821 if( t == SBX_HINT_DATACHANGED )
822 bWrite = TRUE;
823 if( t == SBX_HINT_DATAWANTED || bWrite )
825 RtlCall p = (RtlCall) aMethods[ nCallId-1 ].pFunc;
826 SbxArrayRef rPar( pPar_ );
827 if( !pPar_ )
829 rPar = pPar_ = new SbxArray;
830 pPar_->Put( pVar, 0 );
832 p( (StarBASIC*) GetParent(), *pPar_, bWrite );
833 return;
837 SbxObject::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
841 // Zusammenbau der Infostruktur fuer einzelne Elemente
842 // Falls nIdx = 0, nix erzeugen (sind Std-Props!)
844 SbxInfo* SbiStdObject::GetInfo( short nIdx )
846 if( !nIdx )
847 return NULL;
848 Methods* p = &aMethods[ --nIdx ];
849 // Wenn mal eine Hilfedatei zur Verfuegung steht:
850 // SbxInfo* pInfo_ = new SbxInfo( Hilfedateiname, p->nHelpId );
851 SbxInfo* pInfo_ = new SbxInfo;
852 short nPar = p->nArgs & _ARGSMASK;
853 for( short i = 0; i < nPar; i++ )
855 p++;
856 String aName_ = String::CreateFromAscii( p->pName );
857 USHORT nFlags_ = ( p->nArgs >> 8 ) & 0x03;
858 if( p->nArgs & _OPT )
859 nFlags_ |= SBX_OPTIONAL;
860 pInfo_->AddParam( aName_, p->eType, nFlags_ );
862 return pInfo_;