diff options
Diffstat (limited to 'basic/source/runtime/step1.cxx')
-rw-r--r-- | basic/source/runtime/step1.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index e23ef864218e..0a9572906cc8 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -43,14 +43,14 @@ bool checkUnoObjectType( SbUnoObject* refVal, // Laden einer numerischen Konstanten (+ID) -void SbiRuntime::StepLOADNC( UINT32 nOp1 ) +void SbiRuntime::StepLOADNC( sal_uInt32 nOp1 ) { SbxVariable* p = new SbxVariable( SbxDOUBLE ); // #57844 Lokalisierte Funktion benutzen String aStr = pImg->GetString( static_cast<short>( nOp1 ) ); // Auch , zulassen !!! - USHORT iComma = aStr.Search( ',' ); + sal_uInt16 iComma = aStr.Search( ',' ); if( iComma != STRING_NOTFOUND ) { String aStr1 = aStr.Copy( 0, iComma ); @@ -67,7 +67,7 @@ void SbiRuntime::StepLOADNC( UINT32 nOp1 ) // Laden einer Stringkonstanten (+ID) -void SbiRuntime::StepLOADSC( UINT32 nOp1 ) +void SbiRuntime::StepLOADSC( sal_uInt32 nOp1 ) { SbxVariable* p = new SbxVariable; p->PutString( pImg->GetString( static_cast<short>( nOp1 ) ) ); @@ -76,16 +76,16 @@ void SbiRuntime::StepLOADSC( UINT32 nOp1 ) // Immediate Load (+Wert) -void SbiRuntime::StepLOADI( UINT32 nOp1 ) +void SbiRuntime::StepLOADI( sal_uInt32 nOp1 ) { SbxVariable* p = new SbxVariable; - p->PutInteger( static_cast<INT16>( nOp1 ) ); + p->PutInteger( static_cast<sal_Int16>( nOp1 ) ); PushVar( p ); } // Speichern eines named Arguments in Argv (+Arg-Nr ab 1!) -void SbiRuntime::StepARGN( UINT32 nOp1 ) +void SbiRuntime::StepARGN( sal_uInt32 nOp1 ) { if( !refArgv ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); @@ -100,13 +100,13 @@ void SbiRuntime::StepARGN( UINT32 nOp1 ) // Konvertierung des Typs eines Arguments in Argv fuer DECLARE-Fkt. (+Typ) -void SbiRuntime::StepARGTYP( UINT32 nOp1 ) +void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 ) { if( !refArgv ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); else { - BOOL bByVal = (nOp1 & 0x8000) != 0; // Ist BYVAL verlangt? + sal_Bool bByVal = (nOp1 & 0x8000) != 0; // Ist BYVAL verlangt? SbxDataType t = (SbxDataType) (nOp1 & 0x7FFF); SbxVariable* pVar = refArgv->Get( refArgv->Count() - 1 ); // letztes Arg @@ -145,7 +145,7 @@ void SbiRuntime::StepARGTYP( UINT32 nOp1 ) // String auf feste Laenge bringen (+Laenge) -void SbiRuntime::StepPAD( UINT32 nOp1 ) +void SbiRuntime::StepPAD( sal_uInt32 nOp1 ) { SbxVariable* p = GetTOS(); String& s = (String&)(const String&) *p; @@ -157,20 +157,20 @@ void SbiRuntime::StepPAD( UINT32 nOp1 ) // Sprung (+Target) -void SbiRuntime::StepJUMP( UINT32 nOp1 ) +void SbiRuntime::StepJUMP( sal_uInt32 nOp1 ) { #ifdef DBG_UTIL // #QUESTION shouln't this be - // if( (BYTE*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() ) + // if( (sal_uInt8*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() ) if( nOp1 >= pImg->GetCodeSize() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); #endif - pCode = (const BYTE*) pImg->GetCode() + nOp1; + pCode = (const sal_uInt8*) pImg->GetCode() + nOp1; } // TOS auswerten, bedingter Sprung (+Target) -void SbiRuntime::StepJUMPT( UINT32 nOp1 ) +void SbiRuntime::StepJUMPT( sal_uInt32 nOp1 ) { SbxVariableRef p = PopVar(); if( p->GetBool() ) @@ -179,7 +179,7 @@ void SbiRuntime::StepJUMPT( UINT32 nOp1 ) // TOS auswerten, bedingter Sprung (+Target) -void SbiRuntime::StepJUMPF( UINT32 nOp1 ) +void SbiRuntime::StepJUMPF( sal_uInt32 nOp1 ) { SbxVariableRef p = PopVar(); if( !p->GetBool() ) @@ -194,36 +194,36 @@ void SbiRuntime::StepJUMPF( UINT32 nOp1 ) // ... //Falls im Operanden 0x8000 gesetzt ist, Returnadresse pushen (ON..GOSUB) -void SbiRuntime::StepONJUMP( UINT32 nOp1 ) +void SbiRuntime::StepONJUMP( sal_uInt32 nOp1 ) { SbxVariableRef p = PopVar(); - INT16 n = p->GetInteger(); + sal_Int16 n = p->GetInteger(); if( nOp1 & 0x8000 ) { nOp1 &= 0x7FFF; //PushGosub( pCode + 3 * nOp1 ); PushGosub( pCode + 5 * nOp1 ); } - if( n < 1 || static_cast<UINT32>(n) > nOp1 ) - n = static_cast<INT16>( nOp1 + 1 ); - //nOp1 = (UINT32) ( (const char*) pCode - pImg->GetCode() ) + 3 * --n; - nOp1 = (UINT32) ( (const char*) pCode - pImg->GetCode() ) + 5 * --n; + if( n < 1 || static_cast<sal_uInt32>(n) > nOp1 ) + n = static_cast<sal_Int16>( nOp1 + 1 ); + //nOp1 = (sal_uInt32) ( (const char*) pCode - pImg->GetCode() ) + 3 * --n; + nOp1 = (sal_uInt32) ( (const char*) pCode - pImg->GetCode() ) + 5 * --n; StepJUMP( nOp1 ); } // UP-Aufruf (+Target) -void SbiRuntime::StepGOSUB( UINT32 nOp1 ) +void SbiRuntime::StepGOSUB( sal_uInt32 nOp1 ) { PushGosub( pCode ); if( nOp1 >= pImg->GetCodeSize() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); - pCode = (const BYTE*) pImg->GetCode() + nOp1; + pCode = (const sal_uInt8*) pImg->GetCode() + nOp1; } // UP-Return (+0 oder Target) -void SbiRuntime::StepRETURN( UINT32 nOp1 ) +void SbiRuntime::StepRETURN( sal_uInt32 nOp1 ) { PopGosub(); if( nOp1 ) @@ -232,7 +232,7 @@ void SbiRuntime::StepRETURN( UINT32 nOp1 ) // FOR-Variable testen (+Endlabel) -void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) +void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 ) { if( !pForStk ) { @@ -295,7 +295,7 @@ void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) { BasicCollection* pCollection = (BasicCollection*)(SbxVariable*)pForStk->refEnd; SbxArrayRef xItemArray = pCollection->xItemArray; - INT32 nCount = xItemArray->Count32(); + sal_Int32 nCount = xItemArray->Count32(); if( pForStk->nCurCollectionIndex < nCount ) { SbxVariable* pRes = xItemArray->Get32( pForStk->nCurCollectionIndex ); @@ -334,7 +334,7 @@ void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) // Tos+1 <= Tos+2 <= Tos, 2xremove (+Target) -void SbiRuntime::StepCASETO( UINT32 nOp1 ) +void SbiRuntime::StepCASETO( sal_uInt32 nOp1 ) { if( !refCaseStk || !refCaseStk->Count() ) StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); @@ -350,9 +350,9 @@ void SbiRuntime::StepCASETO( UINT32 nOp1 ) // Fehler-Handler -void SbiRuntime::StepERRHDL( UINT32 nOp1 ) +void SbiRuntime::StepERRHDL( sal_uInt32 nOp1 ) { - const BYTE* p = pCode; + const sal_uInt8* p = pCode; StepJUMP( nOp1 ); pError = pCode; pCode = p; @@ -365,7 +365,7 @@ void SbiRuntime::StepERRHDL( UINT32 nOp1 ) // Resume nach Fehlern (+0=statement, 1=next or Label) -void SbiRuntime::StepRESUME( UINT32 nOp1 ) +void SbiRuntime::StepRESUME( sal_uInt32 nOp1 ) { // AB #32714 Resume ohne Error? -> Fehler if( !bInError ) @@ -376,8 +376,8 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) if( nOp1 ) { // Code-Zeiger auf naechstes Statement setzen - USHORT n1, n2; - pCode = pMod->FindNextStmnt( pErrCode, n1, n2, TRUE, pImg ); + sal_uInt16 n1, n2; + pCode = pMod->FindNextStmnt( pErrCode, n1, n2, sal_True, pImg ); } else pCode = pErrStmnt; @@ -390,7 +390,7 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) pInst->nErr = 0; pInst->nErl = 0; nError = 0; - bInError = FALSE; + bInError = sal_False; // Error-Stack loeschen SbErrorStack*& rErrStack = GetSbData()->pErrStack; @@ -399,7 +399,7 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) } // Kanal schliessen (+Kanal, 0=Alle) -void SbiRuntime::StepCLOSE( UINT32 nOp1 ) +void SbiRuntime::StepCLOSE( sal_uInt32 nOp1 ) { SbError err; if( !nOp1 ) @@ -418,7 +418,7 @@ void SbiRuntime::StepCLOSE( UINT32 nOp1 ) // Zeichen ausgeben (+char) -void SbiRuntime::StepPRCHAR( UINT32 nOp1 ) +void SbiRuntime::StepPRCHAR( sal_uInt32 nOp1 ) { ByteString s( (char) nOp1 ); pIosys->Write( s ); @@ -509,7 +509,7 @@ bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal, return bOk; } -void SbiRuntime::StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt ) +void SbiRuntime::StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt ) { SbxVariableRef refVal = PopVar(); SbxVariableRef refVar = PopVar(); @@ -520,17 +520,17 @@ void SbiRuntime::StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt ) StepSET_Impl( refVal, refVar, bHandleDflt ); // don't do handle dflt prop for a "proper" set } -void SbiRuntime::StepVBASETCLASS( UINT32 nOp1 ) +void SbiRuntime::StepVBASETCLASS( sal_uInt32 nOp1 ) { StepSETCLASS_impl( nOp1, false ); } -void SbiRuntime::StepSETCLASS( UINT32 nOp1 ) +void SbiRuntime::StepSETCLASS( sal_uInt32 nOp1 ) { StepSETCLASS_impl( nOp1, true ); } -void SbiRuntime::StepTESTCLASS( UINT32 nOp1 ) +void SbiRuntime::StepTESTCLASS( sal_uInt32 nOp1 ) { SbxVariableRef xObjVal = PopVar(); String aClass( pImg->GetString( static_cast<short>( nOp1 ) ) ); @@ -544,7 +544,7 @@ void SbiRuntime::StepTESTCLASS( UINT32 nOp1 ) // Library fuer anschliessenden Declare-Call definieren -void SbiRuntime::StepLIB( UINT32 nOp1 ) +void SbiRuntime::StepLIB( sal_uInt32 nOp1 ) { aLibName = pImg->GetString( static_cast<short>( nOp1 ) ); } @@ -553,14 +553,14 @@ void SbiRuntime::StepLIB( UINT32 nOp1 ) // Dieser Opcode wird vor DIM/REDIM-Anweisungen gepusht, // wenn nur ein Index angegeben wurde. -void SbiRuntime::StepBASED( UINT32 nOp1 ) +void SbiRuntime::StepBASED( sal_uInt32 nOp1 ) { SbxVariable* p1 = new SbxVariable; SbxVariableRef x2 = PopVar(); // #109275 Check compatiblity mode bool bCompatible = ((nOp1 & 0x8000) != 0); - USHORT uBase = static_cast<USHORT>(nOp1 & 1); // Can only be 0 or 1 + sal_uInt16 uBase = static_cast<sal_uInt16>(nOp1 & 1); // Can only be 0 or 1 p1->PutInteger( uBase ); if( !bCompatible ) x2->Compute( SbxPLUS, *p1 ); |