1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_basic.hxx" 26 27 #include "runtime.hxx" 28 #include "stdobj.hxx" 29 #include "rtlproto.hxx" 30 #include "errobject.hxx" 31 32 33 // Properties und Methoden legen beim Get (bWrite = sal_False) den Returnwert 34 // im Element 0 des Argv ab; beim Put (bWrite = sal_True) wird der Wert aus 35 // Element 0 gespeichert. 36 RTLFUNC(Erl)37RTLFUNC(Erl) 38 { 39 (void)pBasic; 40 (void)bWrite; 41 42 rPar.Get( 0 )->PutLong( StarBASIC::GetErl() ); 43 } 44 RTLFUNC(Err)45RTLFUNC(Err) 46 { 47 (void)pBasic; 48 (void)bWrite; 49 50 if( SbiRuntime::isVBAEnabled() ) 51 { 52 rPar.Get( 0 )->PutObject( SbxErrObject::getErrObject() ); 53 } 54 else 55 { 56 if( bWrite ) 57 { 58 sal_Int32 nVal = rPar.Get( 0 )->GetLong(); 59 if( nVal <= 65535L ) 60 StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16) nVal ) ); 61 } 62 else 63 rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) ); 64 } 65 } 66 RTLFUNC(False)67RTLFUNC(False) 68 { 69 (void)pBasic; 70 (void)bWrite; 71 72 rPar.Get(0)->PutBool( sal_False ); 73 } 74 RTLFUNC(Empty)75RTLFUNC(Empty) 76 { 77 (void)pBasic; 78 (void)bWrite; 79 (void)rPar; 80 } 81 RTLFUNC(Nothing)82RTLFUNC(Nothing) 83 { 84 (void)pBasic; 85 (void)bWrite; 86 87 // liefert eine leere Objekt-Variable. 88 rPar.Get( 0 )->PutObject( NULL ); 89 } 90 RTLFUNC(Null)91RTLFUNC(Null) 92 { 93 (void)pBasic; 94 (void)bWrite; 95 96 // liefert eine leere Objekt-Variable. 97 rPar.Get( 0 )->PutNull(); 98 } 99 RTLFUNC(PI)100RTLFUNC(PI) 101 { 102 (void)pBasic; 103 (void)bWrite; 104 105 rPar.Get( 0 )->PutDouble( F_PI ); 106 } 107 RTLFUNC(True)108RTLFUNC(True) 109 { 110 (void)pBasic; 111 (void)bWrite; 112 113 rPar.Get( 0 )->PutBool( sal_True ); 114 } 115 RTLFUNC(ATTR_NORMAL)116RTLFUNC(ATTR_NORMAL) 117 { 118 (void)pBasic; 119 (void)bWrite; 120 121 rPar.Get(0)->PutInteger(0); 122 } RTLFUNC(ATTR_READONLY)123RTLFUNC(ATTR_READONLY) 124 { 125 (void)pBasic; 126 (void)bWrite; 127 128 rPar.Get(0)->PutInteger(1); 129 } RTLFUNC(ATTR_HIDDEN)130RTLFUNC(ATTR_HIDDEN) 131 { 132 (void)pBasic; 133 (void)bWrite; 134 135 rPar.Get(0)->PutInteger(2); 136 } RTLFUNC(ATTR_SYSTEM)137RTLFUNC(ATTR_SYSTEM) 138 { 139 (void)pBasic; 140 (void)bWrite; 141 142 rPar.Get(0)->PutInteger(4); 143 } RTLFUNC(ATTR_VOLUME)144RTLFUNC(ATTR_VOLUME) 145 { 146 (void)pBasic; 147 (void)bWrite; 148 149 rPar.Get(0)->PutInteger(8); 150 } RTLFUNC(ATTR_DIRECTORY)151RTLFUNC(ATTR_DIRECTORY) 152 { 153 (void)pBasic; 154 (void)bWrite; 155 156 rPar.Get(0)->PutInteger(16); 157 } RTLFUNC(ATTR_ARCHIVE)158RTLFUNC(ATTR_ARCHIVE) 159 { 160 (void)pBasic; 161 (void)bWrite; 162 163 rPar.Get(0)->PutInteger(32); 164 } 165 RTLFUNC(V_EMPTY)166RTLFUNC(V_EMPTY) 167 { 168 (void)pBasic; 169 (void)bWrite; 170 171 rPar.Get(0)->PutInteger(0); 172 } RTLFUNC(V_NULL)173RTLFUNC(V_NULL) 174 { 175 (void)pBasic; 176 (void)bWrite; 177 178 rPar.Get(0)->PutInteger(1); 179 } RTLFUNC(V_INTEGER)180RTLFUNC(V_INTEGER) 181 { 182 (void)pBasic; 183 (void)bWrite; 184 185 rPar.Get(0)->PutInteger(2); 186 } RTLFUNC(V_LONG)187RTLFUNC(V_LONG) 188 { 189 (void)pBasic; 190 (void)bWrite; 191 192 rPar.Get(0)->PutInteger(3); 193 } RTLFUNC(V_SINGLE)194RTLFUNC(V_SINGLE) 195 { 196 (void)pBasic; 197 (void)bWrite; 198 199 rPar.Get(0)->PutInteger(4); 200 } RTLFUNC(V_DOUBLE)201RTLFUNC(V_DOUBLE) 202 { 203 (void)pBasic; 204 (void)bWrite; 205 206 rPar.Get(0)->PutInteger(5); 207 } RTLFUNC(V_CURRENCY)208RTLFUNC(V_CURRENCY) 209 { 210 (void)pBasic; 211 (void)bWrite; 212 213 rPar.Get(0)->PutInteger(6); 214 } RTLFUNC(V_DATE)215RTLFUNC(V_DATE) 216 { 217 (void)pBasic; 218 (void)bWrite; 219 220 rPar.Get(0)->PutInteger(7); 221 } RTLFUNC(V_STRING)222RTLFUNC(V_STRING) 223 { 224 (void)pBasic; 225 (void)bWrite; 226 227 rPar.Get(0)->PutInteger(8); 228 } 229 RTLFUNC(MB_OK)230RTLFUNC(MB_OK) 231 { 232 (void)pBasic; 233 (void)bWrite; 234 235 rPar.Get(0)->PutInteger(0); 236 } RTLFUNC(MB_OKCANCEL)237RTLFUNC(MB_OKCANCEL) 238 { 239 (void)pBasic; 240 (void)bWrite; 241 242 rPar.Get(0)->PutInteger(1); 243 } RTLFUNC(MB_ABORTRETRYIGNORE)244RTLFUNC(MB_ABORTRETRYIGNORE) 245 { 246 (void)pBasic; 247 (void)bWrite; 248 249 rPar.Get(0)->PutInteger(2); 250 } RTLFUNC(MB_YESNOCANCEL)251RTLFUNC(MB_YESNOCANCEL) 252 { 253 (void)pBasic; 254 (void)bWrite; 255 256 rPar.Get(0)->PutInteger(3); 257 } RTLFUNC(MB_YESNO)258RTLFUNC(MB_YESNO) 259 { 260 (void)pBasic; 261 (void)bWrite; 262 263 rPar.Get(0)->PutInteger(4); 264 } RTLFUNC(MB_RETRYCANCEL)265RTLFUNC(MB_RETRYCANCEL) 266 { 267 (void)pBasic; 268 (void)bWrite; 269 270 rPar.Get(0)->PutInteger(5); 271 } RTLFUNC(MB_ICONSTOP)272RTLFUNC(MB_ICONSTOP) 273 { 274 (void)pBasic; 275 (void)bWrite; 276 277 rPar.Get(0)->PutInteger(16); 278 } RTLFUNC(MB_ICONQUESTION)279RTLFUNC(MB_ICONQUESTION) 280 { 281 (void)pBasic; 282 (void)bWrite; 283 284 rPar.Get(0)->PutInteger(32); 285 } RTLFUNC(MB_ICONEXCLAMATION)286RTLFUNC(MB_ICONEXCLAMATION) 287 { 288 (void)pBasic; 289 (void)bWrite; 290 291 rPar.Get(0)->PutInteger(48); 292 } RTLFUNC(MB_ICONINFORMATION)293RTLFUNC(MB_ICONINFORMATION) 294 { 295 (void)pBasic; 296 (void)bWrite; 297 298 rPar.Get(0)->PutInteger(64); 299 } RTLFUNC(MB_DEFBUTTON1)300RTLFUNC(MB_DEFBUTTON1) 301 { 302 (void)pBasic; 303 (void)bWrite; 304 305 rPar.Get(0)->PutInteger(0); 306 } RTLFUNC(MB_DEFBUTTON2)307RTLFUNC(MB_DEFBUTTON2) 308 { 309 (void)pBasic; 310 (void)bWrite; 311 312 rPar.Get(0)->PutInteger(256); 313 } RTLFUNC(MB_DEFBUTTON3)314RTLFUNC(MB_DEFBUTTON3) 315 { 316 (void)pBasic; 317 (void)bWrite; 318 319 rPar.Get(0)->PutInteger(512); 320 } RTLFUNC(MB_APPLMODAL)321RTLFUNC(MB_APPLMODAL) 322 { 323 (void)pBasic; 324 (void)bWrite; 325 326 rPar.Get(0)->PutInteger(0); 327 } RTLFUNC(MB_SYSTEMMODAL)328RTLFUNC(MB_SYSTEMMODAL) 329 { 330 (void)pBasic; 331 (void)bWrite; 332 333 rPar.Get(0)->PutInteger(4096); 334 } 335 RTLFUNC(IDOK)336RTLFUNC(IDOK) 337 { 338 (void)pBasic; 339 (void)bWrite; 340 341 rPar.Get(0)->PutInteger(1); 342 } 343 RTLFUNC(IDCANCEL)344RTLFUNC(IDCANCEL) 345 { 346 (void)pBasic; 347 (void)bWrite; 348 349 rPar.Get(0)->PutInteger(2); 350 } RTLFUNC(IDABORT)351RTLFUNC(IDABORT) 352 { 353 (void)pBasic; 354 (void)bWrite; 355 356 rPar.Get(0)->PutInteger(3); 357 } RTLFUNC(IDRETRY)358RTLFUNC(IDRETRY) 359 { 360 (void)pBasic; 361 (void)bWrite; 362 363 rPar.Get(0)->PutInteger(4); 364 } RTLFUNC(IDYES)365RTLFUNC(IDYES) 366 { 367 (void)pBasic; 368 (void)bWrite; 369 370 rPar.Get(0)->PutInteger(6); 371 } RTLFUNC(IDNO)372RTLFUNC(IDNO) 373 { 374 (void)pBasic; 375 (void)bWrite; 376 377 rPar.Get(0)->PutInteger(7); 378 } 379 RTLFUNC(CF_TEXT)380RTLFUNC(CF_TEXT) 381 { 382 (void)pBasic; 383 (void)bWrite; 384 385 rPar.Get(0)->PutInteger(1); 386 } RTLFUNC(CF_BITMAP)387RTLFUNC(CF_BITMAP) 388 { 389 (void)pBasic; 390 (void)bWrite; 391 392 rPar.Get(0)->PutInteger(2); 393 } RTLFUNC(CF_METAFILEPICT)394RTLFUNC(CF_METAFILEPICT) 395 { 396 (void)pBasic; 397 (void)bWrite; 398 399 rPar.Get(0)->PutInteger(3); 400 } 401 RTLFUNC(TYP_AUTHORFLD)402RTLFUNC(TYP_AUTHORFLD) 403 { 404 (void)pBasic; 405 (void)bWrite; 406 407 rPar.Get(0)->PutInteger(7); 408 } RTLFUNC(TYP_CHAPTERFLD)409RTLFUNC(TYP_CHAPTERFLD) 410 { 411 (void)pBasic; 412 (void)bWrite; 413 414 rPar.Get(0)->PutInteger(4); 415 } RTLFUNC(TYP_CONDTXTFLD)416RTLFUNC(TYP_CONDTXTFLD) 417 { 418 (void)pBasic; 419 (void)bWrite; 420 421 rPar.Get(0)->PutInteger(27); 422 } RTLFUNC(TYP_DATEFLD)423RTLFUNC(TYP_DATEFLD) 424 { 425 (void)pBasic; 426 (void)bWrite; 427 428 rPar.Get(0)->PutInteger(0); 429 } RTLFUNC(TYP_DBFLD)430RTLFUNC(TYP_DBFLD) 431 { 432 (void)pBasic; 433 (void)bWrite; 434 435 rPar.Get(0)->PutInteger(19); 436 } RTLFUNC(TYP_DBNAMEFLD)437RTLFUNC(TYP_DBNAMEFLD) 438 { 439 (void)pBasic; 440 (void)bWrite; 441 442 rPar.Get(0)->PutInteger(3); 443 } RTLFUNC(TYP_DBNEXTSETFLD)444RTLFUNC(TYP_DBNEXTSETFLD) 445 { 446 (void)pBasic; 447 (void)bWrite; 448 449 rPar.Get(0)->PutInteger(24); 450 } RTLFUNC(TYP_DBNUMSETFLD)451RTLFUNC(TYP_DBNUMSETFLD) 452 { 453 (void)pBasic; 454 (void)bWrite; 455 456 rPar.Get(0)->PutInteger(25); 457 } RTLFUNC(TYP_DBSETNUMBERFLD)458RTLFUNC(TYP_DBSETNUMBERFLD) 459 { 460 (void)pBasic; 461 (void)bWrite; 462 463 rPar.Get(0)->PutInteger(26); 464 } RTLFUNC(TYP_DDEFLD)465RTLFUNC(TYP_DDEFLD) 466 { 467 (void)pBasic; 468 (void)bWrite; 469 470 rPar.Get(0)->PutInteger(14); 471 } RTLFUNC(TYP_DOCINFOFLD)472RTLFUNC(TYP_DOCINFOFLD) 473 { 474 (void)pBasic; 475 (void)bWrite; 476 477 rPar.Get(0)->PutInteger(18); 478 } RTLFUNC(TYP_DOCSTATFLD)479RTLFUNC(TYP_DOCSTATFLD) 480 { 481 (void)pBasic; 482 (void)bWrite; 483 484 rPar.Get(0)->PutInteger(6); 485 } RTLFUNC(TYP_EXTUSERFLD)486RTLFUNC(TYP_EXTUSERFLD) 487 { 488 (void)pBasic; 489 (void)bWrite; 490 491 rPar.Get(0)->PutInteger(30); 492 } RTLFUNC(TYP_FILENAMEFLD)493RTLFUNC(TYP_FILENAMEFLD) 494 { 495 (void)pBasic; 496 (void)bWrite; 497 498 rPar.Get(0)->PutInteger(2); 499 } RTLFUNC(TYP_FIXDATEFLD)500RTLFUNC(TYP_FIXDATEFLD) 501 { 502 (void)pBasic; 503 (void)bWrite; 504 505 rPar.Get(0)->PutInteger(31); 506 } RTLFUNC(TYP_FIXTIMEFLD)507RTLFUNC(TYP_FIXTIMEFLD) 508 { 509 (void)pBasic; 510 (void)bWrite; 511 512 rPar.Get(0)->PutInteger(32); 513 } RTLFUNC(TYP_FORMELFLD)514RTLFUNC(TYP_FORMELFLD) 515 { 516 (void)pBasic; 517 (void)bWrite; 518 519 rPar.Get(0)->PutInteger(10); 520 } RTLFUNC(TYP_GETFLD)521RTLFUNC(TYP_GETFLD) 522 { 523 (void)pBasic; 524 (void)bWrite; 525 526 rPar.Get(0)->PutInteger(9); 527 } RTLFUNC(TYP_GETREFFLD)528RTLFUNC(TYP_GETREFFLD) 529 { 530 (void)pBasic; 531 (void)bWrite; 532 533 rPar.Get(0)->PutInteger(13); 534 } RTLFUNC(TYP_HIDDENPARAFLD)535RTLFUNC(TYP_HIDDENPARAFLD) 536 { 537 (void)pBasic; 538 (void)bWrite; 539 540 rPar.Get(0)->PutInteger(17); 541 } RTLFUNC(TYP_HIDDENTXTFLD)542RTLFUNC(TYP_HIDDENTXTFLD) 543 { 544 (void)pBasic; 545 (void)bWrite; 546 547 rPar.Get(0)->PutInteger(11); 548 } RTLFUNC(TYP_INPUTFLD)549RTLFUNC(TYP_INPUTFLD) 550 { 551 (void)pBasic; 552 (void)bWrite; 553 554 rPar.Get(0)->PutInteger(16); 555 } RTLFUNC(TYP_MACROFLD)556RTLFUNC(TYP_MACROFLD) 557 { 558 (void)pBasic; 559 (void)bWrite; 560 561 rPar.Get(0)->PutInteger(15); 562 } RTLFUNC(TYP_NEXTPAGEFLD)563RTLFUNC(TYP_NEXTPAGEFLD) 564 { 565 (void)pBasic; 566 (void)bWrite; 567 568 rPar.Get(0)->PutInteger(28); 569 } RTLFUNC(TYP_PAGENUMBERFLD)570RTLFUNC(TYP_PAGENUMBERFLD) 571 { 572 (void)pBasic; 573 (void)bWrite; 574 575 rPar.Get(0)->PutInteger(5); 576 } RTLFUNC(TYP_POSTITFLD)577RTLFUNC(TYP_POSTITFLD) 578 { 579 (void)pBasic; 580 (void)bWrite; 581 582 rPar.Get(0)->PutInteger(21); 583 } RTLFUNC(TYP_PREVPAGEFLD)584RTLFUNC(TYP_PREVPAGEFLD) 585 { 586 (void)pBasic; 587 (void)bWrite; 588 589 rPar.Get(0)->PutInteger(29); 590 } RTLFUNC(TYP_SEQFLD)591RTLFUNC(TYP_SEQFLD) 592 { 593 (void)pBasic; 594 (void)bWrite; 595 596 rPar.Get(0)->PutInteger(23); 597 } RTLFUNC(TYP_SETFLD)598RTLFUNC(TYP_SETFLD) 599 { 600 (void)pBasic; 601 (void)bWrite; 602 603 rPar.Get(0)->PutInteger(8); 604 } RTLFUNC(TYP_SETINPFLD)605RTLFUNC(TYP_SETINPFLD) 606 { 607 (void)pBasic; 608 (void)bWrite; 609 610 rPar.Get(0)->PutInteger(33); 611 } RTLFUNC(TYP_SETREFFLD)612RTLFUNC(TYP_SETREFFLD) 613 { 614 (void)pBasic; 615 (void)bWrite; 616 617 rPar.Get(0)->PutInteger(12); 618 } RTLFUNC(TYP_TEMPLNAMEFLD)619RTLFUNC(TYP_TEMPLNAMEFLD) 620 { 621 (void)pBasic; 622 (void)bWrite; 623 624 rPar.Get(0)->PutInteger(22); 625 } RTLFUNC(TYP_TIMEFLD)626RTLFUNC(TYP_TIMEFLD) 627 { 628 (void)pBasic; 629 (void)bWrite; 630 631 rPar.Get(0)->PutInteger(1); 632 } RTLFUNC(TYP_USERFLD)633RTLFUNC(TYP_USERFLD) 634 { 635 (void)pBasic; 636 (void)bWrite; 637 638 rPar.Get(0)->PutInteger(20); 639 } RTLFUNC(TYP_USRINPFLD)640RTLFUNC(TYP_USRINPFLD) 641 { 642 (void)pBasic; 643 (void)bWrite; 644 645 rPar.Get(0)->PutInteger(34); 646 } RTLFUNC(TYP_SETREFPAGEFLD)647RTLFUNC(TYP_SETREFPAGEFLD) 648 { 649 (void)pBasic; 650 (void)bWrite; 651 652 rPar.Get(0)->PutInteger(35); 653 } RTLFUNC(TYP_GETREFPAGEFLD)654RTLFUNC(TYP_GETREFPAGEFLD) 655 { 656 (void)pBasic; 657 (void)bWrite; 658 659 rPar.Get(0)->PutInteger(36); 660 } RTLFUNC(TYP_INTERNETFLD)661RTLFUNC(TYP_INTERNETFLD) 662 { 663 (void)pBasic; 664 (void)bWrite; 665 666 rPar.Get(0)->PutInteger(37); 667 } 668 RTLFUNC(SET_ON)669RTLFUNC(SET_ON) 670 { 671 (void)pBasic; 672 (void)bWrite; 673 674 rPar.Get(0)->PutInteger(1); 675 } RTLFUNC(SET_OFF)676RTLFUNC(SET_OFF) 677 { 678 (void)pBasic; 679 (void)bWrite; 680 681 rPar.Get(0)->PutInteger(0); 682 } RTLFUNC(TOGGLE)683RTLFUNC(TOGGLE) 684 { 685 (void)pBasic; 686 (void)bWrite; 687 688 rPar.Get(0)->PutInteger(2); 689 } 690 RTLFUNC(FRAMEANCHORPAGE)691RTLFUNC(FRAMEANCHORPAGE) 692 { 693 (void)pBasic; 694 (void)bWrite; 695 696 rPar.Get(0)->PutInteger(1); 697 } RTLFUNC(FRAMEANCHORPARA)698RTLFUNC(FRAMEANCHORPARA) 699 { 700 (void)pBasic; 701 (void)bWrite; 702 703 rPar.Get(0)->PutInteger(14); 704 } RTLFUNC(FRAMEANCHORCHAR)705RTLFUNC(FRAMEANCHORCHAR) 706 { 707 (void)pBasic; 708 (void)bWrite; 709 710 rPar.Get(0)->PutInteger(15); 711 } 712 RTLFUNC(CLEAR_ALLTABS)713RTLFUNC(CLEAR_ALLTABS) 714 { 715 (void)pBasic; 716 (void)bWrite; 717 718 rPar.Get(0)->PutInteger(2); 719 } RTLFUNC(CLEAR_TAB)720RTLFUNC(CLEAR_TAB) 721 { 722 (void)pBasic; 723 (void)bWrite; 724 725 rPar.Get(0)->PutInteger(1); 726 } RTLFUNC(SET_TAB)727RTLFUNC(SET_TAB) 728 { 729 (void)pBasic; 730 (void)bWrite; 731 732 rPar.Get(0)->PutInteger(0); 733 } 734 RTLFUNC(LINEPROP)735RTLFUNC(LINEPROP) 736 { 737 (void)pBasic; 738 (void)bWrite; 739 740 rPar.Get(0)->PutInteger(0); 741 } RTLFUNC(LINE_1)742RTLFUNC(LINE_1) 743 { 744 (void)pBasic; 745 (void)bWrite; 746 747 rPar.Get(0)->PutInteger(1); 748 } RTLFUNC(LINE_15)749RTLFUNC(LINE_15) 750 { 751 (void)pBasic; 752 (void)bWrite; 753 754 rPar.Get(0)->PutInteger(2); 755 } RTLFUNC(LINE_2)756RTLFUNC(LINE_2) 757 { 758 (void)pBasic; 759 (void)bWrite; 760 761 rPar.Get(0)->PutInteger(3); 762 } 763 RTLFUNC(TYP_JUMPEDITFLD)764RTLFUNC(TYP_JUMPEDITFLD) 765 { 766 (void)pBasic; 767 (void)bWrite; 768 769 rPar.Get(0)->PutInteger(38); 770 } 771 772 773