summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-13 17:48:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-13 17:54:23 +0200
commitf8ef1fe95be4e12278297e3c3eb4f9f2bdd89c0f (patch)
tree621de9d17ea9360983ae066b8936c9b256a749ed /basic
parent0e44fb66e59fffe7ba1187a825f9c2d3562459dd (diff)
loplugin:staticcall
Change-Id: I6cd46964c523c9393e9d249fdb43aaa38679fa06
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--basic/source/comp/exprtree.cxx12
-rw-r--r--basic/source/runtime/inputbox.cxx2
-rw-r--r--basic/source/runtime/iosys.cxx2
-rw-r--r--basic/source/runtime/methods.cxx12
-rw-r--r--basic/source/runtime/methods1.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx14
-rw-r--r--basic/source/runtime/stdobj1.cxx8
-rw-r--r--basic/source/sbx/sbxdate.cxx4
-rw-r--r--basic/source/sbx/sbxscan.cxx4
10 files changed, 31 insertions, 31 deletions
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<SvRTLInputBox> pDlg(new SvRTLInputBox(GetpApp()->GetDefDialogParent(),
+ boost::scoped_ptr<SvRTLInputBox> 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<SvNumberFormatter> 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<SvNumberFormatter> 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 )