diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index e02c0f6798a0..e10b7b356111 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include #include #include @@ -46,15 +45,21 @@ struct BasicDLL::Impl { } }; +namespace { + +BasicDLL * BASIC_DLL; + +} + BasResId::BasResId( sal_uInt32 nId ) : - ResId( nId, *(BASIC_DLL()->GetBasResMgr()) ) + ResId( nId, *(BASIC_DLL->GetBasResMgr()) ) { } BasicDLL::BasicDLL() : m_xImpl(new Impl) { - BASIC_DLL() = this; + BASIC_DLL = this; } BasicDLL::~BasicDLL() @@ -65,7 +70,7 @@ ResMgr* BasicDLL::GetBasResMgr() const { return m_xImpl->xBasResMgr.get(); } void BasicDLL::EnableBreak( bool bEnable ) { - BasicDLL* pThis = BASIC_DLL(); + BasicDLL* pThis = BASIC_DLL; DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); if ( pThis ) { @@ -75,7 +80,7 @@ void BasicDLL::EnableBreak( bool bEnable ) void BasicDLL::SetDebugMode( bool bDebugMode ) { - BasicDLL* pThis = BASIC_DLL(); + BasicDLL* pThis = BASIC_DLL; DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); if ( pThis ) { @@ -86,7 +91,7 @@ void BasicDLL::SetDebugMode( bool bDebugMode ) void BasicDLL::BasicBreak() { - BasicDLL* pThis = BASIC_DLL(); + BasicDLL* pThis = BASIC_DLL; DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" ); if ( pThis ) { @@ -106,7 +111,7 @@ void BasicDLL::BasicBreak() SbxAppData& GetSbxData_Impl() { - return *BASIC_DLL()->m_xImpl->xSbxAppData; + return *BASIC_DLL->m_xImpl->xSbxAppData; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/basic/basrdll.hxx b/include/basic/basrdll.hxx index 159e85652bdf..623ec6afcbaf 100644 --- a/include/basic/basrdll.hxx +++ b/include/basic/basrdll.hxx @@ -43,8 +43,6 @@ public: static void SetDebugMode( bool bDebugMode ); }; -#define BASIC_DLL() (*reinterpret_cast(GetAppData( SHL_BASIC )) ) - #endif // INCLUDED_BASIC_BASRDLL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/tools/shl.hxx b/include/tools/shl.hxx index c310c55c6141..db6693ca22c6 100644 --- a/include/tools/shl.hxx +++ b/include/tools/shl.hxx @@ -47,7 +47,7 @@ //20 (SHL_IDE) removed //21 (SHL_EDIT) removed //22 (SHL_VCED) removed -#define SHL_BASIC 23 +//23 (SHL_BASIC) removed //24 (SHL_HELP) removed //25 (SHL_LNKCCH) removed //26 (SHL_CHANNEL) removed