diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-10 14:40:57 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-10 14:40:57 +0100 |
commit | 642cfe8ac206af4fe82bc695d38b5c7f0edf7dc7 (patch) | |
tree | b5b4029cf2c401a9907f3be73e88c1d0d617bd6d /basic/source/runtime/runtime.cxx | |
parent | f8431bc530cabfe39df3918b994269dded8d7f8c (diff) |
removetooltypes01: #i112600# adjust basic and scaddins
Diffstat (limited to 'basic/source/runtime/runtime.cxx')
-rw-r--r-- | basic/source/runtime/runtime.cxx | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 62aa639e4c7e..10d25cc2292b 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -59,13 +59,13 @@ bool SbiRuntime::isVBAEnabled() } // #91147 Global reschedule flag -static BOOL bStaticGlobalEnableReschedule = TRUE; +static sal_Bool bStaticGlobalEnableReschedule = sal_True; -void StarBASIC::StaticEnableReschedule( BOOL bReschedule ) +void StarBASIC::StaticEnableReschedule( sal_Bool bReschedule ) { bStaticGlobalEnableReschedule = bReschedule; } -void StarBASIC::SetVBAEnabled( BOOL bEnabled ) +void StarBASIC::SetVBAEnabled( sal_Bool bEnabled ) { if ( bDocBasic ) { @@ -73,15 +73,15 @@ void StarBASIC::SetVBAEnabled( BOOL bEnabled ) } } -BOOL StarBASIC::isVBAEnabled() +sal_Bool StarBASIC::isVBAEnabled() { if ( bDocBasic ) { if( SbiRuntime::isVBAEnabled() ) - return TRUE; + return sal_True; return bVBAEnabled; } - return FALSE; + return sal_False; } @@ -253,12 +253,12 @@ SbiRTLData::~SbiRTLData() // (siehe auch step2.cxx, SbiRuntime::StepSTMNT() ) // Hilfsfunktion, um den BreakCallLevel gemaess der der Debug-Flags zu ermitteln -void SbiInstance::CalcBreakCallLevel( USHORT nFlags ) +void SbiInstance::CalcBreakCallLevel( sal_uInt16 nFlags ) { // Break-Flag wegfiltern - nFlags &= ~((USHORT)SbDEBUG_BREAK); + nFlags &= ~((sal_uInt16)SbDEBUG_BREAK); - USHORT nRet; + sal_uInt16 nRet; switch( nFlags ) { case SbDEBUG_STEPINTO: @@ -291,8 +291,8 @@ SbiInstance::SbiInstance( StarBASIC* p ) nBreakCallLvl = 0; nErr = nErl = 0; - bReschedule = TRUE; - bCompatibility = FALSE; + bReschedule = sal_True; + bCompatibility = sal_False; } SbiInstance::~SbiInstance() @@ -450,7 +450,7 @@ void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const String& rMsg ) { if( !bWatchMode ) { - SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + SbError n = StarBASIC::GetSfxFromVBError( static_cast< sal_uInt16 >( nVBNumber ) ); if ( !n ) n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors @@ -464,7 +464,7 @@ void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const String& rMsg ) void SbiInstance::setErrorVB( sal_Int32 nVBNumber, const String& rMsg ) { - SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + SbError n = StarBASIC::GetSfxFromVBError( static_cast< sal_uInt16 >( nVBNumber ) ); if( !n ) n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors @@ -515,7 +515,7 @@ SbModule* SbiInstance::GetActiveModule() return NULL; } -SbMethod* SbiInstance::GetCaller( USHORT nLevel ) +SbMethod* SbiInstance::GetCaller( sal_uInt16 nLevel ) { SbiRuntime* p = pRun; while( nLevel-- && p ) @@ -543,7 +543,7 @@ SbxArray* SbiInstance::GetLocals( SbMethod* pMeth ) // Achtung: pMeth kann auch NULL sein (beim Aufruf des Init-Codes) -SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) +SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, sal_uInt32 nStart ) : rBasic( *(StarBASIC*)pm->pParent ), pInst( pINST ), pMod( pm ), pMeth( pe ), pImg( pMod->pImage ), m_nLastTime(0) { @@ -558,11 +558,11 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) pRestart = NULL; pNext = NULL; pCode = - pStmnt = (const BYTE* ) pImg->GetCode() + nStart; + pStmnt = (const sal_uInt8* ) pImg->GetCode() + nStart; bRun = - bError = TRUE; - bInError = FALSE; - bBlocked = FALSE; + bError = sal_True; + bInError = sal_False; + bBlocked = sal_False; nLine = 0; nCol1 = 0; nCol2 = 0; @@ -615,10 +615,10 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) refParams->Put( pMeth, 0 ); SbxInfo* pInfo = pMeth ? pMeth->GetInfo() : NULL; - USHORT nParamCount = pParams ? pParams->Count() : 1; + sal_uInt16 nParamCount = pParams ? pParams->Count() : 1; if( nParamCount > 1 ) { - for( USHORT i = 1 ; i < nParamCount ; i++ ) + for( sal_uInt16 i = 1 ; i < nParamCount ; i++ ) { const SbxParamInfo* p = pInfo ? pInfo->GetParam( i ) : NULL; @@ -626,9 +626,9 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) if( p && (p->nUserData & PARAM_INFO_PARAMARRAY) != 0 ) { SbxDimArray* pArray = new SbxDimArray( SbxVARIANT ); - USHORT nParamArrayParamCount = nParamCount - i; + sal_uInt16 nParamArrayParamCount = nParamCount - i; pArray->unoAddDim( 0, nParamArrayParamCount - 1 ); - for( USHORT j = i ; j < nParamCount ; j++ ) + for( sal_uInt16 j = i ; j < nParamCount ; j++ ) { SbxVariable* v = pParams->Get( j ); short nDimIndex = j - i; @@ -646,16 +646,16 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) SbxVariable* v = pParams->Get( i ); // Methoden sind immer byval! - BOOL bByVal = v->IsA( TYPE(SbxMethod) ); + sal_Bool bByVal = v->IsA( TYPE(SbxMethod) ); SbxDataType t = v->GetType(); if( p ) { - bByVal |= BOOL( ( p->eType & SbxBYREF ) == 0 ); + bByVal |= sal_Bool( ( p->eType & SbxBYREF ) == 0 ); t = (SbxDataType) ( p->eType & 0x0FFF ); if( !bByVal && t != SbxVARIANT && (!v->IsFixed() || (SbxDataType)(v->GetType() & 0x0FFF ) != t) ) - bByVal = TRUE; + bByVal = sal_True; } if( bByVal ) { @@ -701,7 +701,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) // Einen P-Code ausfuehren -BOOL SbiRuntime::Step() +sal_Bool SbiRuntime::Step() { if( bRun ) { @@ -724,12 +724,12 @@ BOOL SbiRuntime::Step() } #ifdef DBG_TRACE_BASIC - UINT32 nPC = ( pCode - (const BYTE* )pImg->GetCode() ); + sal_uInt32 nPC = ( pCode - (const sal_uInt8* )pImg->GetCode() ); dbg_traceStep( pMod, nPC, pINST->nCallLvl ); #endif SbiOpcode eOp = (SbiOpcode ) ( *pCode++ ); - UINT32 nOp1, nOp2; + sal_uInt32 nOp1, nOp2; if( eOp <= SbOP0_END ) { (this->*( aStep0[ eOp ] ) )(); @@ -784,7 +784,7 @@ BOOL SbiRuntime::Step() // Im Error Handler? Dann Std-Error if ( !bInError ) { - bInError = TRUE; + bInError = sal_True; if( !bError ) // On Error Resume Next StepRESUME( 1 ); @@ -809,7 +809,7 @@ BOOL SbiRuntime::Step() while( NULL != (pRt = pRt->pNext) ) { // Gibt es einen Error-Handler? - if( pRt->bError == FALSE || pRt->pError != NULL ) + if( pRt->bError == sal_False || pRt->pError != NULL ) { pRtErrHdl = pRt; break; @@ -832,7 +832,7 @@ BOOL SbiRuntime::Step() // Fehler setzen pRt->nError = err; if( pRt != pRtErrHdl ) - pRt->bRun = FALSE; + pRt->bRun = sal_False; // In Error-Stack eintragen SbErrorStackEntry *pEntry = new SbErrorStackEntry @@ -928,7 +928,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) { // TEST, has to be vb here always #ifdef DBG_UTIL - SbError nTmp = StarBASIC::GetSfxFromVBError( (USHORT)nError ); + SbError nTmp = StarBASIC::GetSfxFromVBError( (sal_uInt16)nError ); DBG_ASSERT( nTmp, "No VB error!" ); #endif @@ -938,7 +938,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) rMsg = String( RTL_CONSTASCII_USTRINGPARAM("Internal Object Error:") ); } // no num? most likely then it *is* really a vba err - USHORT nVBErrorCode = StarBASIC::GetVBErrorCode( nError ); + sal_uInt16 nVBErrorCode = StarBASIC::GetVBErrorCode( nError ); sal_Int32 nVBAErrorNumber = ( nVBErrorCode == 0 ) ? nError : nVBErrorCode; return nVBAErrorNumber; } @@ -999,7 +999,7 @@ SbxVariableRef SbiRuntime::PopVar() return xVar; } -BOOL SbiRuntime::ClearExprStack() +sal_Bool SbiRuntime::ClearExprStack() { // Achtung: Clear() reicht nicht, da Methods geloescht werden muessen while ( nExprLvl ) @@ -1007,7 +1007,7 @@ BOOL SbiRuntime::ClearExprStack() PopVar(); } refExprStk->Clear(); - return FALSE; + return sal_False; } // Variable auf dem Expression-Stack holen, ohne sie zu entfernen @@ -1023,7 +1023,7 @@ SbxVariable* SbiRuntime::GetTOS( short n ) return new SbxVariable; } #endif - return refExprStk->Get( (USHORT) n ); + return refExprStk->Get( (sal_uInt16) n ); } // Sicherstellen, dass TOS eine temporaere Variable ist @@ -1041,7 +1041,7 @@ void SbiRuntime::TOSMakeTemp() // Der GOSUB-Stack nimmt Returnadressen fuer GOSUBs auf -void SbiRuntime::PushGosub( const BYTE* pc ) +void SbiRuntime::PushGosub( const sal_uInt8* pc ) { if( ++nGosubLvl > MAXRECURSION ) StarBASIC::FatalError( SbERR_STACK_OVERFLOW ); @@ -1248,7 +1248,7 @@ void SbiRuntime::DllCall const String& aDLLName, // Name der DLL SbxArray* pArgs, // Parameter (ab Index 1, kann NULL sein) SbxDataType eResType, // Returnwert - BOOL bCDecl ) // TRUE: nach C-Konventionen + sal_Bool bCDecl ) // sal_True: nach C-Konventionen { // No DllCall for "virtual" portal users if( needSecurityRestrictions() ) @@ -1275,13 +1275,13 @@ void SbiRuntime::DllCall Error( nErr ); PushVar( pRes ); } -USHORT -SbiRuntime::GetImageFlag( USHORT n ) const + +sal_uInt16 SbiRuntime::GetImageFlag( sal_uInt16 n ) const { return pImg->GetFlag( n ); } -USHORT -SbiRuntime::GetBase() + +sal_uInt16 SbiRuntime::GetBase() { return pImg->GetBase(); } |