Kaydet (Commit) 254f372b authored tarafından Takeshi Abe's avatar Takeshi Abe

Use defined utility BASIC_DLL()/BASIC_MOD()

üst baf5ffc7
...@@ -125,7 +125,7 @@ namespace BasicIDEGlobals ...@@ -125,7 +125,7 @@ namespace BasicIDEGlobals
} }
IDEResId::IDEResId( sal_uInt16 nId ): IDEResId::IDEResId( sal_uInt16 nId ):
ResId( nId, *(*(BasicIDEModule**)GetAppData(SHL_IDE))->GetResMgr() ) ResId( nId, *(BASIC_MOD())->GetResMgr() )
{ {
} }
......
...@@ -38,13 +38,13 @@ ...@@ -38,13 +38,13 @@
#include <sb.hrc> #include <sb.hrc>
BasResId::BasResId( sal_uInt32 nId ) : BasResId::BasResId( sal_uInt32 nId ) :
ResId( nId, *((*(BasicDLL**)GetAppData(SHL_BASIC))->GetBasResMgr()) ) ResId( nId, *(BASIC_DLL()->GetBasResMgr()) )
{ {
} }
BasicDLL::BasicDLL() BasicDLL::BasicDLL()
{ {
*(BasicDLL**)GetAppData(SHL_BASIC) = this; BASIC_DLL() = this;
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pBasResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale ); pBasResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale );
bDebugMode = sal_False; bDebugMode = sal_False;
...@@ -58,7 +58,7 @@ BasicDLL::~BasicDLL() ...@@ -58,7 +58,7 @@ BasicDLL::~BasicDLL()
void BasicDLL::EnableBreak( sal_Bool bEnable ) void BasicDLL::EnableBreak( sal_Bool bEnable )
{ {
BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC); BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
if ( pThis ) if ( pThis )
pThis->bBreakEnabled = bEnable; pThis->bBreakEnabled = bEnable;
...@@ -66,7 +66,7 @@ void BasicDLL::EnableBreak( sal_Bool bEnable ) ...@@ -66,7 +66,7 @@ void BasicDLL::EnableBreak( sal_Bool bEnable )
void BasicDLL::SetDebugMode( sal_Bool bDebugMode ) void BasicDLL::SetDebugMode( sal_Bool bDebugMode )
{ {
BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC); BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
if ( pThis ) if ( pThis )
pThis->bDebugMode = bDebugMode; pThis->bDebugMode = bDebugMode;
...@@ -79,7 +79,7 @@ void BasicDLL::BasicBreak() ...@@ -79,7 +79,7 @@ void BasicDLL::BasicBreak()
// but the Basic doesn't stop early enough, the box might appear more often... // but the Basic doesn't stop early enough, the box might appear more often...
static sal_Bool bJustStopping = sal_False; static sal_Bool bJustStopping = sal_False;
BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC); BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
if ( pThis ) if ( pThis )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment