update dev300-m58
[ooovba.git] / basic / source / runtime / props.cxx
blobdf5098ebe08839a222919a1a10a14488771a35cb
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: props.cxx,v $
10 * $Revision: 1.7 $
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 "rtlproto.hxx"
39 // Properties und Methoden legen beim Get (bWrite = FALSE) den Returnwert
40 // im Element 0 des Argv ab; beim Put (bWrite = TRUE) wird der Wert aus
41 // Element 0 gespeichert.
43 RTLFUNC(Erl)
45 (void)pBasic;
46 (void)bWrite;
48 rPar.Get( 0 )->PutLong( StarBASIC::GetErl() );
51 RTLFUNC(Err)
53 (void)pBasic;
54 (void)bWrite;
56 if( bWrite )
58 INT32 nVal = rPar.Get( 0 )->GetLong();
59 if( nVal <= 65535L )
60 StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) );
62 else
63 rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) );
66 RTLFUNC(False)
68 (void)pBasic;
69 (void)bWrite;
71 rPar.Get(0)->PutBool( FALSE );
74 RTLFUNC(Nothing)
76 (void)pBasic;
77 (void)bWrite;
79 // liefert eine leere Objekt-Variable.
80 rPar.Get( 0 )->PutObject( NULL );
83 RTLFUNC(Null)
85 (void)pBasic;
86 (void)bWrite;
88 // liefert eine leere Objekt-Variable.
89 rPar.Get( 0 )->PutNull();
92 RTLFUNC(PI)
94 (void)pBasic;
95 (void)bWrite;
97 rPar.Get( 0 )->PutDouble( F_PI );
100 RTLFUNC(True)
102 (void)pBasic;
103 (void)bWrite;
105 rPar.Get( 0 )->PutBool( TRUE );
108 RTLFUNC(ATTR_NORMAL)
110 (void)pBasic;
111 (void)bWrite;
113 rPar.Get(0)->PutInteger(0);
115 RTLFUNC(ATTR_READONLY)
117 (void)pBasic;
118 (void)bWrite;
120 rPar.Get(0)->PutInteger(1);
122 RTLFUNC(ATTR_HIDDEN)
124 (void)pBasic;
125 (void)bWrite;
127 rPar.Get(0)->PutInteger(2);
129 RTLFUNC(ATTR_SYSTEM)
131 (void)pBasic;
132 (void)bWrite;
134 rPar.Get(0)->PutInteger(4);
136 RTLFUNC(ATTR_VOLUME)
138 (void)pBasic;
139 (void)bWrite;
141 rPar.Get(0)->PutInteger(8);
143 RTLFUNC(ATTR_DIRECTORY)
145 (void)pBasic;
146 (void)bWrite;
148 rPar.Get(0)->PutInteger(16);
150 RTLFUNC(ATTR_ARCHIVE)
152 (void)pBasic;
153 (void)bWrite;
155 rPar.Get(0)->PutInteger(32);
158 RTLFUNC(V_EMPTY)
160 (void)pBasic;
161 (void)bWrite;
163 rPar.Get(0)->PutInteger(0);
165 RTLFUNC(V_NULL)
167 (void)pBasic;
168 (void)bWrite;
170 rPar.Get(0)->PutInteger(1);
172 RTLFUNC(V_INTEGER)
174 (void)pBasic;
175 (void)bWrite;
177 rPar.Get(0)->PutInteger(2);
179 RTLFUNC(V_LONG)
181 (void)pBasic;
182 (void)bWrite;
184 rPar.Get(0)->PutInteger(3);
186 RTLFUNC(V_SINGLE)
188 (void)pBasic;
189 (void)bWrite;
191 rPar.Get(0)->PutInteger(4);
193 RTLFUNC(V_DOUBLE)
195 (void)pBasic;
196 (void)bWrite;
198 rPar.Get(0)->PutInteger(5);
200 RTLFUNC(V_CURRENCY)
202 (void)pBasic;
203 (void)bWrite;
205 rPar.Get(0)->PutInteger(6);
207 RTLFUNC(V_DATE)
209 (void)pBasic;
210 (void)bWrite;
212 rPar.Get(0)->PutInteger(7);
214 RTLFUNC(V_STRING)
216 (void)pBasic;
217 (void)bWrite;
219 rPar.Get(0)->PutInteger(8);
222 RTLFUNC(MB_OK)
224 (void)pBasic;
225 (void)bWrite;
227 rPar.Get(0)->PutInteger(0);
229 RTLFUNC(MB_OKCANCEL)
231 (void)pBasic;
232 (void)bWrite;
234 rPar.Get(0)->PutInteger(1);
236 RTLFUNC(MB_ABORTRETRYIGNORE)
238 (void)pBasic;
239 (void)bWrite;
241 rPar.Get(0)->PutInteger(2);
243 RTLFUNC(MB_YESNOCANCEL)
245 (void)pBasic;
246 (void)bWrite;
248 rPar.Get(0)->PutInteger(3);
250 RTLFUNC(MB_YESNO)
252 (void)pBasic;
253 (void)bWrite;
255 rPar.Get(0)->PutInteger(4);
257 RTLFUNC(MB_RETRYCANCEL)
259 (void)pBasic;
260 (void)bWrite;
262 rPar.Get(0)->PutInteger(5);
264 RTLFUNC(MB_ICONSTOP)
266 (void)pBasic;
267 (void)bWrite;
269 rPar.Get(0)->PutInteger(16);
271 RTLFUNC(MB_ICONQUESTION)
273 (void)pBasic;
274 (void)bWrite;
276 rPar.Get(0)->PutInteger(32);
278 RTLFUNC(MB_ICONEXCLAMATION)
280 (void)pBasic;
281 (void)bWrite;
283 rPar.Get(0)->PutInteger(48);
285 RTLFUNC(MB_ICONINFORMATION)
287 (void)pBasic;
288 (void)bWrite;
290 rPar.Get(0)->PutInteger(64);
292 RTLFUNC(MB_DEFBUTTON1)
294 (void)pBasic;
295 (void)bWrite;
297 rPar.Get(0)->PutInteger(0);
299 RTLFUNC(MB_DEFBUTTON2)
301 (void)pBasic;
302 (void)bWrite;
304 rPar.Get(0)->PutInteger(256);
306 RTLFUNC(MB_DEFBUTTON3)
308 (void)pBasic;
309 (void)bWrite;
311 rPar.Get(0)->PutInteger(512);
313 RTLFUNC(MB_APPLMODAL)
315 (void)pBasic;
316 (void)bWrite;
318 rPar.Get(0)->PutInteger(0);
320 RTLFUNC(MB_SYSTEMMODAL)
322 (void)pBasic;
323 (void)bWrite;
325 rPar.Get(0)->PutInteger(4096);
328 RTLFUNC(IDOK)
330 (void)pBasic;
331 (void)bWrite;
333 rPar.Get(0)->PutInteger(1);
336 RTLFUNC(IDCANCEL)
338 (void)pBasic;
339 (void)bWrite;
341 rPar.Get(0)->PutInteger(2);
343 RTLFUNC(IDABORT)
345 (void)pBasic;
346 (void)bWrite;
348 rPar.Get(0)->PutInteger(3);
350 RTLFUNC(IDRETRY)
352 (void)pBasic;
353 (void)bWrite;
355 rPar.Get(0)->PutInteger(4);
357 RTLFUNC(IDYES)
359 (void)pBasic;
360 (void)bWrite;
362 rPar.Get(0)->PutInteger(6);
364 RTLFUNC(IDNO)
366 (void)pBasic;
367 (void)bWrite;
369 rPar.Get(0)->PutInteger(7);
372 RTLFUNC(CF_TEXT)
374 (void)pBasic;
375 (void)bWrite;
377 rPar.Get(0)->PutInteger(1);
379 RTLFUNC(CF_BITMAP)
381 (void)pBasic;
382 (void)bWrite;
384 rPar.Get(0)->PutInteger(2);
386 RTLFUNC(CF_METAFILEPICT)
388 (void)pBasic;
389 (void)bWrite;
391 rPar.Get(0)->PutInteger(3);
394 RTLFUNC(TYP_AUTHORFLD)
396 (void)pBasic;
397 (void)bWrite;
399 rPar.Get(0)->PutInteger(7);
401 RTLFUNC(TYP_CHAPTERFLD)
403 (void)pBasic;
404 (void)bWrite;
406 rPar.Get(0)->PutInteger(4);
408 RTLFUNC(TYP_CONDTXTFLD)
410 (void)pBasic;
411 (void)bWrite;
413 rPar.Get(0)->PutInteger(27);
415 RTLFUNC(TYP_DATEFLD)
417 (void)pBasic;
418 (void)bWrite;
420 rPar.Get(0)->PutInteger(0);
422 RTLFUNC(TYP_DBFLD)
424 (void)pBasic;
425 (void)bWrite;
427 rPar.Get(0)->PutInteger(19);
429 RTLFUNC(TYP_DBNAMEFLD)
431 (void)pBasic;
432 (void)bWrite;
434 rPar.Get(0)->PutInteger(3);
436 RTLFUNC(TYP_DBNEXTSETFLD)
438 (void)pBasic;
439 (void)bWrite;
441 rPar.Get(0)->PutInteger(24);
443 RTLFUNC(TYP_DBNUMSETFLD)
445 (void)pBasic;
446 (void)bWrite;
448 rPar.Get(0)->PutInteger(25);
450 RTLFUNC(TYP_DBSETNUMBERFLD)
452 (void)pBasic;
453 (void)bWrite;
455 rPar.Get(0)->PutInteger(26);
457 RTLFUNC(TYP_DDEFLD)
459 (void)pBasic;
460 (void)bWrite;
462 rPar.Get(0)->PutInteger(14);
464 RTLFUNC(TYP_DOCINFOFLD)
466 (void)pBasic;
467 (void)bWrite;
469 rPar.Get(0)->PutInteger(18);
471 RTLFUNC(TYP_DOCSTATFLD)
473 (void)pBasic;
474 (void)bWrite;
476 rPar.Get(0)->PutInteger(6);
478 RTLFUNC(TYP_EXTUSERFLD)
480 (void)pBasic;
481 (void)bWrite;
483 rPar.Get(0)->PutInteger(30);
485 RTLFUNC(TYP_FILENAMEFLD)
487 (void)pBasic;
488 (void)bWrite;
490 rPar.Get(0)->PutInteger(2);
492 RTLFUNC(TYP_FIXDATEFLD)
494 (void)pBasic;
495 (void)bWrite;
497 rPar.Get(0)->PutInteger(31);
499 RTLFUNC(TYP_FIXTIMEFLD)
501 (void)pBasic;
502 (void)bWrite;
504 rPar.Get(0)->PutInteger(32);
506 RTLFUNC(TYP_FORMELFLD)
508 (void)pBasic;
509 (void)bWrite;
511 rPar.Get(0)->PutInteger(10);
513 RTLFUNC(TYP_GETFLD)
515 (void)pBasic;
516 (void)bWrite;
518 rPar.Get(0)->PutInteger(9);
520 RTLFUNC(TYP_GETREFFLD)
522 (void)pBasic;
523 (void)bWrite;
525 rPar.Get(0)->PutInteger(13);
527 RTLFUNC(TYP_HIDDENPARAFLD)
529 (void)pBasic;
530 (void)bWrite;
532 rPar.Get(0)->PutInteger(17);
534 RTLFUNC(TYP_HIDDENTXTFLD)
536 (void)pBasic;
537 (void)bWrite;
539 rPar.Get(0)->PutInteger(11);
541 RTLFUNC(TYP_INPUTFLD)
543 (void)pBasic;
544 (void)bWrite;
546 rPar.Get(0)->PutInteger(16);
548 RTLFUNC(TYP_MACROFLD)
550 (void)pBasic;
551 (void)bWrite;
553 rPar.Get(0)->PutInteger(15);
555 RTLFUNC(TYP_NEXTPAGEFLD)
557 (void)pBasic;
558 (void)bWrite;
560 rPar.Get(0)->PutInteger(28);
562 RTLFUNC(TYP_PAGENUMBERFLD)
564 (void)pBasic;
565 (void)bWrite;
567 rPar.Get(0)->PutInteger(5);
569 RTLFUNC(TYP_POSTITFLD)
571 (void)pBasic;
572 (void)bWrite;
574 rPar.Get(0)->PutInteger(21);
576 RTLFUNC(TYP_PREVPAGEFLD)
578 (void)pBasic;
579 (void)bWrite;
581 rPar.Get(0)->PutInteger(29);
583 RTLFUNC(TYP_SEQFLD)
585 (void)pBasic;
586 (void)bWrite;
588 rPar.Get(0)->PutInteger(23);
590 RTLFUNC(TYP_SETFLD)
592 (void)pBasic;
593 (void)bWrite;
595 rPar.Get(0)->PutInteger(8);
597 RTLFUNC(TYP_SETINPFLD)
599 (void)pBasic;
600 (void)bWrite;
602 rPar.Get(0)->PutInteger(33);
604 RTLFUNC(TYP_SETREFFLD)
606 (void)pBasic;
607 (void)bWrite;
609 rPar.Get(0)->PutInteger(12);
611 RTLFUNC(TYP_TEMPLNAMEFLD)
613 (void)pBasic;
614 (void)bWrite;
616 rPar.Get(0)->PutInteger(22);
618 RTLFUNC(TYP_TIMEFLD)
620 (void)pBasic;
621 (void)bWrite;
623 rPar.Get(0)->PutInteger(1);
625 RTLFUNC(TYP_USERFLD)
627 (void)pBasic;
628 (void)bWrite;
630 rPar.Get(0)->PutInteger(20);
632 RTLFUNC(TYP_USRINPFLD)
634 (void)pBasic;
635 (void)bWrite;
637 rPar.Get(0)->PutInteger(34);
639 RTLFUNC(TYP_SETREFPAGEFLD)
641 (void)pBasic;
642 (void)bWrite;
644 rPar.Get(0)->PutInteger(35);
646 RTLFUNC(TYP_GETREFPAGEFLD)
648 (void)pBasic;
649 (void)bWrite;
651 rPar.Get(0)->PutInteger(36);
653 RTLFUNC(TYP_INTERNETFLD)
655 (void)pBasic;
656 (void)bWrite;
658 rPar.Get(0)->PutInteger(37);
661 RTLFUNC(SET_ON)
663 (void)pBasic;
664 (void)bWrite;
666 rPar.Get(0)->PutInteger(1);
668 RTLFUNC(SET_OFF)
670 (void)pBasic;
671 (void)bWrite;
673 rPar.Get(0)->PutInteger(0);
675 RTLFUNC(TOGGLE)
677 (void)pBasic;
678 (void)bWrite;
680 rPar.Get(0)->PutInteger(2);
683 RTLFUNC(FRAMEANCHORPAGE)
685 (void)pBasic;
686 (void)bWrite;
688 rPar.Get(0)->PutInteger(1);
690 RTLFUNC(FRAMEANCHORPARA)
692 (void)pBasic;
693 (void)bWrite;
695 rPar.Get(0)->PutInteger(14);
697 RTLFUNC(FRAMEANCHORCHAR)
699 (void)pBasic;
700 (void)bWrite;
702 rPar.Get(0)->PutInteger(15);
705 RTLFUNC(CLEAR_ALLTABS)
707 (void)pBasic;
708 (void)bWrite;
710 rPar.Get(0)->PutInteger(2);
712 RTLFUNC(CLEAR_TAB)
714 (void)pBasic;
715 (void)bWrite;
717 rPar.Get(0)->PutInteger(1);
719 RTLFUNC(SET_TAB)
721 (void)pBasic;
722 (void)bWrite;
724 rPar.Get(0)->PutInteger(0);
727 RTLFUNC(LINEPROP)
729 (void)pBasic;
730 (void)bWrite;
732 rPar.Get(0)->PutInteger(0);
734 RTLFUNC(LINE_1)
736 (void)pBasic;
737 (void)bWrite;
739 rPar.Get(0)->PutInteger(1);
741 RTLFUNC(LINE_15)
743 (void)pBasic;
744 (void)bWrite;
746 rPar.Get(0)->PutInteger(2);
748 RTLFUNC(LINE_2)
750 (void)pBasic;
751 (void)bWrite;
753 rPar.Get(0)->PutInteger(3);
756 RTLFUNC(TYP_JUMPEDITFLD)
758 (void)pBasic;
759 (void)bWrite;
761 rPar.Get(0)->PutInteger(38);