From f8ef1fe95be4e12278297e3c3eb4f9f2bdd89c0f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 13 Jun 2014 17:48:53 +0200 Subject: loplugin:staticcall Change-Id: I6cd46964c523c9393e9d249fdb43aaa38679fa06 --- basic/source/classes/sbxmod.cxx | 2 +- basic/source/comp/exprtree.cxx | 12 ++++++------ basic/source/runtime/inputbox.cxx | 2 +- basic/source/runtime/iosys.cxx | 2 +- basic/source/runtime/methods.cxx | 12 ++++++------ basic/source/runtime/methods1.cxx | 2 +- basic/source/runtime/runtime.cxx | 14 +++++++------- basic/source/runtime/stdobj1.cxx | 8 ++++---- basic/source/sbx/sbxdate.cxx | 4 ++-- basic/source/sbx/sbxscan.cxx | 4 ++-- 10 files changed, 31 insertions(+), 31 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 1fb6195cdc1f..e18156db6828 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1209,7 +1209,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth ) { // Compare here with 1 instead of 0, because before nCallLvl-- while( GetSbData()->pInst->nCallLvl != 1 ) - GetpApp()->Yield(); + Application::Yield(); } nRes = sal_True; diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 8b7f8fd6386b..d004b0974010 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -215,7 +215,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) return new SbiExprNode( pParser, aSym ); } // no keywords allowed from here on! - if( pParser->IsKwd( eTok ) ) + if( SbiTokenizer::IsKwd( eTok ) ) { if( pParser->IsCompatible() && eTok == INPUT ) { @@ -406,7 +406,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj ) { pParser->Next(); SbiToken eTok = pParser->Next(); - if( eTok != SYMBOL && !pParser->IsKwd( eTok ) && !pParser->IsExtra( eTok ) ) + if( eTok != SYMBOL && !SbiTokenizer::IsKwd( eTok ) && !SbiTokenizer::IsExtra( eTok ) ) { // #66745 Some operators can also be allowed // as identifiers, important for StarOne @@ -573,7 +573,7 @@ SbiExprNode* SbiExpression::Operand( bool bUsedForTypeOf ) break; default: // keywords here are OK at the moment! - if( pParser->IsKwd( eTok ) ) + if( SbiTokenizer::IsKwd( eTok ) ) { pRes = Term(); } @@ -1018,7 +1018,7 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa } - if( ( bBracket && eTok == RPAREN ) || pParser->IsEoln( eTok ) ) + if( ( bBracket && eTok == RPAREN ) || SbiTokenizer::IsEoln( eTok ) ) { if( eTok == RPAREN ) { @@ -1120,7 +1120,7 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa eTok = pParser->Peek(); if( eTok != COMMA ) { - if( ( bBracket && eTok == RPAREN ) || pParser->IsEoln( eTok ) ) + if( ( bBracket && eTok == RPAREN ) || SbiTokenizer::IsEoln( eTok ) ) { break; } @@ -1131,7 +1131,7 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa { pParser->Next(); eTok = pParser->Peek(); - if( ( bBracket && eTok == RPAREN ) || pParser->IsEoln( eTok ) ) + if( ( bBracket && eTok == RPAREN ) || SbiTokenizer::IsEoln( eTok ) ) { break; } diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index bec0dfbfa666..a939b2cb07d7 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -172,7 +172,7 @@ RTLFUNC(InputBox) nX = rPar.Get(4)->GetLong(); nY = rPar.Get(5)->GetLong(); } - boost::scoped_ptr pDlg(new SvRTLInputBox(GetpApp()->GetDefDialogParent(), + boost::scoped_ptr pDlg(new SvRTLInputBox(Application::GetDefDialogParent(), rPrompt,aTitle,aDefault,nX,nY)); pDlg->Execute(); rPar.Get(0)->PutString( pDlg->GetText() ); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 6d7836f97b35..865f01908761 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -997,7 +997,7 @@ void SbiIoSystem::WriteCon(const OUString& rText) } { SolarMutexGuard aSolarGuard; - if( !MessBox( GetpApp()->GetDefDialogParent(), + if( !MessBox( Application::GetDefDialogParent(), WinBits( WB_OK_CANCEL | WB_DEF_OK ), OUString(), s ).Execute() ) { diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 02d51db51f92..77d0828545a2 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -235,8 +235,8 @@ RTLFUNC(Error) } else { - pBasic->MakeErrorText( nErr, aErrorMsg ); - tmpErrMsg = pBasic->GetErrorText(); + StarBASIC::MakeErrorText( nErr, aErrorMsg ); + tmpErrMsg = StarBASIC::GetErrorText(); } // If this rtlfunc 'Error' passed a errcode the same as the active Err Objects's // current err then return the description for the error message if it is set @@ -1665,7 +1665,7 @@ RTLFUNC(StrComp) i18n::TransliterationModules_IGNORE_WIDTH ); } - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); pTransliterationWrapper->loadModuleIfNeeded( eLangType ); nRetValue = pTransliterationWrapper->compareString( rStr1, rStr2 ); } @@ -2145,7 +2145,7 @@ RTLFUNC(DateValue) // by using SbiInstance::GetNumberFormatter. // It seems that both locale number formatter and English number formatter // are supported in Visual Basic. - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) ) { // Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value; @@ -4597,7 +4597,7 @@ RTLFUNC(MsgBox) } else { - aTitle = GetpApp()->GetAppName(); + aTitle = Application::GetAppName(); } nType &= (16+32+64); @@ -4605,7 +4605,7 @@ RTLFUNC(MsgBox) SolarMutexGuard aSolarGuard; - Window* pParent = GetpApp()->GetDefDialogParent(); + Window* pParent = Application::GetDefDialogParent(); switch( nType ) { case 16: diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index d9b2a298b60a..d45e534439c2 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2539,7 +2539,7 @@ RTLFUNC(FormatDateTime) SbiInstance::PrepareNumberFormatter( pFormatter, n, n, n ); } - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); sal_uIntPtr nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType ); Color* pCol; pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol ); diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 63debf2a043f..138a796d035b 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -367,7 +367,7 @@ SbiDllMgr* SbiInstance::GetDllMgr() // #39629 create NumberFormatter with the help of a static method now SvNumberFormatter* SbiInstance::GetNumberFormatter() { - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); SvtSysLocale aSysLocale; DateFormat eDate = aSysLocale.GetLocaleData().getDateFormat(); if( pNumberFormatter ) @@ -401,7 +401,7 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter, } else { - eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); } DateFormat eDate; if( peFormatterDateFormat ) @@ -524,14 +524,14 @@ void SbiInstance::Abort() { StarBASIC* pErrBasic = GetCurrentBasic( pBasic ); pErrBasic->RTError( nErr, aErrorMsg, pRun->nLine, pRun->nCol1, pRun->nCol2 ); - pBasic->Stop(); + StarBASIC::Stop(); } // can be unequal to pRTBasic StarBASIC* GetCurrentBasic( StarBASIC* pRTBasic ) { StarBASIC* pCurBasic = pRTBasic; - SbModule* pActiveModule = pRTBasic->GetActiveModule(); + SbModule* pActiveModule = StarBASIC::GetActiveModule(); if( pActiveModule ) { SbxObject* pParent = pActiveModule->GetParent(); @@ -1669,16 +1669,16 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe if ( aAny.getValueType().getTypeClass() == TypeClass_STRUCT ) { refVar->SetType( SbxOBJECT ); - SbxError eOldErr = refVar->GetError(); + SbxError eOldErr = SbxBase::GetError(); // There are some circumstances when calling GetObject // will trigger an error, we need to squash those here. // Alternatively it is possible that the same scenario // could overwrite and existing error. Lets prevent that SbxObjectRef xVarObj = (SbxObject*)refVar->GetObject(); if ( eOldErr != SbxERR_OK ) - refVar->SetError( eOldErr ); + SbxBase::SetError( eOldErr ); else - refVar->ResetError(); + SbxBase::ResetError(); SbUnoStructRefObject* pUnoStructObj = PTR_CAST(SbUnoStructRefObject,(SbxObject*)xVarObj); diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 69693a4795cb..24b04742d10c 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -88,8 +88,8 @@ void SbStdPicture::PropWidth( SbxVariable* pVar, SbxArray*, bool bWrite ) } Size aSize = aGraphic.GetPrefSize(); - aSize = GetpApp()->GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); - aSize = GetpApp()->GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); + aSize = Application::GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); + aSize = Application::GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); pVar->PutInteger( (sal_Int16)aSize.Width() ); } @@ -103,8 +103,8 @@ void SbStdPicture::PropHeight( SbxVariable* pVar, SbxArray*, bool bWrite ) } Size aSize = aGraphic.GetPrefSize(); - aSize = GetpApp()->GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); - aSize = GetpApp()->GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); + aSize = Application::GetAppWindow()->LogicToPixel( aSize, aGraphic.GetPrefMapMode() ); + aSize = Application::GetAppWindow()->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); pVar->PutInteger( (sal_Int16)aSize.Height() ); } diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index ec2da435ac9d..5f0bcca909fc 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -98,7 +98,7 @@ double ImpGetDate( const SbxValues* p ) } else { - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); boost::scoped_ptr pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType )); @@ -267,7 +267,7 @@ start: } Color* pColor; - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); boost::scoped_ptr pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType )); sal_uInt32 nIndex; diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 4d5bfdb5ce61..b31f0a56a2b9 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -664,7 +664,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const return; } - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); SvNumberFormatter aFormatter( comphelper::getProcessComponentContext(), eLangType ); sal_uInt32 nIndex = 0; @@ -789,7 +789,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const { SbxAppData& rAppData = GetSbxData_Impl(); - LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); + LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); if( rAppData.pBasicFormater ) { if( rAppData.eBasicFormaterLangType != eLangType ) -- cgit