diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2020-02-24 11:15:09 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-02-24 12:02:39 +0100 |
commit | efa9ea101f0324fb401b7879af9d1f41f4f7c49c (patch) | |
tree | b1a8abb68bb298f362b8062822183fe9435ba6f7 | |
parent | 8eea26e7c19a58be77343c30fdbcd780a13ac402 (diff) |
Renaming variables for upcoming commit for tdf#36737
... as discussed in https://gerrit.libreoffice.org/c/core/+/87550
Change-Id: I6262caf59751a2e0b6206f02aa1c7de55738a568
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89333
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | basic/source/runtime/runtime.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 46879bb6a65e..bf7501cd4ca9 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -4022,42 +4022,42 @@ void SbiRuntime::StepELEM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - sal_uInt16 i = static_cast<sal_uInt16>( nOp1 & 0x7FFF ); - SbxDataType t = static_cast<SbxDataType>(nOp2); - SbxVariable* p; + sal_uInt16 nIdx = static_cast<sal_uInt16>( nOp1 & 0x7FFF ); + SbxDataType eType = static_cast<SbxDataType>(nOp2); + SbxVariable* pVar; // #57915 solve missing in a cleaner way sal_uInt32 nParamCount = refParams->Count32(); - if( i >= nParamCount ) + if( nIdx >= nParamCount ) { - sal_uInt16 iLoop = i; + sal_uInt16 iLoop = nIdx; while( iLoop >= nParamCount ) { - p = new SbxVariable(); + pVar = new SbxVariable(); if( SbiRuntime::isVBAEnabled() && - (t == SbxOBJECT || t == SbxSTRING) ) + (eType == SbxOBJECT || eType == SbxSTRING) ) { - if( t == SbxOBJECT ) + if( eType == SbxOBJECT ) { - p->PutObject( nullptr ); + pVar->PutObject( nullptr ); } else { - p->PutString( OUString() ); + pVar->PutString( OUString() ); } } else { - p->PutErr( 448 ); // like in VB: Error-Code 448 (ERRCODE_BASIC_NAMED_NOT_FOUND) + pVar->PutErr( 448 ); // like in VB: Error-Code 448 (ERRCODE_BASIC_NAMED_NOT_FOUND) } - refParams->Put32( p, iLoop ); + refParams->Put32( pVar, iLoop ); iLoop--; } } - p = refParams->Get32( i ); + pVar = refParams->Get32( nIdx ); - if( p->GetType() == SbxERROR && i ) + if( pVar->GetType() == SbxERROR && nIdx ) { // if there's a parameter missing, it can be OPTIONAL bool bOpt = false; @@ -4066,7 +4066,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxInfo* pInfo = pMeth->GetInfo(); if ( pInfo ) { - const SbxParamInfo* pParam = pInfo->GetParam( i ); + const SbxParamInfo* pParam = pInfo->GetParam( nIdx ); if( pParam && ( pParam->nFlags & SbxFlagBits::Optional ) ) { // Default value? @@ -4074,9 +4074,9 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) if( nDefaultId > 0 ) { OUString aDefaultStr = pImg->GetString( nDefaultId ); - p = new SbxVariable(pParam-> eType); - p->PutString( aDefaultStr ); - refParams->Put32( p, i ); + pVar = new SbxVariable(pParam-> eType); + pVar->PutString( aDefaultStr ); + refParams->Put32( pVar, nIdx ); } bOpt = true; } @@ -4087,19 +4087,19 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) Error( ERRCODE_BASIC_NOT_OPTIONAL ); } } - else if( t != SbxVARIANT && static_cast<SbxDataType>(p->GetType() & 0x0FFF ) != t ) + else if( eType != SbxVARIANT && static_cast<SbxDataType>(pVar->GetType() & 0x0FFF ) != eType ) { - SbxVariable* q = new SbxVariable( t ); + SbxVariable* q = new SbxVariable( eType ); aRefSaved.emplace_back(q ); - *q = *p; - p = q; - if ( i ) + *q = *pVar; + pVar = q; + if ( nIdx ) { - refParams->Put32( p, i ); + refParams->Put32( pVar, nIdx ); } } - SetupArgs( p, nOp1 ); - PushVar( CheckArray( p ) ); + SetupArgs( pVar, nOp1 ); + PushVar( CheckArray( pVar ) ); } // Case-Test (+True-Target+Test-Opcode) |