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/sbstar.hxx>
25 #include <basic/sbxfac.hxx>
26 #include <unotools/transliterationwrapper.hxx>
27 #include <vcl/errcode.hxx>
31 class TransliterationWrapper
;
41 class SbiFactory
: public SbxFactory
44 virtual SbxBase
* Create( sal_uInt16 nSbxId
, sal_uInt32
) override
;
45 virtual SbxObject
* CreateObject( const OUString
& ) override
;
52 // types this module depends on because of use in Dim As New <type>
53 // needed for initialization order of class modules
54 std::vector
< OUString
> maRequiredTypes
;
62 // #115824: Factory class to create class objects (type command)
63 // Implementation: sb.cxx
64 class SbClassFactory
: public SbxFactory
66 SbxObjectRef xClassModules
;
70 virtual ~SbClassFactory() override
;
72 void AddClassModule( SbModule
* pClassModule
);
73 void RemoveClassModule( SbModule
* pClassModule
);
75 virtual SbxBase
* Create( sal_uInt16 nSbxId
, sal_uInt32
) override
;
76 virtual SbxObject
* CreateObject( const OUString
& ) override
;
78 SbModule
* FindClass( const OUString
& rClassName
);
83 static SbiGlobals
* pGlobals
;
84 SbiInstance
* pInst
; // all active runtime instances
85 std::unique_ptr
<SbiFactory
> pSbFac
; // StarBASIC-Factory
86 std::unique_ptr
<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
*,BasicDebugFlags
> aBreakHdl
; // global break handler
98 sal_Int32 nCol1
,nCol2
; // from... to...
99 bool bCompilerError
; // flag for compiler error
101 bool bRunInit
; // true, if RunInit active from the Basic
102 OUString aErrMsg
; // buffer for GetErrorText()
103 std::unique_ptr
<::utl::TransliterationWrapper
> pTransliterationWrapper
; // For StrComp
104 bool bBlockCompilerError
;
105 std::unique_ptr
<BasicManager
> pAppBasMgr
;
106 StarBASIC
* pMSOMacroRuntimLib
; // Lib containing MSO Macro Runtime API entry symbols
112 // utility macros and routines
114 SbiGlobals
* GetSbData();
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */