summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-01-15 16:15:08 +0100
committerDavid Tardon <dtardon@redhat.com>2012-01-15 20:27:18 +0100
commitd54349233fe15c3ec747d59d6ad525e4b8c451b8 (patch)
treed954e5f4f650197091373992470775a85d9766cd /basic
parent09f8d4f75a0b3527bf6f99f5408dfda3c711c382 (diff)
remove useless misleading macros
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/errobject.cxx6
-rw-r--r--basic/source/classes/eventatt.cxx8
-rw-r--r--basic/source/classes/sb.cxx104
-rw-r--r--basic/source/classes/sbunoobj.cxx14
-rw-r--r--basic/source/classes/sbxmod.cxx66
-rw-r--r--basic/source/comp/codegen.cxx4
-rw-r--r--basic/source/comp/sbcomp.cxx8
-rw-r--r--basic/source/inc/sbintern.hxx10
-rw-r--r--basic/source/runtime/iosys.cxx2
-rw-r--r--basic/source/runtime/methods.cxx90
-rw-r--r--basic/source/runtime/methods1.cxx26
-rw-r--r--basic/source/runtime/runtime.cxx6
-rw-r--r--basic/source/runtime/stdobj.cxx2
-rw-r--r--basic/source/runtime/step0.cxx2
-rw-r--r--basic/source/runtime/step1.cxx2
-rw-r--r--basic/source/runtime/step2.cxx2
16 files changed, 171 insertions, 181 deletions
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx
index 5c8d54c1be6b..b3c06df9381e 100644
--- a/basic/source/classes/errobject.cxx
+++ b/basic/source/classes/errobject.cxx
@@ -90,8 +90,8 @@ ErrObject::getNumber() throw (uno::RuntimeException)
void SAL_CALL
ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException)
{
- pINST->setErrorVB( _number, String() );
- ::rtl::OUString _description = pINST->GetErrorMsg();
+ GetSbData()->pInst->setErrorVB( _number, String() );
+ ::rtl::OUString _description = GetSbData()->pInst->GetErrorMsg();
setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() );
}
@@ -158,7 +158,7 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any
{
setData( Number, Source, Description, HelpFile, HelpContext );
if ( m_nNumber )
- pINST->ErrorVB( m_nNumber, m_sDescription );
+ GetSbData()->pInst->ErrorVB( m_nNumber, m_sDescription );
}
// XDefaultProperty
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index 0e7b3b989ead..06b055fa4ccc 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -513,8 +513,8 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
bool bDocDialog = false;
StarBASIC* pFoundBasic = NULL;
OSL_TRACE("About to try get a hold of ThisComponent");
- Reference< frame::XModel > xModel = StarBASIC::GetModelFromBasic( pINST->GetBasic() ) ;
- aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pINST->GetBasic(), pFoundBasic );
+ Reference< frame::XModel > xModel = StarBASIC::GetModelFromBasic( GetSbData()->pInst->GetBasic() ) ;
+ aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, GetSbData()->pInst->GetBasic(), pFoundBasic );
// If we found the dialog then it belongs to the Search basic
if ( !pFoundBasic )
{
@@ -550,7 +550,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
}
if ( pFoundBasic )
bDocDialog = pFoundBasic->IsDocBasic();
- Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pINST->GetBasic(), xModel );
+ Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( GetSbData()->pInst->GetBasic(), xModel );
Sequence< Any > aArgs( 4 );
if( bDocDialog )
@@ -568,7 +568,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
xCntrl.set( xDlgProv->createDialog( rtl::OUString() ), UNO_QUERY_THROW );
// Add dialog model to dispose vector
Reference< XComponent > xDlgComponent( xCntrl->getModel(), UNO_QUERY );
- pINST->getComponentVector().push_back( xDlgComponent );
+ GetSbData()->pInst->getComponentVector().push_back( xDlgComponent );
// need ThisCompoent from calling script
}
// preserve existing bad behaviour, it's possible... but probably
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 49d15f6e4dc5..a0b3bb8a0a92 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -488,7 +488,7 @@ SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 )
SbxObject* SbFormFactory::CreateObject( const String& rClassName )
{
- if( SbModule* pMod = pMOD )
+ if( SbModule* pMod = GetSbData()->pMod )
{
if( SbxVariable* pVar = pMod->Find( rClassName, SbxCLASS_OBJECT ) )
{
@@ -592,7 +592,7 @@ SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 )
SbxObject* SbTypeFactory::CreateObject( const String& rClassName )
{
SbxObject* pRet = NULL;
- SbModule* pMod = pMOD;
+ SbModule* pMod = GetSbData()->pMod;
if( pMod )
{
const SbxObject* pObj = pMod->FindType( rClassName );
@@ -604,7 +604,7 @@ SbxObject* SbTypeFactory::CreateObject( const String& rClassName )
SbxObject* createUserTypeImpl( const String& rClassName )
{
- SbxObject* pRetObj = pTYPEFAC->CreateObject( rClassName );
+ SbxObject* pRetObj = GetSbData()->pTypeFac->CreateObject( rClassName );
return pRetObj;
}
@@ -876,7 +876,7 @@ SbxObject* SbClassFactory::CreateObject( const String& rClassName )
{
SbxObjectRef xToUseClassModules = xClassModules;
- if( SbModule* pMod = pMOD )
+ if( SbModule* pMod = GetSbData()->pMod )
if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pMod ) )
if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) )
xToUseClassModules = pDocBasicItem->getClassModules();
@@ -909,18 +909,18 @@ StarBASIC::StarBASIC( StarBASIC* p, sal_Bool bIsDocBasic )
if( !GetSbData()->nInst++ )
{
- pSBFAC = new SbiFactory;
- AddFactory( pSBFAC );
- pTYPEFAC = new SbTypeFactory;
- AddFactory( pTYPEFAC );
- pCLASSFAC = new SbClassFactory;
- AddFactory( pCLASSFAC );
- pOLEFAC = new SbOLEFactory;
- AddFactory( pOLEFAC );
- pFORMFAC = new SbFormFactory;
- AddFactory( pFORMFAC );
- pUNOFAC = new SbUnoFactory;
- AddFactory( pUNOFAC );
+ GetSbData()->pSbFac = new SbiFactory;
+ AddFactory( GetSbData()->pSbFac );
+ GetSbData()->pTypeFac = new SbTypeFactory;
+ AddFactory( GetSbData()->pTypeFac );
+ GetSbData()->pClassFac = new SbClassFactory;
+ AddFactory( GetSbData()->pClassFac );
+ GetSbData()->pOLEFac = new SbOLEFactory;
+ AddFactory( GetSbData()->pOLEFac );
+ GetSbData()->pFormFac = new SbFormFactory;
+ AddFactory( GetSbData()->pFormFac );
+ GetSbData()->pUnoFac = new SbUnoFactory;
+ AddFactory( GetSbData()->pUnoFac );
}
pRtl = new SbiStdObject( String( RTL_CONSTASCII_USTRINGPARAM(RTLNAME) ), this );
// Search via StarBasic is always global
@@ -952,18 +952,18 @@ StarBASIC::~StarBASIC()
if( !--GetSbData()->nInst )
{
- RemoveFactory( pSBFAC );
- delete pSBFAC; pSBFAC = NULL;
- RemoveFactory( pUNOFAC );
- delete pUNOFAC; pUNOFAC = NULL;
- RemoveFactory( pTYPEFAC );
- delete pTYPEFAC; pTYPEFAC = NULL;
- RemoveFactory( pCLASSFAC );
- delete pCLASSFAC; pCLASSFAC = NULL;
- RemoveFactory( pOLEFAC );
- delete pOLEFAC; pOLEFAC = NULL;
- RemoveFactory( pFORMFAC );
- delete pFORMFAC; pFORMFAC = NULL;
+ RemoveFactory( GetSbData()->pSbFac );
+ delete GetSbData()->pSbFac; GetSbData()->pSbFac = NULL;
+ RemoveFactory( GetSbData()->pUnoFac );
+ delete GetSbData()->pUnoFac; GetSbData()->pUnoFac = NULL;
+ RemoveFactory( GetSbData()->pTypeFac );
+ delete GetSbData()->pTypeFac; GetSbData()->pTypeFac = NULL;
+ RemoveFactory( GetSbData()->pClassFac );
+ delete GetSbData()->pClassFac; GetSbData()->pClassFac = NULL;
+ RemoveFactory( GetSbData()->pOLEFac );
+ delete GetSbData()->pOLEFac; GetSbData()->pOLEFac = NULL;
+ RemoveFactory( GetSbData()->pFormFac );
+ delete GetSbData()->pFormFac; GetSbData()->pFormFac = NULL;
#ifdef DBG_UTIL
// There is no need to clean SbiData at program end,
@@ -1361,11 +1361,11 @@ sal_Bool StarBASIC::Call( const String& rName, SbxArray* pParam )
// Find method via name (e.g. query via BASIC IDE)
SbxBase* StarBASIC::FindSBXInCurrentScope( const String& rName )
{
- if( !pINST )
+ if( !GetSbData()->pInst )
return NULL;
- if( !pINST->pRun )
+ if( !GetSbData()->pInst->pRun )
return NULL;
- return pINST->pRun->FindElementExtern( rName );
+ return GetSbData()->pInst->pRun->FindElementExtern( rName );
}
void StarBASIC::QuitAndExitApplication()
@@ -1376,7 +1376,7 @@ void StarBASIC::QuitAndExitApplication()
void StarBASIC::Stop()
{
- SbiInstance* p = pINST;
+ SbiInstance* p = GetSbData()->pInst;
while( p )
{
p->Stop();
@@ -1386,7 +1386,7 @@ void StarBASIC::Stop()
sal_Bool StarBASIC::IsRunning()
{
- return sal_Bool( pINST != NULL );
+ return sal_Bool( GetSbData()->pInst != NULL );
}
/**************************************************************************
@@ -1397,18 +1397,18 @@ sal_Bool StarBASIC::IsRunning()
SbMethod* StarBASIC::GetActiveMethod( sal_uInt16 nLevel )
{
- if( pINST )
- return pINST->GetCaller( nLevel );
+ if( GetSbData()->pInst )
+ return GetSbData()->pInst->GetCaller( nLevel );
else
return NULL;
}
SbModule* StarBASIC::GetActiveModule()
{
- if( pINST && !IsCompilerError() )
- return pINST->GetActiveModule();
+ if( GetSbData()->pInst && !IsCompilerError() )
+ return GetSbData()->pInst->GetActiveModule();
else
- return pCMOD;
+ return GetSbData()->pCompMod;
}
sal_uInt16 StarBASIC::BreakPoint( sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
@@ -1620,7 +1620,7 @@ sal_Bool StarBASIC::CError
if( IsRunning() )
{
// #109018 Check if running Basic is affected
- StarBASIC* pStartedBasic = pINST->GetBasic();
+ StarBASIC* pStartedBasic = GetSbData()->pInst->GetBasic();
if( pStartedBasic != this )
return sal_False;
@@ -1696,26 +1696,26 @@ void StarBASIC::Error( SbError n )
void StarBASIC::Error( SbError n, const String& rMsg )
{
- if( pINST )
- pINST->Error( n, rMsg );
+ if( GetSbData()->pInst )
+ GetSbData()->pInst->Error( n, rMsg );
}
void StarBASIC::FatalError( SbError n )
{
- if( pINST )
- pINST->FatalError( n );
+ if( GetSbData()->pInst )
+ GetSbData()->pInst->FatalError( n );
}
void StarBASIC::FatalError( SbError _errCode, const String& _details )
{
- if( pINST )
- pINST->FatalError( _errCode, _details );
+ if( GetSbData()->pInst )
+ GetSbData()->pInst->FatalError( _errCode, _details );
}
SbError StarBASIC::GetErrBasic()
{
- if( pINST )
- return pINST->GetErr();
+ if( GetSbData()->pInst )
+ return GetSbData()->pInst->GetErr();
else
return 0;
}
@@ -1723,16 +1723,16 @@ SbError StarBASIC::GetErrBasic()
// make the additional message for the RTL function error accessible
String StarBASIC::GetErrorMsg()
{
- if( pINST )
- return pINST->GetErrorMsg();
+ if( GetSbData()->pInst )
+ return GetSbData()->pInst->GetErrorMsg();
else
return String();
}
sal_uInt16 StarBASIC::GetErl()
{
- if( pINST )
- return pINST->GetErl();
+ if( GetSbData()->pInst )
+ return GetSbData()->pInst->GetErl();
else
return 0;
}
@@ -2162,7 +2162,7 @@ void BasicCollection::CollRemove( SbxArray* pPar_ )
xItemArray->Remove32( nIndex );
// Correct for stack if necessary
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
SbiRuntime* pRT = pInst ? pInst->pRun : NULL;
if( pRT )
{
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index b2b6ffd55f0c..0988d7941276 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -766,7 +766,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
}
else
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
oleautomation::Date aDate;
@@ -914,7 +914,7 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType )
case SbxCURRENCY: aRetType = ::getCppuType( (oleautomation::Currency*)0 ); break;
case SbxDECIMAL: aRetType = ::getCppuType( (oleautomation::Decimal*)0 ); break;
case SbxDATE: {
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
aRetType = ::getCppuType( (double*)0 );
else
@@ -1304,7 +1304,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
// #112368 Special conversion for Decimal, Currency and Date
if( eType == TypeClass_STRUCT )
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
if( rType == ::getCppuType( (oleautomation::Decimal*)0 ) )
@@ -1557,7 +1557,7 @@ void processAutomationParams( SbxArray* pParams, Sequence< Any >& args, bool bOL
args.realloc( nParamCount );
Any* pAnyArgs = args.getArray();
- bool bBlockConversionToSmallestType = pINST->IsCompatibility();
+ bool bBlockConversionToSmallestType = GetSbData()->pInst->IsCompatibility();
sal_uInt32 i = 0;
if( pArgNamesArray )
{
@@ -2237,7 +2237,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
}
else if( nParamCount < nUnoParamCount )
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
// Check types
@@ -2579,7 +2579,7 @@ SbxInfo* SbUnoMethod::GetInfo()
{
if( !pInfo && m_xUnoMethod.is() )
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
pInfo = new SbxInfo();
@@ -4467,7 +4467,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const ::rtl::OUString& rFunction,
sal_Bool bSetRescheduleBack = sal_False;
sal_Bool bOldReschedule = sal_True;
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
bOldReschedule = pInst->IsReschedule();
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index ddb47c3885df..b492fee4b276 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -728,7 +728,7 @@ SbxVariable* SbModule::Find( const XubString& rName, SbxClassType t )
return NULL;
if( !pRes && pImage )
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst && pInst->IsCompatibility() )
{
// Put enum types as objects into module,
@@ -876,10 +876,10 @@ void SbModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
else
{
// Call of a subprogram
- SbModule* pOld = pMOD;
- pMOD = this;
+ SbModule* pOld = GetSbData()->pMod;
+ GetSbData()->pMod = this;
Run( (SbMethod*) pVar );
- pMOD = pOld;
+ GetSbData()->pMod = pOld;
}
}
}
@@ -1103,7 +1103,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
static String aMSOMacroRuntimeAppSymbol = String::CreateFromAscii( "Application" );
sal_uInt16 nRes = 0;
- sal_Bool bDelInst = sal_Bool( pINST == NULL );
+ sal_Bool bDelInst = sal_Bool( GetSbData()->pInst == NULL );
bool bQuit = false;
StarBASICRef xBasic;
uno::Reference< frame::XModel > xModel;
@@ -1113,7 +1113,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
// #32779: Hold Basic during the execution
xBasic = (StarBASIC*) GetParent();
- pINST = new SbiInstance( (StarBASIC*) GetParent() );
+ GetSbData()->pInst = new SbiInstance( (StarBASIC*) GetParent() );
/* If a VBA script in a document is started, get the VBA compatibility
interface from the document Basic library container, and notify all
@@ -1183,7 +1183,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
}
// Recursion to deep?
- if( ++pINST->nCallLvl <= nMaxCallLevel )
+ if( ++GetSbData()->pInst->nCallLvl <= nMaxCallLevel )
{
// Define a globale variable in all Mods
GlobalRunInit( /* bBasicStart = */ bDelInst );
@@ -1198,20 +1198,20 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
// 1996-10-16: #31460 New concept for StepInto/Over/Out
// For an explanation see runtime.cxx at SbiInstance::CalcBreakCallLevel()
// Identify the BreakCallLevel
- pINST->CalcBreakCallLevel( pMeth->GetDebugFlags() );
+ GetSbData()->pInst->CalcBreakCallLevel( pMeth->GetDebugFlags() );
}
- SbModule* pOldMod = pMOD;
- pMOD = this;
+ SbModule* pOldMod = GetSbData()->pMod;
+ GetSbData()->pMod = this;
SbiRuntime* pRt = new SbiRuntime( this, pMeth, pMeth->nStart );
- pRt->pNext = pINST->pRun;
+ pRt->pNext = GetSbData()->pInst->pRun;
if( pRt->pNext )
pRt->pNext->block();
- pINST->pRun = pRt;
+ GetSbData()->pInst->pRun = pRt;
if ( mbVBACompat )
{
- pINST->EnableCompatibility( sal_True );
+ GetSbData()->pInst->EnableCompatibility( sal_True );
}
while( pRt->Step() ) {}
if( pRt->pNext )
@@ -1227,13 +1227,13 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
if( bDelInst )
{
// Compare here with 1 instead of 0, because before nCallLvl--
- while( pINST->nCallLvl != 1 )
+ while( GetSbData()->pInst->nCallLvl != 1 )
GetpApp()->Yield();
}
nRes = sal_True;
- pINST->pRun = pRt->pNext;
- pINST->nCallLvl--; // Call-Level down again
+ GetSbData()->pInst->pRun = pRt->pNext;
+ GetSbData()->pInst->nCallLvl--; // Call-Level down again
// Exist an higher-ranking runtime instance?
// Then take over SbDEBUG_BREAK, if set
@@ -1242,7 +1242,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
pRtNext->SetDebugFlags( SbDEBUG_BREAK );
delete pRt;
- pMOD = pOldMod;
+ GetSbData()->pMod = pOldMod;
if( bDelInst )
{
// #57841 Clear Uno-Objects, which were helt in RTL functions,
@@ -1251,8 +1251,8 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
clearNativeObjectWrapperVector();
- DBG_ASSERT(pINST->nCallLvl==0,"BASIC-Call-Level > 0");
- delete pINST, pINST = NULL, bDelInst = sal_False;
+ DBG_ASSERT(GetSbData()->pInst->nCallLvl==0,"BASIC-Call-Level > 0");
+ delete GetSbData()->pInst, GetSbData()->pInst = NULL, bDelInst = sal_False;
// #i30690
SolarMutexGuard aSolarGuard;
@@ -1285,11 +1285,11 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
}
}
else
- pINST->nCallLvl--; // Call-Level down again
+ GetSbData()->pInst->nCallLvl--; // Call-Level down again
}
else
{
- pINST->nCallLvl--; // Call-Level down again
+ GetSbData()->pInst->nCallLvl--; // Call-Level down again
StarBASIC::FatalError( SbERR_STACK_OVERFLOW );
}
@@ -1300,10 +1300,10 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
// the end of the program, so that nothing were helt.
ClearUnoObjectsInRTL_Impl( xBasic );
- delete pINST;
- pINST = NULL;
+ delete GetSbData()->pInst;
+ GetSbData()->pInst = NULL;
}
- if ( pBasic && pBasic->IsDocBasic() && pBasic->IsQuitApplication() && !pINST )
+ if ( pBasic && pBasic->IsDocBasic() && pBasic->IsQuitApplication() && !GetSbData()->pInst )
bQuit = true;
if ( bQuit )
{
@@ -1325,18 +1325,18 @@ void SbModule::RunInit()
// Set flag, so that RunInit get activ (Testtool)
GetSbData()->bRunInit = sal_True;
- SbModule* pOldMod = pMOD;
- pMOD = this;
+ SbModule* pOldMod = GetSbData()->pMod;
+ GetSbData()->pMod = this;
// The init code starts always here
SbiRuntime* pRt = new SbiRuntime( this, NULL, 0 );
- pRt->pNext = pINST->pRun;
- pINST->pRun = pRt;
+ pRt->pNext = GetSbData()->pInst->pRun;
+ GetSbData()->pInst->pRun = pRt;
while( pRt->Step() ) {}
- pINST->pRun = pRt->pNext;
+ GetSbData()->pInst->pRun = pRt->pNext;
delete pRt;
- pMOD = pOldMod;
+ GetSbData()->pMod = pOldMod;
pImage->bInit = sal_True;
pImage->bFirstInit = sal_False;
@@ -1632,8 +1632,8 @@ sal_Bool SbModule::SetBP( sal_uInt16 nLine )
pBreaks->insert( pBreaks->begin() + i, nLine );
// #38568: Set during runtime as well here SbDEBUG_BREAK
- if( pINST && pINST->pRun )
- pINST->pRun->SetDebugFlags( SbDEBUG_BREAK );
+ if( GetSbData()->pInst && GetSbData()->pInst->pRun )
+ GetSbData()->pInst->pRun->SetDebugFlags( SbDEBUG_BREAK );
return IsBreakable( nLine );
}
@@ -2746,7 +2746,7 @@ void SbUserFormModule::InitObject()
SbxVariable*
SbUserFormModule::Find( const XubString& rName, SbxClassType t )
{
- if ( !pDocObject && !GetSbData()->bRunInit && pINST )
+ if ( !pDocObject && !GetSbData()->bRunInit && GetSbData()->pInst )
InitObject();
return SbObjModule::Find( rName, t );
}
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 99d1abae4f44..83fd98df32cc 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -135,7 +135,7 @@ void SbiCodeGen::Save()
OSL_TRACE("COdeGen::save() classmodule processing");
rMod.bIsProxyModule = true;
p->SetFlag( SBIMG_CLASSMODULE );
- pCLASSFAC->AddClassModule( &rMod );
+ GetSbData()->pClassFac->AddClassModule( &rMod );
nIfaceCount = pParser->aIfaceVector.size();
if( !rMod.pClassData )
@@ -156,7 +156,7 @@ void SbiCodeGen::Save()
}
else
{
- pCLASSFAC->RemoveClassModule( &rMod );
+ GetSbData()->pClassFac->RemoveClassModule( &rMod );
// Only a ClassModule can revert to Normal
if ( rMod.mnType == com::sun::star::script::ModuleType::CLASS )
rMod.mnType = com::sun::star::script::ModuleType::NORMAL;
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 42871d60146f..e37b9156d641 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -898,8 +898,8 @@ sal_Bool SbModule::Compile()
return sal_False;
SbxBase::ResetError();
- SbModule* pOld = pCMOD;
- pCMOD = this;
+ SbModule* pOld = GetSbData()->pCompMod;
+ GetSbData()->pCompMod = this;
SbiParser* pParser = new SbiParser( (StarBASIC*) GetParent(), this );
while( pParser->Parse() ) {}
@@ -910,7 +910,7 @@ sal_Bool SbModule::Compile()
if( pImage )
pImage->aOUSource = aOUSource;
- pCMOD = pOld;
+ GetSbData()->pCompMod = pOld;
// compiling a module, the module-global
// variables of all modules become invalid
@@ -929,7 +929,7 @@ sal_Bool SbModule::Compile()
}
// #i31510 Init other libs only if Basic isn't running
- if( pINST == NULL )
+ if( GetSbData()->pInst == NULL )
{
SbxObject* pParent_ = pBasic->GetParent();
if( pParent_ )
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index df6ce57152b8..6d6143b6fcb1 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -187,16 +187,6 @@ struct SbiGlobals
BASIC_DLLPUBLIC SbiGlobals* GetSbData();
-#define pINST GetSbData()->pInst
-#define pMOD GetSbData()->pMod
-#define pCMOD GetSbData()->pCompMod
-#define pSBFAC GetSbData()->pSbFac
-#define pUNOFAC GetSbData()->pUnoFac
-#define pTYPEFAC GetSbData()->pTypeFac
-#define pCLASSFAC GetSbData()->pClassFac
-#define pOLEFAC GetSbData()->pOLEFac
-#define pFORMFAC GetSbData()->pFormFac
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 1a63f943d5a7..b29e20336338 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -737,7 +737,7 @@ SbError SbiStream::Write( const ByteString& rBuf, sal_uInt16 n )
SbiIoSystem* SbGetIoSystem()
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
return pInst ? pInst->GetIoSystem() : NULL;
}
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 3ac11152b4ee..e6aef79f5e8d 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -776,7 +776,7 @@ RTLFUNC(RmDir)
StarBASIC::Error( SbERR_PATH_NOT_FOUND );
return;
}
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
@@ -894,10 +894,10 @@ RTLFUNC(FuncCaller)
{
(void)pBasic;
(void)bWrite;
- if ( SbiRuntime::isVBAEnabled() && pINST && pINST->pRun )
+ if ( SbiRuntime::isVBAEnabled() && GetSbData()->pInst && GetSbData()->pInst->pRun )
{
- if ( pINST->pRun->GetExternalCaller() )
- *rPar.Get(0) = *pINST->pRun->GetExternalCaller();
+ if ( GetSbData()->pInst->pRun->GetExternalCaller() )
+ *rPar.Get(0) = *GetSbData()->pInst->pRun->GetExternalCaller();
else
{
SbxVariableRef pVar = new SbxVariable(SbxVARIANT);
@@ -937,7 +937,7 @@ RTLFUNC(InStr)
nFirstStringPos++;
}
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
int bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
@@ -1018,7 +1018,7 @@ RTLFUNC(InStrRev)
}
}
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
int bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
@@ -1243,7 +1243,7 @@ RTLFUNC(Mid)
String aResultStr;
if ( bWrite )
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
@@ -1354,7 +1354,7 @@ RTLFUNC(Replace)
}
}
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
int bTextMode;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
@@ -1539,7 +1539,7 @@ RTLFUNC(Str)
// replace commas by points so that it's symmetric to Val!
aStr.SearchAndReplace( ',', '.' );
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
@@ -1582,7 +1582,7 @@ RTLFUNC(StrComp)
const String& rStr1 = rPar.Get(1)->GetString();
const String& rStr2 = rPar.Get(2)->GetString();
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
sal_Int16 nTextCompare;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
@@ -1930,10 +1930,10 @@ RTLFUNC(DateValue)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
else
{
- // #39629 check pINST, can be called from the URL line
+ // #39629 check GetSbData()->pInst, can be called from the URL line
SvNumberFormatter* pFormatter = NULL;
- if( pINST )
- pFormatter = pINST->GetNumberFormatter();
+ if( GetSbData()->pInst )
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
else
{
sal_uInt32 n; // Dummy
@@ -1977,7 +1977,7 @@ RTLFUNC(DateValue)
StarBASIC::Error( SbERR_CONVERSION );
// #39629 pFormatter can be requested itself
- if( !pINST )
+ if( !GetSbData()->pInst )
delete pFormatter;
}
}
@@ -1992,8 +1992,8 @@ RTLFUNC(TimeValue)
else
{
SvNumberFormatter* pFormatter = NULL;
- if( pINST )
- pFormatter = pINST->GetNumberFormatter();
+ if( GetSbData()->pInst )
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
else
{
sal_uInt32 n;
@@ -2015,7 +2015,7 @@ RTLFUNC(TimeValue)
else
StarBASIC::Error( SbERR_CONVERSION );
- if( !pINST )
+ if( !GetSbData()->pInst )
delete pFormatter;
}
}
@@ -2203,10 +2203,10 @@ RTLFUNC(Time)
SvNumberFormatter* pFormatter = NULL;
sal_uInt32 nIndex;
- if( pINST )
+ if( GetSbData()->pInst )
{
- pFormatter = pINST->GetNumberFormatter();
- nIndex = pINST->GetStdTimeIdx();
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
+ nIndex = GetSbData()->pInst->GetStdTimeIdx();
}
else
{
@@ -2216,7 +2216,7 @@ RTLFUNC(Time)
pFormatter->GetOutputString( nDays, nIndex, aRes, &pCol );
- if( !pINST )
+ if( !GetSbData()->pInst )
delete pFormatter;
}
pMeth->PutString( aRes );
@@ -2258,10 +2258,10 @@ RTLFUNC(Date)
SvNumberFormatter* pFormatter = NULL;
sal_uInt32 nIndex;
- if( pINST )
+ if( GetSbData()->pInst )
{
- pFormatter = pINST->GetNumberFormatter();
- nIndex = pINST->GetStdDateIdx();
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
+ nIndex = GetSbData()->pInst->GetStdDateIdx();
}
else
{
@@ -2272,7 +2272,7 @@ RTLFUNC(Date)
pFormatter->GetOutputString( nDays, nIndex, aRes, &pCol );
pMeth->PutString( aRes );
- if( !pINST )
+ if( !GetSbData()->pInst )
delete pFormatter;
}
else
@@ -2571,7 +2571,7 @@ RTLFUNC(Dir)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
else
{
- SbiRTLData* pRTLData = pINST->GetRTLData();
+ SbiRTLData* pRTLData = GetSbData()->pInst->GetRTLData();
// #34645: can also be called from the URL line via 'macro: Dir'
// there's no pRTLDate existing in that case and the method must be left
@@ -2656,7 +2656,7 @@ RTLFUNC(Dir)
{
sal_Bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0);
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
for( ;; )
{
@@ -2967,10 +2967,10 @@ RTLFUNC(FileDateTime)
SvNumberFormatter* pFormatter = NULL;
sal_uInt32 nIndex;
- if( pINST )
+ if( GetSbData()->pInst )
{
- pFormatter = pINST->GetNumberFormatter();
- nIndex = pINST->GetStdDateTimeIdx();
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
+ nIndex = GetSbData()->pInst->GetStdDateTimeIdx();
}
else
{
@@ -2982,7 +2982,7 @@ RTLFUNC(FileDateTime)
pFormatter->GetOutputString( fSerial, nIndex, aRes, &pCol );
rPar.Get(0)->PutString( aRes );
- if( !pINST )
+ if( !GetSbData()->pInst )
delete pFormatter;
}
}
@@ -2999,7 +2999,7 @@ RTLFUNC(EOF)
else
{
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
{
@@ -3037,7 +3037,7 @@ RTLFUNC(FileAttr)
else
{
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
{
@@ -3064,7 +3064,7 @@ RTLFUNC(Loc)
else
{
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
{
@@ -3102,7 +3102,7 @@ RTLFUNC(Lof)
else
{
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
{
@@ -3131,7 +3131,7 @@ RTLFUNC(Seek)
return;
}
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
{
@@ -3583,7 +3583,7 @@ RTLFUNC(DDEInitiate)
const String& rApp = rPar.Get(1)->GetString();
const String& rTopic = rPar.Get(2)->GetString();
- SbiDdeControl* pDDE = pINST->GetDdeControl();
+ SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
sal_Int16 nChannel;
SbError nDdeErr = pDDE->Initiate( rApp, rTopic, nChannel );
if( nDdeErr )
@@ -3612,7 +3612,7 @@ RTLFUNC(DDETerminate)
return;
}
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
- SbiDdeControl* pDDE = pINST->GetDdeControl();
+ SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
SbError nDdeErr = pDDE->Terminate( nChannel );
if( nDdeErr )
StarBASIC::Error( nDdeErr );
@@ -3638,7 +3638,7 @@ RTLFUNC(DDETerminateAll)
return;
}
- SbiDdeControl* pDDE = pINST->GetDdeControl();
+ SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
SbError nDdeErr = pDDE->TerminateAll();
if( nDdeErr )
StarBASIC::Error( nDdeErr );
@@ -3665,7 +3665,7 @@ RTLFUNC(DDERequest)
}
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
const String& rItem = rPar.Get(2)->GetString();
- SbiDdeControl* pDDE = pINST->GetDdeControl();
+ SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
String aResult;
SbError nDdeErr = pDDE->Request( nChannel, rItem, aResult );
if( nDdeErr )
@@ -3695,7 +3695,7 @@ RTLFUNC(DDEExecute)
}
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
const String& rCommand = rPar.Get(2)->GetString();
- SbiDdeControl* pDDE = pINST->GetDdeControl();
+ SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
SbError nDdeErr = pDDE->Execute( nChannel, rCommand );
if( nDdeErr )
StarBASIC::Error( nDdeErr );
@@ -3723,7 +3723,7 @@ RTLFUNC(DDEPoke)
sal_Int16 nChannel = rPar.Get(1)->GetInteger();
const String& rItem = rPar.Get(2)->GetString();
const String& rData = rPar.Get(3)->GetString();
- SbiDdeControl* pDDE = pINST->GetDdeControl();
+ SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
SbError nDdeErr = pDDE->Poke( nChannel, rItem, rData );
if( nDdeErr )
StarBASIC::Error( nDdeErr );
@@ -3740,7 +3740,7 @@ RTLFUNC(FreeFile)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
return;
}
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
short nChannel = 1;
while( nChannel < CHANNELS )
{
@@ -3824,7 +3824,7 @@ RTLFUNC(RGB)
sal_uIntPtr nBlue = rPar.Get(3)->GetInteger() & 0xFF;
sal_uIntPtr nRGB;
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
bool bCompatibility = ( pInst && pInst->IsCompatibility() );
if( bCompatibility )
{
@@ -4282,7 +4282,7 @@ RTLFUNC(Reset)
(void)bWrite;
(void)rPar;
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
if (pIO)
pIO->CloseAll();
}
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 0c863ef0e0c5..af2cfbc24f7b 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -186,7 +186,7 @@ RTLFUNC(CallByName)
else
{
SbxVariableRef rFindVar = pFindVar;
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
SbiRuntime* pRT = pInst ? pInst->pRun : NULL;
if( pRT != NULL )
pRT->StepSET_Impl( pValVar, rFindVar, false );
@@ -740,14 +740,14 @@ RTLFUNC(FreeLibrary)
if ( rPar.Count() != 2 )
StarBASIC::Error( SbERR_BAD_ARGUMENT );
- pINST->GetDllMgr()->FreeDll( rPar.Get(1)->GetString() );
+ GetSbData()->pInst->GetDllMgr()->FreeDll( rPar.Get(1)->GetString() );
}
bool IsBaseIndexOne()
{
bool result = false;
- if ( pINST && pINST->pRun )
+ if ( GetSbData()->pInst && GetSbData()->pInst->pRun )
{
- sal_uInt16 res = pINST->pRun->GetBase();
+ sal_uInt16 res = GetSbData()->pInst->pRun->GetBase();
if ( res )
result = true;
}
@@ -1168,7 +1168,7 @@ void PutGet( SbxArray& rPar, sal_Bool bPut )
return;
}
nRecordNo--;
- SbiIoSystem* pIO = pINST->GetIoSystem();
+ SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nFileNo );
if ( !pSbStrm || !(pSbStrm->GetMode() & (SBSTRM_BINARY | SBSTRM_RANDOM)) )
@@ -1324,8 +1324,8 @@ RTLFUNC(EnableReschedule)
rPar.Get(0)->PutEmpty();
if ( rPar.Count() != 2 )
StarBASIC::Error( SbERR_BAD_ARGUMENT );
- if( pINST )
- pINST->EnableReschedule( rPar.Get(1)->GetBool() );
+ if( GetSbData()->pInst )
+ GetSbData()->pInst->EnableReschedule( rPar.Get(1)->GetBool() );
}
RTLFUNC(GetSystemTicks)
@@ -2481,8 +2481,8 @@ RTLFUNC(FormatDateTime)
case 1:
{
SvNumberFormatter* pFormatter = NULL;
- if( pINST )
- pFormatter = pINST->GetNumberFormatter();
+ if( GetSbData()->pInst )
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
else
{
sal_uInt32 n; // Dummy
@@ -2494,7 +2494,7 @@ RTLFUNC(FormatDateTime)
Color* pCol;
pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol );
- if( !pINST )
+ if( !GetSbData()->pInst )
delete pFormatter;
break;
@@ -3175,7 +3175,7 @@ RTLFUNC(CompatibilityMode)
if ( nCount != 1 && nCount != 2 )
StarBASIC::Error( SbERR_BAD_ARGUMENT );
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
if( pInst )
{
if ( nCount == 2 )
@@ -3201,7 +3201,7 @@ RTLFUNC(Input)
sal_uInt16 nByteCount = rPar.Get(1)->GetUShort();
sal_Int16 nFileNumber = rPar.Get(2)->GetInteger();
- SbiIoSystem* pIosys = pINST->GetIoSystem();
+ SbiIoSystem* pIosys = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIosys->GetStream( nFileNumber );
if ( !pSbStrm || !(pSbStrm->GetMode() & (SBSTRM_BINARY | SBSTRM_INPUT)) )
{
@@ -3227,7 +3227,7 @@ RTLFUNC(Me)
(void)pBasic;
(void)bWrite;
- SbModule* pActiveModule = pINST->GetActiveModule();
+ SbModule* pActiveModule = GetSbData()->pInst->GetActiveModule();
SbClassModuleObject* pClassModuleObject = PTR_CAST(SbClassModuleObject,pActiveModule);
SbxVariableRef refVar = rPar.Get(0);
if( pClassModuleObject == NULL )
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index fe2e76958256..c76776eb8d68 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -53,8 +53,8 @@ using namespace ::com::sun::star;
bool SbiRuntime::isVBAEnabled()
{
bool result = false;
- SbiInstance* pInst = pINST;
- if ( pInst && pINST->pRun )
+ SbiInstance* pInst = GetSbData()->pInst;
+ if ( pInst && GetSbData()->pInst->pRun )
result = pInst->pRun->bVBAEnabled;
return result;
}
@@ -519,7 +519,7 @@ SbMethod* SbiInstance::GetCaller( sal_uInt16 nLevel )
// Attention: pMeth can also be NULL (on a call of the init-code)
SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, sal_uInt32 nStart )
- : rBasic( *(StarBASIC*)pm->pParent ), pInst( pINST ),
+ : rBasic( *(StarBASIC*)pm->pParent ), pInst( GetSbData()->pInst ),
pMod( pm ), pMeth( pe ), pImg( pMod->pImage ), mpExtCaller(0), m_nLastTime(0)
{
nFlags = pe ? pe->GetDebugFlags() : 0;
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index e90237f3d4d6..f782a3940abd 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -787,7 +787,7 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t )
&& ( p->nHash == nHash_ )
&& ( rName.EqualsIgnoreCaseAscii( p->pName ) ) )
{
- SbiInstance* pInst = pINST;
+ SbiInstance* pInst = GetSbData()->pInst;
bFound = sal_True;
if( p->nArgs & _COMPTMASK )
{
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index 4467322d0827..7268d3d0e558 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -278,7 +278,7 @@ void SbiRuntime::StepLIKE()
aSearchOpt.searchString = pattern;
int bTextMode(1);
- bool bCompatibility = ( pINST && pINST->IsCompatibility() );
+ bool bCompatibility = ( GetSbData()->pInst && GetSbData()->pInst->IsCompatibility() );
if( bCompatibility )
bTextMode = GetImageFlag( SBIMG_COMPARETEXT );
diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx
index e93483bc9daa..b007c897c86f 100644
--- a/basic/source/runtime/step1.cxx
+++ b/basic/source/runtime/step1.cxx
@@ -445,7 +445,7 @@ bool SbiRuntime::implIsClass( SbxObject* pObj, const ::rtl::OUString& aClass )
if( !bRet )
{
String aObjClass = pObj->GetClassName();
- SbModule* pClassMod = pCLASSFAC->FindClass( aObjClass );
+ SbModule* pClassMod = GetSbData()->pClassFac->FindClass( aObjClass );
SbClassData* pClassData;
if( pClassMod && (pClassData=pClassMod->pClassData) != NULL )
{
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index cd982afc68a0..05d1d22d00a7 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -113,7 +113,7 @@ SbxVariable* SbiRuntime::FindElement
{
if( pElem->IsSet( SBX_PRIVATE ) )
{
- SbiInstance* pInst_ = pINST;
+ SbiInstance* pInst_ = GetSbData()->pInst;
if( pInst_ && pInst_->IsCompatibility() && pObj != pElem->GetParent() )
pElem = NULL; // Found but in wrong module!