update credits
[LibreOffice.git] / basic / source / runtime / props.cxx
blob78bd326001c5edefcaece91fcda312048d5e4636
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 "rtlproto.hxx"
24 #include "errobject.hxx"
25 #include <basegfx/numeric/ftools.hxx>
28 // Properties and methods lay the return value down at Get (bWrite = sal_False)
29 // at the element 0 of the Argv; at Put (bWrite = sal_True) the value from
30 // element 0 is stored.
32 RTLFUNC(Erl)
34 (void)pBasic;
35 (void)bWrite;
37 rPar.Get( 0 )->PutLong( StarBASIC::GetErl() );
40 RTLFUNC(Err)
42 (void)pBasic;
43 (void)bWrite;
45 if( SbiRuntime::isVBAEnabled() )
47 rPar.Get( 0 )->PutObject( SbxErrObject::getErrObject() );
49 else
51 if( bWrite )
53 sal_Int32 nVal = rPar.Get( 0 )->GetLong();
54 if( nVal <= 65535L )
55 StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16) nVal ) );
57 else
58 rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) );
62 RTLFUNC(False)
64 (void)pBasic;
65 (void)bWrite;
67 rPar.Get(0)->PutBool( false );
70 RTLFUNC(Empty)
72 (void)pBasic;
73 (void)bWrite;
74 (void)rPar;
77 RTLFUNC(Nothing)
79 (void)pBasic;
80 (void)bWrite;
82 // return an empty object
83 rPar.Get( 0 )->PutObject( NULL );
86 RTLFUNC(Null)
88 (void)pBasic;
89 (void)bWrite;
91 // returns an empty object-variable
92 rPar.Get( 0 )->PutNull();
95 RTLFUNC(PI)
97 (void)pBasic;
98 (void)bWrite;
100 rPar.Get( 0 )->PutDouble( F_PI );
103 RTLFUNC(True)
105 (void)pBasic;
106 (void)bWrite;
108 rPar.Get( 0 )->PutBool( true );
111 RTLFUNC(ATTR_NORMAL)
113 (void)pBasic;
114 (void)bWrite;
116 rPar.Get(0)->PutInteger(0);
118 RTLFUNC(ATTR_READONLY)
120 (void)pBasic;
121 (void)bWrite;
123 rPar.Get(0)->PutInteger(1);
125 RTLFUNC(ATTR_HIDDEN)
127 (void)pBasic;
128 (void)bWrite;
130 rPar.Get(0)->PutInteger(2);
132 RTLFUNC(ATTR_SYSTEM)
134 (void)pBasic;
135 (void)bWrite;
137 rPar.Get(0)->PutInteger(4);
139 RTLFUNC(ATTR_VOLUME)
141 (void)pBasic;
142 (void)bWrite;
144 rPar.Get(0)->PutInteger(8);
146 RTLFUNC(ATTR_DIRECTORY)
148 (void)pBasic;
149 (void)bWrite;
151 rPar.Get(0)->PutInteger(16);
153 RTLFUNC(ATTR_ARCHIVE)
155 (void)pBasic;
156 (void)bWrite;
158 rPar.Get(0)->PutInteger(32);
161 RTLFUNC(V_EMPTY)
163 (void)pBasic;
164 (void)bWrite;
166 rPar.Get(0)->PutInteger(0);
168 RTLFUNC(V_NULL)
170 (void)pBasic;
171 (void)bWrite;
173 rPar.Get(0)->PutInteger(1);
175 RTLFUNC(V_INTEGER)
177 (void)pBasic;
178 (void)bWrite;
180 rPar.Get(0)->PutInteger(2);
182 RTLFUNC(V_LONG)
184 (void)pBasic;
185 (void)bWrite;
187 rPar.Get(0)->PutInteger(3);
189 RTLFUNC(V_SINGLE)
191 (void)pBasic;
192 (void)bWrite;
194 rPar.Get(0)->PutInteger(4);
196 RTLFUNC(V_DOUBLE)
198 (void)pBasic;
199 (void)bWrite;
201 rPar.Get(0)->PutInteger(5);
203 RTLFUNC(V_CURRENCY)
205 (void)pBasic;
206 (void)bWrite;
208 rPar.Get(0)->PutInteger(6);
210 RTLFUNC(V_DATE)
212 (void)pBasic;
213 (void)bWrite;
215 rPar.Get(0)->PutInteger(7);
217 RTLFUNC(V_STRING)
219 (void)pBasic;
220 (void)bWrite;
222 rPar.Get(0)->PutInteger(8);
225 RTLFUNC(MB_OK)
227 (void)pBasic;
228 (void)bWrite;
230 rPar.Get(0)->PutInteger(0);
232 RTLFUNC(MB_OKCANCEL)
234 (void)pBasic;
235 (void)bWrite;
237 rPar.Get(0)->PutInteger(1);
239 RTLFUNC(MB_ABORTRETRYIGNORE)
241 (void)pBasic;
242 (void)bWrite;
244 rPar.Get(0)->PutInteger(2);
246 RTLFUNC(MB_YESNOCANCEL)
248 (void)pBasic;
249 (void)bWrite;
251 rPar.Get(0)->PutInteger(3);
253 RTLFUNC(MB_YESNO)
255 (void)pBasic;
256 (void)bWrite;
258 rPar.Get(0)->PutInteger(4);
260 RTLFUNC(MB_RETRYCANCEL)
262 (void)pBasic;
263 (void)bWrite;
265 rPar.Get(0)->PutInteger(5);
267 RTLFUNC(MB_ICONSTOP)
269 (void)pBasic;
270 (void)bWrite;
272 rPar.Get(0)->PutInteger(16);
274 RTLFUNC(MB_ICONQUESTION)
276 (void)pBasic;
277 (void)bWrite;
279 rPar.Get(0)->PutInteger(32);
281 RTLFUNC(MB_ICONEXCLAMATION)
283 (void)pBasic;
284 (void)bWrite;
286 rPar.Get(0)->PutInteger(48);
288 RTLFUNC(MB_ICONINFORMATION)
290 (void)pBasic;
291 (void)bWrite;
293 rPar.Get(0)->PutInteger(64);
295 RTLFUNC(MB_DEFBUTTON1)
297 (void)pBasic;
298 (void)bWrite;
300 rPar.Get(0)->PutInteger(0);
302 RTLFUNC(MB_DEFBUTTON2)
304 (void)pBasic;
305 (void)bWrite;
307 rPar.Get(0)->PutInteger(256);
309 RTLFUNC(MB_DEFBUTTON3)
311 (void)pBasic;
312 (void)bWrite;
314 rPar.Get(0)->PutInteger(512);
316 RTLFUNC(MB_APPLMODAL)
318 (void)pBasic;
319 (void)bWrite;
321 rPar.Get(0)->PutInteger(0);
323 RTLFUNC(MB_SYSTEMMODAL)
325 (void)pBasic;
326 (void)bWrite;
328 rPar.Get(0)->PutInteger(4096);
331 RTLFUNC(IDOK)
333 (void)pBasic;
334 (void)bWrite;
336 rPar.Get(0)->PutInteger(1);
339 RTLFUNC(IDCANCEL)
341 (void)pBasic;
342 (void)bWrite;
344 rPar.Get(0)->PutInteger(2);
346 RTLFUNC(IDABORT)
348 (void)pBasic;
349 (void)bWrite;
351 rPar.Get(0)->PutInteger(3);
353 RTLFUNC(IDRETRY)
355 (void)pBasic;
356 (void)bWrite;
358 rPar.Get(0)->PutInteger(4);
360 RTLFUNC(IDYES)
362 (void)pBasic;
363 (void)bWrite;
365 rPar.Get(0)->PutInteger(6);
367 RTLFUNC(IDNO)
369 (void)pBasic;
370 (void)bWrite;
372 rPar.Get(0)->PutInteger(7);
375 RTLFUNC(CF_TEXT)
377 (void)pBasic;
378 (void)bWrite;
380 rPar.Get(0)->PutInteger(1);
382 RTLFUNC(CF_BITMAP)
384 (void)pBasic;
385 (void)bWrite;
387 rPar.Get(0)->PutInteger(2);
389 RTLFUNC(CF_METAFILEPICT)
391 (void)pBasic;
392 (void)bWrite;
394 rPar.Get(0)->PutInteger(3);
397 RTLFUNC(TYP_AUTHORFLD)
399 (void)pBasic;
400 (void)bWrite;
402 rPar.Get(0)->PutInteger(7);
404 RTLFUNC(TYP_CHAPTERFLD)
406 (void)pBasic;
407 (void)bWrite;
409 rPar.Get(0)->PutInteger(4);
411 RTLFUNC(TYP_CONDTXTFLD)
413 (void)pBasic;
414 (void)bWrite;
416 rPar.Get(0)->PutInteger(27);
418 RTLFUNC(TYP_DATEFLD)
420 (void)pBasic;
421 (void)bWrite;
423 rPar.Get(0)->PutInteger(0);
425 RTLFUNC(TYP_DBFLD)
427 (void)pBasic;
428 (void)bWrite;
430 rPar.Get(0)->PutInteger(19);
432 RTLFUNC(TYP_DBNAMEFLD)
434 (void)pBasic;
435 (void)bWrite;
437 rPar.Get(0)->PutInteger(3);
439 RTLFUNC(TYP_DBNEXTSETFLD)
441 (void)pBasic;
442 (void)bWrite;
444 rPar.Get(0)->PutInteger(24);
446 RTLFUNC(TYP_DBNUMSETFLD)
448 (void)pBasic;
449 (void)bWrite;
451 rPar.Get(0)->PutInteger(25);
453 RTLFUNC(TYP_DBSETNUMBERFLD)
455 (void)pBasic;
456 (void)bWrite;
458 rPar.Get(0)->PutInteger(26);
460 RTLFUNC(TYP_DDEFLD)
462 (void)pBasic;
463 (void)bWrite;
465 rPar.Get(0)->PutInteger(14);
467 RTLFUNC(TYP_DOCINFOFLD)
469 (void)pBasic;
470 (void)bWrite;
472 rPar.Get(0)->PutInteger(18);
474 RTLFUNC(TYP_DOCSTATFLD)
476 (void)pBasic;
477 (void)bWrite;
479 rPar.Get(0)->PutInteger(6);
481 RTLFUNC(TYP_EXTUSERFLD)
483 (void)pBasic;
484 (void)bWrite;
486 rPar.Get(0)->PutInteger(30);
488 RTLFUNC(TYP_FILENAMEFLD)
490 (void)pBasic;
491 (void)bWrite;
493 rPar.Get(0)->PutInteger(2);
495 RTLFUNC(TYP_FIXDATEFLD)
497 (void)pBasic;
498 (void)bWrite;
500 rPar.Get(0)->PutInteger(31);
502 RTLFUNC(TYP_FIXTIMEFLD)
504 (void)pBasic;
505 (void)bWrite;
507 rPar.Get(0)->PutInteger(32);
509 RTLFUNC(TYP_FORMELFLD)
511 (void)pBasic;
512 (void)bWrite;
514 rPar.Get(0)->PutInteger(10);
516 RTLFUNC(TYP_GETFLD)
518 (void)pBasic;
519 (void)bWrite;
521 rPar.Get(0)->PutInteger(9);
523 RTLFUNC(TYP_GETREFFLD)
525 (void)pBasic;
526 (void)bWrite;
528 rPar.Get(0)->PutInteger(13);
530 RTLFUNC(TYP_HIDDENPARAFLD)
532 (void)pBasic;
533 (void)bWrite;
535 rPar.Get(0)->PutInteger(17);
537 RTLFUNC(TYP_HIDDENTXTFLD)
539 (void)pBasic;
540 (void)bWrite;
542 rPar.Get(0)->PutInteger(11);
544 RTLFUNC(TYP_INPUTFLD)
546 (void)pBasic;
547 (void)bWrite;
549 rPar.Get(0)->PutInteger(16);
551 RTLFUNC(TYP_MACROFLD)
553 (void)pBasic;
554 (void)bWrite;
556 rPar.Get(0)->PutInteger(15);
558 RTLFUNC(TYP_NEXTPAGEFLD)
560 (void)pBasic;
561 (void)bWrite;
563 rPar.Get(0)->PutInteger(28);
565 RTLFUNC(TYP_PAGENUMBERFLD)
567 (void)pBasic;
568 (void)bWrite;
570 rPar.Get(0)->PutInteger(5);
572 RTLFUNC(TYP_POSTITFLD)
574 (void)pBasic;
575 (void)bWrite;
577 rPar.Get(0)->PutInteger(21);
579 RTLFUNC(TYP_PREVPAGEFLD)
581 (void)pBasic;
582 (void)bWrite;
584 rPar.Get(0)->PutInteger(29);
586 RTLFUNC(TYP_SEQFLD)
588 (void)pBasic;
589 (void)bWrite;
591 rPar.Get(0)->PutInteger(23);
593 RTLFUNC(TYP_SETFLD)
595 (void)pBasic;
596 (void)bWrite;
598 rPar.Get(0)->PutInteger(8);
600 RTLFUNC(TYP_SETINPFLD)
602 (void)pBasic;
603 (void)bWrite;
605 rPar.Get(0)->PutInteger(33);
607 RTLFUNC(TYP_SETREFFLD)
609 (void)pBasic;
610 (void)bWrite;
612 rPar.Get(0)->PutInteger(12);
614 RTLFUNC(TYP_TEMPLNAMEFLD)
616 (void)pBasic;
617 (void)bWrite;
619 rPar.Get(0)->PutInteger(22);
621 RTLFUNC(TYP_TIMEFLD)
623 (void)pBasic;
624 (void)bWrite;
626 rPar.Get(0)->PutInteger(1);
628 RTLFUNC(TYP_USERFLD)
630 (void)pBasic;
631 (void)bWrite;
633 rPar.Get(0)->PutInteger(20);
635 RTLFUNC(TYP_USRINPFLD)
637 (void)pBasic;
638 (void)bWrite;
640 rPar.Get(0)->PutInteger(34);
642 RTLFUNC(TYP_SETREFPAGEFLD)
644 (void)pBasic;
645 (void)bWrite;
647 rPar.Get(0)->PutInteger(35);
649 RTLFUNC(TYP_GETREFPAGEFLD)
651 (void)pBasic;
652 (void)bWrite;
654 rPar.Get(0)->PutInteger(36);
656 RTLFUNC(TYP_INTERNETFLD)
658 (void)pBasic;
659 (void)bWrite;
661 rPar.Get(0)->PutInteger(37);
664 RTLFUNC(SET_ON)
666 (void)pBasic;
667 (void)bWrite;
669 rPar.Get(0)->PutInteger(1);
671 RTLFUNC(SET_OFF)
673 (void)pBasic;
674 (void)bWrite;
676 rPar.Get(0)->PutInteger(0);
678 RTLFUNC(TOGGLE)
680 (void)pBasic;
681 (void)bWrite;
683 rPar.Get(0)->PutInteger(2);
686 RTLFUNC(FRAMEANCHORPAGE)
688 (void)pBasic;
689 (void)bWrite;
691 rPar.Get(0)->PutInteger(1);
693 RTLFUNC(FRAMEANCHORPARA)
695 (void)pBasic;
696 (void)bWrite;
698 rPar.Get(0)->PutInteger(14);
700 RTLFUNC(FRAMEANCHORCHAR)
702 (void)pBasic;
703 (void)bWrite;
705 rPar.Get(0)->PutInteger(15);
708 RTLFUNC(CLEAR_ALLTABS)
710 (void)pBasic;
711 (void)bWrite;
713 rPar.Get(0)->PutInteger(2);
715 RTLFUNC(CLEAR_TAB)
717 (void)pBasic;
718 (void)bWrite;
720 rPar.Get(0)->PutInteger(1);
722 RTLFUNC(SET_TAB)
724 (void)pBasic;
725 (void)bWrite;
727 rPar.Get(0)->PutInteger(0);
730 RTLFUNC(LINEPROP)
732 (void)pBasic;
733 (void)bWrite;
735 rPar.Get(0)->PutInteger(0);
737 RTLFUNC(LINE_1)
739 (void)pBasic;
740 (void)bWrite;
742 rPar.Get(0)->PutInteger(1);
744 RTLFUNC(LINE_15)
746 (void)pBasic;
747 (void)bWrite;
749 rPar.Get(0)->PutInteger(2);
751 RTLFUNC(LINE_2)
753 (void)pBasic;
754 (void)bWrite;
756 rPar.Get(0)->PutInteger(3);
759 RTLFUNC(TYP_JUMPEDITFLD)
761 (void)pBasic;
762 (void)bWrite;
764 rPar.Get(0)->PutInteger(38);
768 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */