20#ifndef INCLUDED_BASIC_SBSTAR_HXX
21#define INCLUDED_BASIC_SBSTAR_HXX
26#include <rtl/ustring.hxx>
61 bool CError(
ErrCode,
const OUString&, sal_Int32, sal_Int32, sal_Int32 );
84 virtual void Clear()
override;
87 SbModule* MakeModule(
const OUString& rName,
const OUString& rSrc );
88 SbModule*
MakeModule(
const OUString& rName,
const css::script::ModuleInfo& mInfo,
const OUString& rSrc );
91 static void FatalError(
ErrCode );
92 static void FatalError(
ErrCode,
const OUString& rMsg );
93 static bool IsRunning();
97 static sal_Int32 GetErl();
100 virtual bool Call(
const OUString&,
SbxArray* =
nullptr )
override;
104 SbModule* FindModule( std::u16string_view );
106 void InitAllModules(
StarBASIC const * pBasicNotToInit =
nullptr );
107 void DeInitAllModules();
108 void ClearAllModuleVars();
111 static sal_uInt16 GetLine();
112 static sal_uInt16 GetCol1();
113 static sal_uInt16 GetCol2();
114 static void SetErrorData(
ErrCode nCode, sal_uInt16 nLine,
115 sal_uInt16 nCol1, sal_uInt16 nCol2 );
118 static void MakeErrorText(
ErrCode, std::u16string_view aMsg );
119 static const OUString& GetErrorText();
120 static ErrCode const & GetErrorCode();
121 static sal_uInt16 GetVBErrorCode(
ErrCode nError );
122 static ErrCode GetSfxFromVBError( sal_uInt16 nError );
132 static SbxBase* FindSBXInCurrentScope(
const OUString& rName );
133 static SbMethod* GetActiveMethod( sal_uInt16 nLevel = 0 );
135 void SetVBAEnabled(
bool bEnabled );
136 bool isVBAEnabled()
const;
141 bool GetUNOConstant(
const OUString& rName, css::uno::Any& aOut );
142 void QuitAndExitApplication();
147 static css::uno::Reference< css::frame::XModel >
150 static void DetachAllDocBasicItems();
static OUString const & GetErrorMsg()
virtual void Clear() override
virtual void Insert(SbxVariable *)
virtual SbxVariable * Find(const OUString &, SbxClassType)
virtual bool Call(const OUString &, SbxArray *=nullptr)
void Remove(const OUString &, SbxClassType)
virtual bool LoadData(SvStream &, sal_uInt16) override
virtual std::pair< bool, sal_uInt32 > StoreData(SvStream &) const override
virtual void SetModified(bool) override
Link< StarBASIC *, BasicDebugFlags > aBreakHdl
Link< StarBASIC *, bool > aErrorHdl
SBX_DECL_PERSIST_NODATA(SBXID_BASIC, 1)
SbxArrayRef xUnoListeners
bool IsQuitApplication() const
SbModule * MakeModule(const OUString &rName, const css::script::ModuleInfo &mInfo, const OUString &rSrc)
const SbxObjectRef & getRTL() const
std::vector< SbModuleRef > SbModules
tools::SvRef< StarBASIC > StarBASICRef