xref: /aoo41x/main/basic/source/classes/sbintern.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_basic.hxx"
30 #include <tools/shl.hxx>
31 
32 #include "sbintern.hxx"
33 #include "sbunoobj.hxx"
34 #include "token.hxx"				// Tokenizer
35 #include "symtbl.hxx"				// Symbolverwaltung
36 #include "parser.hxx"				// Parser
37 #include "codegen.hxx" 				// Code-Generator
38 #include <basic/basmgr.hxx>
39 
40 SV_IMPL_PTRARR(SbErrorStack, SbErrorStackEntry*)
41 
42 SbiGlobals* GetSbData()
43 {
44 	SbiGlobals** pp = (SbiGlobals**) ::GetAppData( SHL_SBC );
45 	SbiGlobals* p = *pp;
46 	if( !p )
47 		p = *pp = new SbiGlobals;
48 	return p;
49 }
50 
51 SbiGlobals::SbiGlobals()
52 {
53 	pInst = NULL;
54 	pMod  = NULL;
55 	pSbFac= NULL;
56 	pUnoFac = NULL;
57 	pTypeFac = NULL;
58 	pOLEFac = NULL;
59 	pCompMod = NULL; // JSM
60 	nInst = 0;
61 	nCode = 0;
62 	nLine = 0;
63 	nCol1 = nCol2 = 0;
64 	bCompiler = sal_False;
65 	bGlobalInitErr = sal_False;
66 	bRunInit = sal_False;
67 	eLanguageMode = SB_LANG_BASIC;
68 	pErrStack = NULL;
69     pTransliterationWrapper = NULL;
70     bBlockCompilerError = sal_False;
71     pAppBasMgr = NULL;
72 	pMSOMacroRuntimLib = NULL;
73 }
74 
75 SbiGlobals::~SbiGlobals()
76 {
77 	delete pErrStack;
78 	delete pSbFac;
79 	delete pUnoFac;
80     delete pTransliterationWrapper;
81 }
82 
83