1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include <basic/sbstar.hxx> 29 #include "sbtrace.hxx" 30 31 #define RTLFUNC( name ) void SbRtl_##name( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) 32 #define RTLNAME( name ) &SbRtl_##name 33 34 typedef void( *RtlCall ) ( StarBASIC* p, SbxArray& rArgs, sal_Bool bWrite ); 35 36 // Properties 37 38 extern RTLFUNC(Date); 39 extern RTLFUNC(Err); 40 extern RTLFUNC(Erl); 41 extern RTLFUNC(False); 42 extern RTLFUNC(Empty); 43 extern RTLFUNC(Nothing); 44 extern RTLFUNC(Null); 45 extern RTLFUNC(True); 46 47 extern RTLFUNC(ATTR_NORMAL); 48 extern RTLFUNC(ATTR_READONLY); 49 extern RTLFUNC(ATTR_HIDDEN); 50 extern RTLFUNC(ATTR_SYSTEM); 51 extern RTLFUNC(ATTR_VOLUME); 52 extern RTLFUNC(ATTR_DIRECTORY); 53 extern RTLFUNC(ATTR_ARCHIVE); 54 55 extern RTLFUNC(V_EMPTY); 56 extern RTLFUNC(V_NULL); 57 extern RTLFUNC(V_INTEGER); 58 extern RTLFUNC(V_LONG); 59 extern RTLFUNC(V_SINGLE); 60 extern RTLFUNC(V_DOUBLE); 61 extern RTLFUNC(V_CURRENCY); 62 extern RTLFUNC(V_DATE); 63 extern RTLFUNC(V_STRING); 64 65 extern RTLFUNC(MB_OK); 66 extern RTLFUNC(MB_OKCANCEL); 67 extern RTLFUNC(MB_ABORTRETRYIGNORE); 68 extern RTLFUNC(MB_YESNOCANCEL); 69 extern RTLFUNC(MB_YESNO); 70 extern RTLFUNC(MB_RETRYCANCEL); 71 extern RTLFUNC(MB_ICONSTOP); 72 extern RTLFUNC(MB_ICONQUESTION); 73 extern RTLFUNC(MB_ICONEXCLAMATION); 74 extern RTLFUNC(MB_ICONINFORMATION); 75 extern RTLFUNC(MB_DEFBUTTON1); 76 extern RTLFUNC(MB_DEFBUTTON2); 77 extern RTLFUNC(MB_DEFBUTTON3); 78 extern RTLFUNC(MB_APPLMODAL); 79 extern RTLFUNC(MB_SYSTEMMODAL); 80 81 extern RTLFUNC(IDOK); 82 extern RTLFUNC(IDCANCEL); 83 extern RTLFUNC(IDABORT); 84 extern RTLFUNC(IDRETRY); 85 extern RTLFUNC(IDYES); 86 extern RTLFUNC(IDNO); 87 88 extern RTLFUNC(CF_TEXT); 89 extern RTLFUNC(CF_BITMAP); 90 extern RTLFUNC(CF_METAFILEPICT); 91 92 extern RTLFUNC(PI); 93 94 extern RTLFUNC(SET_OFF); 95 extern RTLFUNC(SET_ON); 96 extern RTLFUNC(TOGGLE); 97 98 extern RTLFUNC(TYP_AUTHORFLD); 99 extern RTLFUNC(TYP_CHAPTERFLD); 100 extern RTLFUNC(TYP_CONDTXTFLD); 101 extern RTLFUNC(TYP_DATEFLD); 102 extern RTLFUNC(TYP_DBFLD); 103 extern RTLFUNC(TYP_DBNAMEFLD); 104 extern RTLFUNC(TYP_DBNEXTSETFLD); 105 extern RTLFUNC(TYP_DBNUMSETFLD); 106 extern RTLFUNC(TYP_DBSETNUMBERFLD); 107 extern RTLFUNC(TYP_DDEFLD); 108 extern RTLFUNC(TYP_DOCINFOFLD); 109 extern RTLFUNC(TYP_DOCSTATFLD); 110 extern RTLFUNC(TYP_EXTUSERFLD); 111 extern RTLFUNC(TYP_FILENAMEFLD); 112 extern RTLFUNC(TYP_FIXDATEFLD); 113 extern RTLFUNC(TYP_FIXTIMEFLD); 114 extern RTLFUNC(TYP_FORMELFLD); 115 extern RTLFUNC(TYP_GETFLD); 116 extern RTLFUNC(TYP_GETREFFLD); 117 extern RTLFUNC(TYP_HIDDENPARAFLD); 118 extern RTLFUNC(TYP_HIDDENTXTFLD); 119 extern RTLFUNC(TYP_INPUTFLD); 120 extern RTLFUNC(TYP_MACROFLD); 121 extern RTLFUNC(TYP_NEXTPAGEFLD); 122 extern RTLFUNC(TYP_PAGENUMBERFLD); 123 extern RTLFUNC(TYP_POSTITFLD); 124 extern RTLFUNC(TYP_PREVPAGEFLD); 125 extern RTLFUNC(TYP_SEQFLD); 126 extern RTLFUNC(TYP_SETFLD); 127 extern RTLFUNC(TYP_SETINPFLD); 128 extern RTLFUNC(TYP_SETREFFLD); 129 extern RTLFUNC(TYP_TEMPLNAMEFLD); 130 extern RTLFUNC(TYP_TIMEFLD); 131 extern RTLFUNC(TYP_USERFLD); 132 extern RTLFUNC(TYP_USRINPFLD); 133 extern RTLFUNC(TYP_SETREFPAGEFLD); 134 extern RTLFUNC(TYP_GETREFPAGEFLD); 135 extern RTLFUNC(TYP_INTERNETFLD); 136 extern RTLFUNC(TYP_JUMPEDITFLD); 137 138 extern RTLFUNC(FRAMEANCHORPAGE); 139 extern RTLFUNC(FRAMEANCHORPARA); 140 extern RTLFUNC(FRAMEANCHORCHAR); 141 142 extern RTLFUNC(CLEAR_ALLTABS); 143 extern RTLFUNC(CLEAR_TAB); 144 extern RTLFUNC(SET_TAB); 145 146 extern RTLFUNC(LINEPROP); 147 extern RTLFUNC(LINE_1); 148 extern RTLFUNC(LINE_15); 149 extern RTLFUNC(LINE_2); 150 151 // Methoden 152 153 extern RTLFUNC(CreateObject); 154 extern RTLFUNC(Error); 155 extern RTLFUNC(Sin); 156 extern RTLFUNC(Abs); 157 extern RTLFUNC(Asc); 158 extern RTLFUNC(Atn); 159 extern RTLFUNC(Chr); 160 extern RTLFUNC(ChrW); 161 extern RTLFUNC(Cos); 162 extern RTLFUNC(CurDir); 163 extern RTLFUNC(ChDir); // JSM 164 extern RTLFUNC(ChDrive); // JSM 165 extern RTLFUNC(FileCopy); // JSM 166 extern RTLFUNC(Kill); // JSM 167 extern RTLFUNC(MkDir); // JSM 168 extern RTLFUNC(RmDir); // JSM 169 extern RTLFUNC(SendKeys); // JSM 170 extern RTLFUNC(DimArray); 171 extern RTLFUNC(Dir); 172 extern RTLFUNC(DoEvents); 173 extern RTLFUNC(Exp); 174 extern RTLFUNC(FileLen); 175 extern RTLFUNC(Fix); 176 extern RTLFUNC(Hex); 177 extern RTLFUNC(Input); 178 extern RTLFUNC(InStr); 179 extern RTLFUNC(InStrRev); 180 extern RTLFUNC(Int); 181 extern RTLFUNC(Join); 182 extern RTLFUNC(LCase); 183 extern RTLFUNC(Left); 184 extern RTLFUNC(Log); 185 extern RTLFUNC(LTrim); 186 extern RTLFUNC(Mid); 187 extern RTLFUNC(Oct); 188 extern RTLFUNC(Replace); 189 extern RTLFUNC(Right); 190 extern RTLFUNC(RTrim); 191 extern RTLFUNC(RTL); 192 extern RTLFUNC(Sgn); 193 extern RTLFUNC(Space); 194 extern RTLFUNC(Split); 195 extern RTLFUNC(Sqr); 196 extern RTLFUNC(Str); 197 extern RTLFUNC(StrComp); 198 extern RTLFUNC(String); 199 extern RTLFUNC(StrReverse); 200 extern RTLFUNC(Tan); 201 extern RTLFUNC(UCase); 202 extern RTLFUNC(Val); 203 extern RTLFUNC(Len); 204 extern RTLFUNC(Spc); 205 extern RTLFUNC(DateSerial); 206 extern RTLFUNC(TimeSerial); 207 extern RTLFUNC(DateValue); 208 extern RTLFUNC(TimeValue); 209 extern RTLFUNC(Day); 210 extern RTLFUNC(Hour); 211 extern RTLFUNC(Minute); 212 extern RTLFUNC(Month); 213 extern RTLFUNC(MonthName); 214 extern RTLFUNC(Now); 215 extern RTLFUNC(Second); 216 extern RTLFUNC(Time); 217 extern RTLFUNC(Timer); 218 extern RTLFUNC(Weekday); 219 extern RTLFUNC(WeekdayName); 220 extern RTLFUNC(Year); 221 extern RTLFUNC(Date); 222 extern RTLFUNC(InputBox); 223 extern RTLFUNC(Me); 224 extern RTLFUNC(MsgBox); 225 extern RTLFUNC(IsArray); 226 extern RTLFUNC(IsDate); 227 extern RTLFUNC(IsEmpty); 228 extern RTLFUNC(IsError); 229 extern RTLFUNC(IsNull); 230 extern RTLFUNC(IsNumeric); 231 extern RTLFUNC(IsObject); 232 extern RTLFUNC(IsUnoStruct); 233 234 extern RTLFUNC(FileDateTime); 235 extern RTLFUNC(Format); 236 extern RTLFUNC(GetAttr); 237 extern RTLFUNC(Randomize); // JSM 238 extern RTLFUNC(Round); 239 extern RTLFUNC(Rnd); 240 extern RTLFUNC(Shell); 241 extern RTLFUNC(VarType); 242 extern RTLFUNC(TypeName); 243 extern RTLFUNC(TypeLen); 244 245 extern RTLFUNC(EOF); 246 extern RTLFUNC(FileAttr); 247 extern RTLFUNC(Loc); 248 extern RTLFUNC(Lof); 249 extern RTLFUNC(Seek); 250 extern RTLFUNC(SetAttr); // JSM 251 extern RTLFUNC(Reset); // JSM 252 253 extern RTLFUNC(DDEInitiate); 254 extern RTLFUNC(DDETerminate); 255 extern RTLFUNC(DDETerminateAll); 256 extern RTLFUNC(DDERequest); 257 extern RTLFUNC(DDEExecute); 258 extern RTLFUNC(DDEPoke); 259 260 extern RTLFUNC(FreeFile); 261 extern RTLFUNC(IsMissing); 262 extern RTLFUNC(LBound); 263 extern RTLFUNC(UBound); 264 extern RTLFUNC(RGB); 265 extern RTLFUNC(QBColor); 266 extern RTLFUNC(StrConv); 267 268 extern RTLFUNC(Beep); 269 270 extern RTLFUNC(Load); 271 extern RTLFUNC(Unload); 272 extern RTLFUNC(AboutStarBasic); 273 extern RTLFUNC(LoadPicture); 274 extern RTLFUNC(SavePicture); 275 276 extern RTLFUNC(CallByName); 277 extern RTLFUNC(CBool); // JSM 278 extern RTLFUNC(CByte); // JSM 279 extern RTLFUNC(CCur); // JSM 280 extern RTLFUNC(CDate); // JSM 281 extern RTLFUNC(CDbl); // JSM 282 extern RTLFUNC(CInt); // JSM 283 extern RTLFUNC(CLng); // JSM 284 extern RTLFUNC(CSng); // JSM 285 extern RTLFUNC(CStr); // JSM 286 extern RTLFUNC(CVar); // JSM 287 extern RTLFUNC(CVErr); // JSM 288 289 extern RTLFUNC(Iif); // JSM 290 291 extern RTLFUNC(DumpAllObjects); 292 293 extern RTLFUNC(GetSystemType); 294 extern RTLFUNC(GetGUIType); 295 extern RTLFUNC(Red); 296 extern RTLFUNC(Green); 297 extern RTLFUNC(Blue); 298 299 extern RTLFUNC(Switch); 300 extern RTLFUNC(Wait); 301 //i#64882# add new WaitUntil 302 extern RTLFUNC(WaitUntil); 303 304 extern RTLFUNC(GetGUIVersion); 305 extern RTLFUNC(Choose); 306 extern RTLFUNC(Trim); 307 308 extern RTLFUNC(DateAdd); 309 extern RTLFUNC(DateDiff); 310 extern RTLFUNC(DatePart); 311 extern RTLFUNC(FormatDateTime); 312 extern RTLFUNC(GetSolarVersion); 313 extern RTLFUNC(TwipsPerPixelX); 314 extern RTLFUNC(TwipsPerPixelY); 315 extern RTLFUNC(FreeLibrary); 316 extern RTLFUNC(Array); 317 extern RTLFUNC(FindObject); 318 extern RTLFUNC(FindPropertyObject); 319 extern RTLFUNC(EnableReschedule); 320 321 extern RTLFUNC(Put); 322 extern RTLFUNC(Get); 323 extern RTLFUNC(Environ); 324 extern RTLFUNC(GetDialogZoomFactorX); 325 extern RTLFUNC(GetDialogZoomFactorY); 326 extern RTLFUNC(GetSystemTicks); 327 extern RTLFUNC(GetPathSeparator); 328 extern RTLFUNC(ResolvePath); 329 extern RTLFUNC(CreateUnoStruct); 330 extern RTLFUNC(CreateUnoService); 331 extern RTLFUNC(CreateUnoServiceWithArguments); 332 extern RTLFUNC(CreateUnoValue); 333 extern RTLFUNC(GetProcessServiceManager); 334 extern RTLFUNC(GetDefaultContext); 335 extern RTLFUNC(CreatePropertySet); 336 extern RTLFUNC(CreateUnoListener); 337 extern RTLFUNC(HasUnoInterfaces); 338 extern RTLFUNC(EqualUnoObjects); 339 extern RTLFUNC(CreateUnoDialog); 340 extern RTLFUNC(GlobalScope); 341 extern RTLFUNC(FileExists); 342 extern RTLFUNC(ConvertToUrl); 343 extern RTLFUNC(ConvertFromUrl); 344 extern RTLFUNC(CDateToIso); 345 extern RTLFUNC(CDateFromIso); 346 extern RTLFUNC(CompatibilityMode); 347 extern RTLFUNC(CDec); 348 extern RTLFUNC(CaptureAssertions); 349 350 extern RTLFUNC(Partition); // Fong 351 352 #ifdef DBG_TRACE_BASIC 353 extern RTLFUNC(TraceCommand); 354 #endif 355 356 extern double Now_Impl(); 357 extern void Wait_Impl( bool bDurationBased, SbxArray& rPar ); 358