diff options
Diffstat (limited to 'basic/inc/basic/sbstar.hxx')
-rw-r--r-- | basic/inc/basic/sbstar.hxx | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index f25ddcf02c09..a40ac394334e 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,40 +57,40 @@ class StarBASIC : public SbxObject friend class SbiInstance; friend class SbiRuntime; - StarBASICImpl* mpStarBASICImpl; - - SbxArrayRef pModules; // List of all modules - SbxObjectRef pRtl; // Runtime Library - SbxArrayRef xUnoListeners; // Listener handled by CreateUnoListener + StarBASICImpl* mpStarBASICImpl; + SbxArrayRef pModules; // List of all modules + SbxObjectRef pRtl; // Runtime Library + SbxArrayRef xUnoListeners; // Listener handled by CreateUnoListener + // Handler-Support: - Link aErrorHdl; // Error handler - Link aBreakHdl; // Breakpoint handler - BOOL bNoRtl; // if TRUE: do not search RTL - BOOL bBreak; // if TRUE: Break, otherwise Step - BOOL bDocBasic; - BOOL bVBAEnabled; - BasicLibInfo* pLibInfo; // Info block for basic manager - SbLanguageMode eLanguageMode; // LanguageMode of the basic object - BOOL bQuit; - - SbxObjectRef pVBAGlobals; + Link aErrorHdl; // Error handler + Link aBreakHdl; // Breakpoint handler + BOOL bNoRtl; // if TRUE: do not search RTL + BOOL bBreak; // if TRUE: Break, otherwise Step + BOOL bDocBasic; + BOOL bVBAEnabled; + BasicLibInfo* pLibInfo; // Info block for basic manager + SbLanguageMode eLanguageMode; // LanguageMode of the basic object + BOOL bQuit; + + SbxObjectRef pVBAGlobals; SbxObject* getVBAGlobals( ); protected: - BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); + BOOL CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen ); private: - BOOL RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen ); - BOOL RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen ); - USHORT BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); - USHORT StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); + BOOL RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen ); + BOOL RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen ); + USHORT BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); + USHORT StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 ); virtual BOOL LoadData( SvStream&, USHORT ); virtual BOOL StoreData( SvStream& ) const; protected: - virtual BOOL ErrorHdl(); - virtual USHORT BreakHdl(); + virtual BOOL ErrorHdl(); + virtual USHORT BreakHdl(); virtual ~StarBASIC(); public: @@ -104,67 +104,67 @@ public: // not delivered to Parent. virtual void SetModified( BOOL ); - void* operator new( size_t ); - void operator delete( void* ); + void* operator new( size_t ); + void operator delete( void* ); virtual void Insert( SbxVariable* ); using SbxObject::Remove; virtual void Remove( SbxVariable* ); - virtual void Clear(); + virtual void Clear(); - BasicLibInfo* GetLibInfo() { return pLibInfo; } - void SetLibInfo( BasicLibInfo* p ) { pLibInfo = p; } + BasicLibInfo* GetLibInfo() { return pLibInfo; } + void SetLibInfo( BasicLibInfo* p ) { pLibInfo = p; } // Compiler-Interface - SbModule* MakeModule( const String& rName, const String& rSrc ); - SbModule* MakeModule32( const String& rName, const ::rtl::OUString& rSrc ); + SbModule* MakeModule( const String& rName, const String& rSrc ); + SbModule* MakeModule32( const String& rName, const ::rtl::OUString& rSrc ); SbModule* MakeModule32( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, const ::rtl::OUString& rSrc ); - BOOL Compile( SbModule* ); - BOOL Disassemble( SbModule*, String& rText ); - static void Stop(); - static void Error( SbError ); - static void Error( SbError, const String& rMsg ); - static void FatalError( SbError ); - static void FatalError( SbError, const String& rMsg ); - static BOOL IsRunning(); - static SbError GetErrBasic(); + BOOL Compile( SbModule* ); + BOOL Disassemble( SbModule*, String& rText ); + static void Stop(); + static void Error( SbError ); + static void Error( SbError, const String& rMsg ); + static void FatalError( SbError ); + static void FatalError( SbError, const String& rMsg ); + static BOOL IsRunning(); + static SbError GetErrBasic(); // #66536 make additional message accessible by RTL function Error - static String GetErrorMsg(); + static String GetErrorMsg(); static xub_StrLen GetErl(); // Highlighting - void Highlight( const String& rSrc, SbTextPortions& rList ); + void Highlight( const String& rSrc, SbTextPortions& rList ); virtual SbxVariable* Find( const String&, SbxClassType ); virtual BOOL Call( const String&, SbxArray* = NULL ); - SbxArray* GetModules() { return pModules; } - SbxObject* GetRtl() { return pRtl; } - SbModule* FindModule( const String& ); + SbxArray* GetModules() { return pModules; } + SbxObject* GetRtl() { return pRtl; } + SbModule* FindModule( const String& ); // Run init code of all modules (including the inserted Doc-Basics) - void InitAllModules( StarBASIC* pBasicNotToInit = NULL ); - void DeInitAllModules( void ); - void ClearAllModuleVars( void ); - void ActivateObject( const String*, BOOL ); - BOOL LoadOldModules( SvStream& ); + void InitAllModules( StarBASIC* pBasicNotToInit = NULL ); + void DeInitAllModules( void ); + void ClearAllModuleVars( void ); + void ActivateObject( const String*, BOOL ); + BOOL LoadOldModules( SvStream& ); // #43011 For TestTool; deletes global vars - void ClearGlobalVars( void ); + void ClearGlobalVars( void ); // Calls for error and break handler - static USHORT GetLine(); - static USHORT GetCol1(); - static USHORT GetCol2(); - static void SetErrorData( SbError nCode, USHORT nLine, + static USHORT GetLine(); + static USHORT GetCol1(); + static USHORT GetCol2(); + static void SetErrorData( SbError nCode, USHORT nLine, USHORT nCol1, USHORT nCol2 ); // Specific to error handler - static void MakeErrorText( SbError, const String& aMsg ); - static const String& GetErrorText(); - static SbError GetErrorCode(); - static BOOL IsCompilerError(); - static USHORT GetVBErrorCode( SbError nError ); - static SbError GetSfxFromVBError( USHORT nError ); - static void SetGlobalLanguageMode( SbLanguageMode eLangMode ); + static void MakeErrorText( SbError, const String& aMsg ); + static const String& GetErrorText(); + static SbError GetErrorCode(); + static BOOL IsCompilerError(); + static USHORT GetVBErrorCode( SbError nError ); + static SbError GetSfxFromVBError( USHORT nError ); + static void SetGlobalLanguageMode( SbLanguageMode eLangMode ); static SbLanguageMode GetGlobalLanguageMode(); // Local settings void SetLanguageMode( SbLanguageMode eLangMode ) @@ -172,22 +172,22 @@ public: SbLanguageMode GetLanguageMode(); // Specific for break handler - BOOL IsBreak() const { return bBreak; } + BOOL IsBreak() const { return bBreak; } - static Link GetGlobalErrorHdl(); - static void SetGlobalErrorHdl( const Link& rNewHdl ); - Link GetErrorHdl() const { return aErrorHdl; } - void SetErrorHdl( const Link& r ) { aErrorHdl = r; } + static Link GetGlobalErrorHdl(); + static void SetGlobalErrorHdl( const Link& rNewHdl ); + Link GetErrorHdl() const { return aErrorHdl; } + void SetErrorHdl( const Link& r ) { aErrorHdl = r; } - static Link GetGlobalBreakHdl(); - static void SetGlobalBreakHdl( const Link& rNewHdl ); - Link GetBreakHdl() const { return aBreakHdl; } - void SetBreakHdl( const Link& r ) { aBreakHdl = r; } + static Link GetGlobalBreakHdl(); + static void SetGlobalBreakHdl( const Link& rNewHdl ); + Link GetBreakHdl() const { return aBreakHdl; } + void SetBreakHdl( const Link& r ) { aBreakHdl = r; } - SbxArrayRef getUnoListeners( void ); + SbxArrayRef getUnoListeners( void ); - static SbxBase* FindSBXInCurrentScope( const String& rName ); - static SbxVariable* FindVarInCurrentScopy + static SbxBase* FindSBXInCurrentScope( const String& rName ); + static SbxVariable* FindVarInCurrentScopy ( const String& rName, USHORT& rStatus ); static SbMethod* GetActiveMethod( USHORT nLevel = 0 ); static SbModule* GetActiveModule(); |