xref: /aoo4110/main/basic/source/classes/sbintern.cxx (revision b1cdbd2c)
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 #include <tools/shl.hxx>
27 
28 #include "sbintern.hxx"
29 #include "sbunoobj.hxx"
30 #include "token.hxx"				// Tokenizer
31 #include "symtbl.hxx"				// Symbolverwaltung
32 #include "parser.hxx"				// Parser
33 #include "codegen.hxx" 				// Code-Generator
34 #include <basic/basmgr.hxx>
35 
SV_IMPL_PTRARR(SbErrorStack,SbErrorStackEntry *)36 SV_IMPL_PTRARR(SbErrorStack, SbErrorStackEntry*)
37 
38 SbiGlobals* GetSbData()
39 {
40 	SbiGlobals** pp = (SbiGlobals**) ::GetAppData( SHL_SBC );
41 	SbiGlobals* p = *pp;
42 	if( !p )
43 		p = *pp = new SbiGlobals;
44 	return p;
45 }
46 
SbiGlobals()47 SbiGlobals::SbiGlobals()
48 {
49 	pInst = NULL;
50 	pMod  = NULL;
51 	pSbFac= NULL;
52 	pUnoFac = NULL;
53 	pTypeFac = NULL;
54 	pOLEFac = NULL;
55 	pCompMod = NULL; // JSM
56 	nInst = 0;
57 	nCode = 0;
58 	nLine = 0;
59 	nCol1 = nCol2 = 0;
60 	bCompiler = sal_False;
61 	bGlobalInitErr = sal_False;
62 	bRunInit = sal_False;
63 	eLanguageMode = SB_LANG_BASIC;
64 	pErrStack = NULL;
65     pTransliterationWrapper = NULL;
66     bBlockCompilerError = sal_False;
67     pAppBasMgr = NULL;
68 	pMSOMacroRuntimLib = NULL;
69 }
70 
~SbiGlobals()71 SbiGlobals::~SbiGlobals()
72 {
73 	delete pErrStack;
74 	delete pSbFac;
75 	delete pUnoFac;
76     delete pTransliterationWrapper;
77 }
78 
79