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 .
20 #ifndef INCLUDED_BASIC_SOURCE_INC_SBINTERN_HXX
21 #define INCLUDED_BASIC_SOURCE_INC_SBINTERN_HXX
23 #include <basic/basicdllapi.h>
24 #include <basic/sbxfac.hxx>
25 #include <unotools/transliterationwrapper.hxx>
30 class TransliterationWrapper
;
39 class SbiFactory
: public SbxFactory
42 virtual SbxBase
* Create( sal_uInt16 nSbxId
, sal_uInt32
= SBXCR_SBX
) SAL_OVERRIDE
;
43 virtual SbxObject
* CreateObject( const OUString
& ) SAL_OVERRIDE
;
46 typedef ::std::vector
< OUString
> StringVector
;
52 // types this module depends on because of use in Dim As New <type>
53 // needed for initialization order of class modules
54 StringVector maRequiredTypes
;
62 // #115824: Factory class to create class objects (type command)
63 // Implementation: sb.cxx
64 class BASIC_DLLPUBLIC SbClassFactory
: public SbxFactory
66 SbxObjectRef xClassModules
;
70 virtual ~SbClassFactory();
72 void AddClassModule( SbModule
* pClassModule
);
73 void RemoveClassModule( SbModule
* pClassModule
);
75 virtual SbxBase
* Create( sal_uInt16 nSbxId
, sal_uInt32
= SBXCR_SBX
) SAL_OVERRIDE
;
76 virtual SbxObject
* CreateObject( const OUString
& ) SAL_OVERRIDE
;
78 SbModule
* FindClass( const OUString
& rClassName
);
83 static SbiGlobals
* pGlobals
;
84 SbiInstance
* pInst
; // all active runtime instances
85 SbiFactory
* pSbFac
; // StarBASIC-Factory
86 SbUnoFactory
* pUnoFac
; // Factory for Uno-Structs at DIM AS NEW
87 SbTypeFactory
* pTypeFac
; // Factory for user defined types
88 SbClassFactory
* pClassFac
; // Factory for user defined classes (based on class modules)
89 SbOLEFactory
* pOLEFac
; // Factory for OLE types
90 SbFormFactory
* pFormFac
; // Factory for user forms
91 SbModule
* pMod
; // currently active module
92 SbModule
* pCompMod
; // currently compiled module
93 short nInst
; // number of BASICs
94 Link
<StarBASIC
*,bool> aErrHdl
; // global error handler
95 Link
<StarBASIC
*,sal_uInt16
> aBreakHdl
; // global break handler
98 sal_Int32 nCol1
,nCol2
; // from... to...
99 bool bCompiler
; // flag for compiler error
101 bool bRunInit
; // true, if RunInit active from the Basic
102 OUString aErrMsg
; // buffer for GetErrorText()
103 ::utl::TransliterationWrapper
* pTransliterationWrapper
; // For StrComp
104 bool bBlockCompilerError
;
105 BasicManager
* pAppBasMgr
;
106 StarBASIC
* pMSOMacroRuntimLib
; // Lib containing MSO Macro Runtime API entry symbols
112 // utility macros and routines
114 BASIC_DLLPUBLIC SbiGlobals
* GetSbData();
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */