1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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"
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.
37 rPar
.Get( 0 )->PutLong( StarBASIC::GetErl() );
45 if( SbiRuntime::isVBAEnabled() )
47 rPar
.Get( 0 )->PutObject( SbxErrObject::getErrObject() );
53 sal_Int32 nVal
= rPar
.Get( 0 )->GetLong();
55 StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16
) nVal
) );
58 rPar
.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) );
67 rPar
.Get(0)->PutBool( false );
82 // return an empty object
83 rPar
.Get( 0 )->PutObject( NULL
);
91 // returns an empty object-variable
92 rPar
.Get( 0 )->PutNull();
100 rPar
.Get( 0 )->PutDouble( F_PI
);
108 rPar
.Get( 0 )->PutBool( true );
116 rPar
.Get(0)->PutInteger(0);
118 RTLFUNC(ATTR_READONLY
)
123 rPar
.Get(0)->PutInteger(1);
130 rPar
.Get(0)->PutInteger(2);
137 rPar
.Get(0)->PutInteger(4);
144 rPar
.Get(0)->PutInteger(8);
146 RTLFUNC(ATTR_DIRECTORY
)
151 rPar
.Get(0)->PutInteger(16);
153 RTLFUNC(ATTR_ARCHIVE
)
158 rPar
.Get(0)->PutInteger(32);
166 rPar
.Get(0)->PutInteger(0);
173 rPar
.Get(0)->PutInteger(1);
180 rPar
.Get(0)->PutInteger(2);
187 rPar
.Get(0)->PutInteger(3);
194 rPar
.Get(0)->PutInteger(4);
201 rPar
.Get(0)->PutInteger(5);
208 rPar
.Get(0)->PutInteger(6);
215 rPar
.Get(0)->PutInteger(7);
222 rPar
.Get(0)->PutInteger(8);
230 rPar
.Get(0)->PutInteger(0);
237 rPar
.Get(0)->PutInteger(1);
239 RTLFUNC(MB_ABORTRETRYIGNORE
)
244 rPar
.Get(0)->PutInteger(2);
246 RTLFUNC(MB_YESNOCANCEL
)
251 rPar
.Get(0)->PutInteger(3);
258 rPar
.Get(0)->PutInteger(4);
260 RTLFUNC(MB_RETRYCANCEL
)
265 rPar
.Get(0)->PutInteger(5);
272 rPar
.Get(0)->PutInteger(16);
274 RTLFUNC(MB_ICONQUESTION
)
279 rPar
.Get(0)->PutInteger(32);
281 RTLFUNC(MB_ICONEXCLAMATION
)
286 rPar
.Get(0)->PutInteger(48);
288 RTLFUNC(MB_ICONINFORMATION
)
293 rPar
.Get(0)->PutInteger(64);
295 RTLFUNC(MB_DEFBUTTON1
)
300 rPar
.Get(0)->PutInteger(0);
302 RTLFUNC(MB_DEFBUTTON2
)
307 rPar
.Get(0)->PutInteger(256);
309 RTLFUNC(MB_DEFBUTTON3
)
314 rPar
.Get(0)->PutInteger(512);
316 RTLFUNC(MB_APPLMODAL
)
321 rPar
.Get(0)->PutInteger(0);
323 RTLFUNC(MB_SYSTEMMODAL
)
328 rPar
.Get(0)->PutInteger(4096);
336 rPar
.Get(0)->PutInteger(1);
344 rPar
.Get(0)->PutInteger(2);
351 rPar
.Get(0)->PutInteger(3);
358 rPar
.Get(0)->PutInteger(4);
365 rPar
.Get(0)->PutInteger(6);
372 rPar
.Get(0)->PutInteger(7);
380 rPar
.Get(0)->PutInteger(1);
387 rPar
.Get(0)->PutInteger(2);
389 RTLFUNC(CF_METAFILEPICT
)
394 rPar
.Get(0)->PutInteger(3);
397 RTLFUNC(TYP_AUTHORFLD
)
402 rPar
.Get(0)->PutInteger(7);
404 RTLFUNC(TYP_CHAPTERFLD
)
409 rPar
.Get(0)->PutInteger(4);
411 RTLFUNC(TYP_CONDTXTFLD
)
416 rPar
.Get(0)->PutInteger(27);
423 rPar
.Get(0)->PutInteger(0);
430 rPar
.Get(0)->PutInteger(19);
432 RTLFUNC(TYP_DBNAMEFLD
)
437 rPar
.Get(0)->PutInteger(3);
439 RTLFUNC(TYP_DBNEXTSETFLD
)
444 rPar
.Get(0)->PutInteger(24);
446 RTLFUNC(TYP_DBNUMSETFLD
)
451 rPar
.Get(0)->PutInteger(25);
453 RTLFUNC(TYP_DBSETNUMBERFLD
)
458 rPar
.Get(0)->PutInteger(26);
465 rPar
.Get(0)->PutInteger(14);
467 RTLFUNC(TYP_DOCINFOFLD
)
472 rPar
.Get(0)->PutInteger(18);
474 RTLFUNC(TYP_DOCSTATFLD
)
479 rPar
.Get(0)->PutInteger(6);
481 RTLFUNC(TYP_EXTUSERFLD
)
486 rPar
.Get(0)->PutInteger(30);
488 RTLFUNC(TYP_FILENAMEFLD
)
493 rPar
.Get(0)->PutInteger(2);
495 RTLFUNC(TYP_FIXDATEFLD
)
500 rPar
.Get(0)->PutInteger(31);
502 RTLFUNC(TYP_FIXTIMEFLD
)
507 rPar
.Get(0)->PutInteger(32);
509 RTLFUNC(TYP_FORMELFLD
)
514 rPar
.Get(0)->PutInteger(10);
521 rPar
.Get(0)->PutInteger(9);
523 RTLFUNC(TYP_GETREFFLD
)
528 rPar
.Get(0)->PutInteger(13);
530 RTLFUNC(TYP_HIDDENPARAFLD
)
535 rPar
.Get(0)->PutInteger(17);
537 RTLFUNC(TYP_HIDDENTXTFLD
)
542 rPar
.Get(0)->PutInteger(11);
544 RTLFUNC(TYP_INPUTFLD
)
549 rPar
.Get(0)->PutInteger(16);
551 RTLFUNC(TYP_MACROFLD
)
556 rPar
.Get(0)->PutInteger(15);
558 RTLFUNC(TYP_NEXTPAGEFLD
)
563 rPar
.Get(0)->PutInteger(28);
565 RTLFUNC(TYP_PAGENUMBERFLD
)
570 rPar
.Get(0)->PutInteger(5);
572 RTLFUNC(TYP_POSTITFLD
)
577 rPar
.Get(0)->PutInteger(21);
579 RTLFUNC(TYP_PREVPAGEFLD
)
584 rPar
.Get(0)->PutInteger(29);
591 rPar
.Get(0)->PutInteger(23);
598 rPar
.Get(0)->PutInteger(8);
600 RTLFUNC(TYP_SETINPFLD
)
605 rPar
.Get(0)->PutInteger(33);
607 RTLFUNC(TYP_SETREFFLD
)
612 rPar
.Get(0)->PutInteger(12);
614 RTLFUNC(TYP_TEMPLNAMEFLD
)
619 rPar
.Get(0)->PutInteger(22);
626 rPar
.Get(0)->PutInteger(1);
633 rPar
.Get(0)->PutInteger(20);
635 RTLFUNC(TYP_USRINPFLD
)
640 rPar
.Get(0)->PutInteger(34);
642 RTLFUNC(TYP_SETREFPAGEFLD
)
647 rPar
.Get(0)->PutInteger(35);
649 RTLFUNC(TYP_GETREFPAGEFLD
)
654 rPar
.Get(0)->PutInteger(36);
656 RTLFUNC(TYP_INTERNETFLD
)
661 rPar
.Get(0)->PutInteger(37);
669 rPar
.Get(0)->PutInteger(1);
676 rPar
.Get(0)->PutInteger(0);
683 rPar
.Get(0)->PutInteger(2);
686 RTLFUNC(FRAMEANCHORPAGE
)
691 rPar
.Get(0)->PutInteger(1);
693 RTLFUNC(FRAMEANCHORPARA
)
698 rPar
.Get(0)->PutInteger(14);
700 RTLFUNC(FRAMEANCHORCHAR
)
705 rPar
.Get(0)->PutInteger(15);
708 RTLFUNC(CLEAR_ALLTABS
)
713 rPar
.Get(0)->PutInteger(2);
720 rPar
.Get(0)->PutInteger(1);
727 rPar
.Get(0)->PutInteger(0);
735 rPar
.Get(0)->PutInteger(0);
742 rPar
.Get(0)->PutInteger(1);
749 rPar
.Get(0)->PutInteger(2);
756 rPar
.Get(0)->PutInteger(3);
759 RTLFUNC(TYP_JUMPEDITFLD
)
764 rPar
.Get(0)->PutInteger(38);
768 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */