diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-13 13:50:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-23 13:08:48 +0200 |
commit | 12ba9e3cad05a665aee2150ef831f0dbc92d7e2d (patch) | |
tree | dc50f9ee75617fa1e33a2503278501511c97afff /sc | |
parent | 6d5ae48427d1c59e65f0bfc16cf075eaa4cdca17 (diff) |
loplugin:staticmethods
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen8.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/arealink.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/servuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 4 |
7 files changed, 8 insertions, 10 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 3c82d65eccd7..4098c7e0d2ff 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -835,7 +835,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin) // Update failed. Notify the user. OUString aFile; - pMgr->GetDisplayNames(pRefLink, NULL, &aFile, NULL, NULL); + sfx2::LinkManager::GetDisplayNames(pRefLink, NULL, &aFile, NULL, NULL); // Decode encoded URL for display friendliness. INetURLObject aUrl(aFile,INetURLObject::WAS_ENCODED); aFile = aUrl.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 66982c35f6d8..19d2cfc8c92e 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2930,14 +2930,12 @@ bool ScCompiler::IsMacro( const OUString& rName ) StarBASIC* pObj = 0; SfxObjectShell* pDocSh = pDoc->GetDocumentShell(); - SfxApplication* pSfxApp = SfxGetpApp(); - try { if( pDocSh )//XXX pObj = pDocSh->GetBasic(); else - pObj = pSfxApp->GetBasic(); + pObj = SfxApplication::GetBasic(); } catch (...) { diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index ee36eeb7d9fd..663eb89dfaf5 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -113,7 +113,7 @@ void ScAreaLink::Edit(vcl::Window* pParent, const Link& /* rEndEditHdl */ ) if (pLinkManager!=NULL) { OUString aFile, aArea, aFilter; - pLinkManager->GetDisplayNames(this, NULL, &aFile, &aArea, &aFilter); + sfx2::LinkManager::GetDisplayNames(this, NULL, &aFile, &aArea, &aFilter); // the file dialog returns the filter name with the application prefix // -> remove prefix diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 5aa46e5c6f78..e99e9e017e94 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1298,7 +1298,7 @@ void ScExternalRefLink::Closed() return SUCCESS; OUString aFile, aFilter; - mpDoc->GetLinkManager()->GetDisplayNames(this, NULL, &aFile, NULL, &aFilter); + sfx2::LinkManager::GetDisplayNames(this, NULL, &aFile, NULL, &aFilter); ScExternalRefManager* pMgr = mpDoc->GetExternalRefManager(); if (!pMgr->isFileLoadable(aFile)) diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 3a7cc5951aff..65df85b18ff9 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -127,7 +127,7 @@ void ScTableLink::Edit( vcl::Window* pParent, const Link& rEndEditHdl ) if (pLinkManager!=NULL) { OUString aFile, aFilter; - pLinkManager->GetDisplayNames(this, 0, &aFile, NULL, &aFilter); + sfx2::LinkManager::GetDisplayNames(this, 0, &aFile, NULL, &aFilter); // the file dialog returns the filter name with the application prefix // -> remove prefix diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 017e760fd944..4d2581f8d7c3 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -614,7 +614,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( aArgs[ 0 ] <<= pDocShell->GetModel(); xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( OUString( "ooo.vba.excel.Globals" ), aArgs ); pDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", uno::Any( xRet ) ); - BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager(); + BasicManager* pAppMgr = SfxApplication::GetBasicManager(); if ( pAppMgr ) pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] ); diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 46f9ecb94aa6..d496dce067b2 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -458,7 +458,7 @@ ScVbaApplication::Windows( const uno::Any& aIndex ) throw (uno::RuntimeExceptio void SAL_CALL ScVbaApplication::wait( double time ) throw (uno::RuntimeException, std::exception) { - StarBASIC* pBasic = SfxGetpApp()->GetBasic(); + StarBASIC* pBasic = SfxApplication::GetBasic(); SbxArrayRef aArgs = new SbxArray; SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); @@ -1261,7 +1261,7 @@ ScVbaApplication::setDisplayFormulaBar( sal_Bool _displayformulabar ) uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException, std::exception ) { - StarBASIC* pBasic = SfxGetpApp()->GetBasic(); + StarBASIC* pBasic = SfxApplication::GetBasic(); SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( OUString("FuncCaller"), SbxCLASS_METHOD )); uno::Any aRet; if ( pMeth ) |