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 | |
parent | 6d5ae48427d1c59e65f0bfc16cf075eaa4cdca17 (diff) |
loplugin:staticmethods
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
71 files changed, 159 insertions, 159 deletions
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index f582e479e706..bfbe8fe04deb 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -419,7 +419,7 @@ namespace basctl return NULL; if ( isApplication() ) - return SfxGetpApp()->GetBasicManager(); + return SfxApplication::GetBasicManager(); return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument ); } @@ -1077,7 +1077,7 @@ namespace basctl ScriptDocument ScriptDocument::getDocumentForBasicManager( const BasicManager* _pManager ) { - if ( _pManager == SfxGetpApp()->GetBasicManager() ) + if ( _pManager == SfxApplication::GetBasicManager() ) return getApplicationScriptDocument(); docs::Documents aDocuments; @@ -1089,7 +1089,7 @@ namespace basctl ) { const BasicManager* pDocBasicManager = ::basic::BasicManagerRepository::getDocumentBasicManager( doc->xModel ); - if ( ( pDocBasicManager != SfxGetpApp()->GetBasicManager() ) + if ( ( pDocBasicManager != SfxApplication::GetBasicManager() ) && ( pDocBasicManager == _pManager ) ) { diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index 8d3602bf5766..e076e6a9f417 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -157,7 +157,8 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) || fqn == "OleEmbeddedObject::GetRidOfComponent" || fqn == "connectivity::mozab::ProfileAccess::isProfileLocked" || startsWith(fqn, "SbxDecimal::") - || fqn == "SbiDllMgr::Call" || fqn == "SbiDllMgr::FreeDll") { + || fqn == "SbiDllMgr::Call" || fqn == "SbiDllMgr::FreeDll" + || fqn == "SfxApplication::InitializeDde" || fqn == "SfxApplication::RemoveDdeTopic") { return true; } // used in a function-pointer-table @@ -179,7 +180,7 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) return true; } -loplugin::Plugin::Registration<StaticMethods> X("staticmethods", true); +loplugin::Plugin::Registration<StaticMethods> X("staticmethods", false); } diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index e27b6fb85512..505df5a9b4a4 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -225,7 +225,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) } OUString aFileName; - pLinkMgr->GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter ); + sfx2::LinkManager::GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter ); aFileName = INetURLObject::decode(aFileName, INetURLObject::DECODE_UNAMBIGUOUS); m_pFtFullFileName->SetText( aFileName ); m_pFtFullSourceName->SetText( sLink ); @@ -359,7 +359,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) OUString sFilter; SvTreeListEntry* pEntry = m_pTbLinks->FirstSelected(); SvBaseLink* pLink = static_cast<SvBaseLink*>(pEntry->GetUserData()); - pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( pLink, &sType, &sFile, 0, 0 ); INetURLObject aUrl(sFile); if(aUrl.GetProtocol() == INetProtocol::File) { @@ -384,7 +384,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) DBG_ASSERT(pLink,"Where is the link?"); if (!pLink) continue; - pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter ); + sfx2::LinkManager::GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter ); INetURLObject aUrl_(sFile); INetURLObject aUrl2(aPath, INetProtocol::File); aUrl2.insertName( aUrl_.getName() ); @@ -632,7 +632,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool { OUString aEntry, sFileNm, sLinkNm, sTypeNm, sFilter; - pLinkMgr->GetDisplayNames( &rLink, &sTypeNm, &sFileNm, &sLinkNm, &sFilter ); + sfx2::LinkManager::GetDisplayNames( &rLink, &sTypeNm, &sFileNm, &sLinkNm, &sFilter ); // GetTab(0) gives the position of the bitmap which is automatically inserted by the TabListBox. // So the first text column's width is Tab(2)-Tab(1). diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx index 1df38ee2a574..d39d52cae899 100644 --- a/extensions/source/plugin/inc/plugin/impl.hxx +++ b/extensions/source/plugin/inc/plugin/impl.hxx @@ -303,7 +303,7 @@ public: virtual Reference< com::sun::star::plugin::XPluginContext > SAL_CALL createPluginContext() throw(std::exception) SAL_OVERRIDE; // has to be implemented per system - Sequence< com::sun::star::plugin::PluginDescription > SAL_CALL impl_getPluginDescriptions() throw(css::uno::RuntimeException, std::exception); + static Sequence< com::sun::star::plugin::PluginDescription > SAL_CALL impl_getPluginDescriptions() throw(css::uno::RuntimeException, std::exception); // calls system specific impl_getPluginDescriptions // checks whether plugins are disabled virtual Sequence< com::sun::star::plugin::PluginDescription > SAL_CALL getPluginDescriptions() diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 3977dea8f0c4..b9d8d8607773 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -141,7 +141,7 @@ public: static SfxApplication* Get() { return pApp;} // Resource Manager - ResMgr* GetSfxResManager(); + static ResMgr* GetSfxResManager(); // DDE #if defined( WNT ) @@ -175,11 +175,11 @@ public: static void MacroOrganizer( sal_Int16 nTabId ); static ErrCode CallBasic( const OUString&, BasicManager*, SbxArray *pArgs, SbxValue *pRet ); static ErrCode CallAppBasic( const OUString& i_macroName, SbxArray* i_args = NULL, SbxValue* i_ret = NULL ) - { return CallBasic( i_macroName, SfxApplication::GetOrCreate()->GetBasicManager(), i_args, i_ret ); } - BasicManager* GetBasicManager(); + { return CallBasic( i_macroName, SfxApplication::GetBasicManager(), i_args, i_ret ); } + static BasicManager* GetBasicManager(); com::sun::star::script::XLibraryContainer * GetDialogContainer(); com::sun::star::script::XLibraryContainer * GetBasicContainer(); - StarBASIC* GetBasic(); + static StarBASIC* GetBasic(); sal_uInt16 SaveBasicAndDialogContainer() const; // misc. diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index 34688c14a8c5..6254094fc2a2 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -201,7 +201,7 @@ public: void SAL_CALL DirectoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); virtual void SAL_CALL ControlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); void SAL_CALL DialogSizeChanged(); - OUString SAL_CALL HelpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); + static OUString SAL_CALL HelpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); // XDialogClosedListener methods void SAL_CALL DialogClosed( const ::com::sun::star::ui::dialogs::DialogClosedEvent& _rEvent ); diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index bfe6512905b5..6d4bc03fd6ae 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -115,16 +115,16 @@ public: * @param rServer server document shell instance * @param rLink link object of the client document */ - void LinkServerShell(const OUString& rPath, SfxObjectShell& rServer, ::sfx2::SvBaseLink& rLink) const; + static void LinkServerShell(const OUString& rPath, SfxObjectShell& rServer, ::sfx2::SvBaseLink& rLink); // Obtain the string for the dialog - bool GetDisplayNames( const SvBaseLink *, + static bool GetDisplayNames( const SvBaseLink *, OUString* pType, OUString* pFile = NULL, OUString* pLink = NULL, - OUString* pFilter = NULL ) const; + OUString* pFilter = NULL ); - SvLinkSourceRef CreateObj( SvBaseLink* ); + static SvLinkSourceRef CreateObj( SvBaseLink* ); void UpdateAllLinks( bool bAskUpdate = true, bool bCallErrHdl = true, diff --git a/include/sfx2/mailmodelapi.hxx b/include/sfx2/mailmodelapi.hxx index 44b2ef9addd2..cf8183d14ecd 100644 --- a/include/sfx2/mailmodelapi.hxx +++ b/include/sfx2/mailmodelapi.hxx @@ -64,7 +64,7 @@ protected: SAVE_ERROR }; ::std::vector< OUString > maAttachedDocuments; - SaveResult SaveDocumentAsFormat( const OUString& aSaveFileName, + static SaveResult SaveDocumentAsFormat( const OUString& aSaveFileName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xFrameOrModel, const OUString& rType, OUString& rFileNamePath ); @@ -79,7 +79,7 @@ private: bool mbLoadDone; - SaveResult ShowFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMGR, + static SaveResult ShowFilterOptionsDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMGR, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel, const OUString& rFilterName, const OUString& rType, diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index eded8ba18751..e6f1f8e576ab 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -88,7 +88,7 @@ protected: virtual bool FillItemSet(SfxItemSet *) SAL_OVERRIDE; virtual void Reset(const SfxItemSet *) SAL_OVERRIDE; - bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr, + static bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr, sal_uInt16 nFamily, sal_uInt16 nMask = 0, const sal_uInt16* pModifier = NULL ); using TabPage::ActivatePage; diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index b2f88a89dc2d..2f16e6aa8a3d 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -164,7 +164,7 @@ protected: SAL_DLLPRIVATE void Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId ); SAL_DLLPRIVATE SfxShellObject* GetShellObj_Impl() const; SAL_DLLPRIVATE void SetShellObj_Impl( SfxShellObject* pObj ); - void HandleOpenXmlFilterSettings(SfxRequest &); + static void HandleOpenXmlFilterSettings(SfxRequest &); public: TYPEINFO_OVERRIDE(); @@ -445,7 +445,7 @@ public: void SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs); const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& GetVerbs() const; void VerbExec (SfxRequest&); - void VerbState (SfxItemSet&); + static void VerbState (SfxItemSet&); SAL_DLLPRIVATE const SfxSlot* GetVerbSlot_Impl(sal_uInt16 nId) const; void SetHelpId(sal_uIntPtr nId); diff --git a/include/sfx2/sidebar/CommandInfoProvider.hxx b/include/sfx2/sidebar/CommandInfoProvider.hxx index 55ce82b8a394..9161b126816a 100644 --- a/include/sfx2/sidebar/CommandInfoProvider.hxx +++ b/include/sfx2/sidebar/CommandInfoProvider.hxx @@ -82,7 +82,7 @@ public: css::uno::Sequence<css::beans::PropertyValue> GetCommandProperties ( const ::rtl::OUString& rsCommandName); ::rtl::OUString GetCommandLabel (const ::rtl::OUString& rsCommandName); - rtl::OUString RetrieveShortcutsFromConfiguration( + static rtl::OUString RetrieveShortcutsFromConfiguration( const css::uno::Reference<css::ui::XAcceleratorConfiguration>& rxConfiguration, const rtl::OUString& rsCommandName); }; diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx index faaa62360793..e6ee996f7a28 100644 --- a/include/sfx2/sidebar/Theme.hxx +++ b/include/sfx2/sidebar/Theme.hxx @@ -258,12 +258,12 @@ private: ChangeListenerContainer* GetChangeListeners ( const ThemeItem eItem, const bool bCreate); - bool DoVetoableListenersVeto ( + static bool DoVetoableListenersVeto ( const VetoableListenerContainer* pListeners, - const css::beans::PropertyChangeEvent& rEvent) const; - void BroadcastPropertyChange ( + const css::beans::PropertyChangeEvent& rEvent); + static void BroadcastPropertyChange ( const ChangeListenerContainer* pListeners, - const css::beans::PropertyChangeEvent& rEvent) const; + const css::beans::PropertyChangeEvent& rEvent); void ProcessNewValue ( const css::uno::Any& rValue, const ThemeItem eItem, diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index e6d538874fb8..b76a9d06980b 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -209,7 +209,7 @@ protected: // helper methods void createAndPositionSubToolBar( const OUString& rSubToolBarResName ); - ::Size getPersistentFloatingSize( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const OUString& rSubToolBarResName ); + static ::Size getPersistentFloatingSize( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, const OUString& rSubToolBarResName ); bool hasBigImages() const; public: diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx index 8b133f40a042..17ba13a0b432 100644 --- a/include/sfx2/templatedlg.hxx +++ b/include/sfx2/templatedlg.hxx @@ -83,7 +83,7 @@ private: void OnTemplateImport (); void OnTemplateSearch (); - void OnTemplateLink (); + static void OnTemplateLink (); void OnTemplateOpen (); void OnTemplateEdit (); void OnTemplateProperties (); diff --git a/include/sfx2/unoctitm.hxx b/include/sfx2/unoctitm.hxx index 70122ee2d3d4..21dd6ca2513f 100644 --- a/include/sfx2/unoctitm.hxx +++ b/include/sfx2/unoctitm.hxx @@ -150,9 +150,9 @@ class SfxDispatchController_Impl : public SfxControllerItem const char* pUnoName; ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > xFrame; - void addParametersToArgs( const com::sun::star::util::URL& aURL, - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ) const; - SfxMapUnit GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlot ); + static void addParametersToArgs( const com::sun::star::util::URL& aURL, + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); + static SfxMapUnit GetCoreMetric( SfxItemPool& rPool, sal_uInt16 nSlot ); public: SfxDispatchController_Impl( SfxOfficeDispatch* pDisp, diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 5acc75a22414..c0f38d1fe436 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -234,7 +234,7 @@ public: virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); virtual bool HasPrintOptionsPage() const; virtual SfxTabPage* CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ); - JobSetup GetJobSetup() const; + static JobSetup GetJobSetup(); Printer* GetActivePrinter() const; // Working set 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 ) diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index 0dc0722fcc17..28e506e6026e 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -271,7 +271,7 @@ namespace basprov // TODO if ( !m_pAppBasicManager ) - m_pAppBasicManager = SfxGetpApp()->GetBasicManager(); + m_pAppBasicManager = SfxApplication::GetBasicManager(); if ( !m_xLibContainerApp.is() ) m_xLibContainerApp = Reference< script::XLibraryContainer >( SfxGetpApp()->GetBasicContainer(), UNO_QUERY ); diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index 05567a372b06..22fc503094a4 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -630,7 +630,7 @@ namespace dlgprov } else { - ResMgr* pResMgr = SfxGetpApp()->GetSfxResManager(); + ResMgr* pResMgr = SfxApplication::GetSfxResManager(); if( pResMgr ) { OUString aRes( ResId(STR_ERRUNOEVENTBINDUNG, *pResMgr) ); diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx index 3f8bae3c1d2d..b4f2a67ed847 100644 --- a/sd/source/core/pglink.cxx +++ b/sd/source/core/pglink.cxx @@ -69,7 +69,7 @@ SdPageLink::~SdPageLink() OUString aFileName; OUString aBookmarkName; OUString aFilterName; - pLinkManager->GetDisplayNames( this,0, &aFileName, &aBookmarkName, + sfx2::LinkManager::GetDisplayNames( this,0, &aFileName, &aBookmarkName, &aFilterName); pPage->SetFileName(aFileName); pPage->SetBookmarkName(aBookmarkName); diff --git a/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx index 5a2ba3c5243f..457729720bdc 100644 --- a/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx +++ b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx @@ -55,7 +55,7 @@ private: const css::uno::Reference<css::frame::XFrame>& rxFrame, const ::rtl::OUString& rsModuleName, const ::rtl::OUString& rsContextName); - ::rtl::OUString GetModuleName ( + static ::rtl::OUString GetModuleName ( const css::uno::Reference<css::frame::XFrame>& rxFrame); }; diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index e22091705898..36a5043fdc7c 100644 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -173,7 +173,7 @@ com_sun_star_comp_sfx2_ApplicationDialogLibraryContainer_get_implementation( css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - SfxGetpApp()->GetBasicManager(); + SfxApplication::GetBasicManager(); css::uno::XInterface* pRet = SfxGetpApp()->GetDialogContainer(); pRet->acquire(); return pRet; @@ -185,7 +185,7 @@ com_sun_star_comp_sfx2_ApplicationScriptLibraryContainer_get_implementation( css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - SfxGetpApp()->GetBasicManager(); + SfxApplication::GetBasicManager(); css::uno::XInterface* pRet = SfxGetpApp()->GetBasicContainer(); pRet->acquire(); return pRet; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index e9b32c56697a..d985a1efdc14 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -564,7 +564,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) #endif case SID_SHOW_IME_STATUS_WINDOW: - if (pAppData_Impl->m_xImeStatusWindow->canToggle()) + if (sfx2::appl::ImeStatusWindow::canToggle()) { SfxBoolItem const * pItem = static_cast< SfxBoolItem const * >( rReq.GetArg(SID_SHOW_IME_STATUS_WINDOW, false, @@ -780,7 +780,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) } case SID_SHOW_IME_STATUS_WINDOW: - if (pAppData_Impl->m_xImeStatusWindow->canToggle()) + if (sfx2::appl::ImeStatusWindow::canToggle()) rSet.Put(SfxBoolItem( SID_SHOW_IME_STATUS_WINDOW, pAppData_Impl->m_xImeStatusWindow-> diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 801a1d6659d2..0d8f3a03a68b 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -205,7 +205,7 @@ bool SvFileObject::Connect( sfx2::SvBaseLink* pLink ) return false; // Test if not another link of the same connection already exists - pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter ); + sfx2::LinkManager::GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter ); if( OBJECT_CLIENT_GRF == pLink->GetObjType() ) { @@ -398,7 +398,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li OUString sFile, sRange, sTmpFilter; if( pLink && pLink->GetLinkManager() ) { - pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFile, &sRange, &sTmpFilter ); + sfx2::LinkManager::GetDisplayNames( pLink, 0, &sFile, &sRange, &sTmpFilter ); switch( pLink->GetObjType() ) { diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx index ffdcf4fc5a30..2d4416d93b45 100644 --- a/sfx2/source/appl/imestatuswindow.cxx +++ b/sfx2/source/appl/imestatuswindow.cxx @@ -145,7 +145,7 @@ void ImeStatusWindow::show(bool bShow) } } -bool ImeStatusWindow::canToggle() const +bool ImeStatusWindow::canToggle() { return Application::CanToggleImeStatusWindow(); } diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx index df8fe533b0c5..27a17f2fb0af 100644 --- a/sfx2/source/appl/imestatuswindow.hxx +++ b/sfx2/source/appl/imestatuswindow.hxx @@ -80,7 +80,7 @@ public: Must only be called with the Solar mutex locked. */ - bool canToggle() const; + static bool canToggle(); using ImeStatusWindow_Impl::acquire; using ImeStatusWindow_Impl::release; diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 4a3c0be1e6b7..aa829e21a54f 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -77,7 +77,7 @@ SvDDELinkEditDialog::SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink* pLin get(m_pEdDdeItem, "category"); OUString sServer, sTopic, sItem; - pLink->GetLinkManager()->GetDisplayNames( pLink, &sServer, &sTopic, &sItem ); + sfx2::LinkManager::GetDisplayNames( pLink, &sServer, &sTopic, &sItem ); m_pEdDdeApp->SetText( sServer ); m_pEdDdeTopic->SetText( sTopic ); @@ -204,7 +204,7 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) return false; OUString sServer, sTopic; - pSvLink->GetLinkManager()->GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem ); + sfx2::LinkManager::GetDisplayNames( pSvLink, &sServer, &sTopic, &sItem ); if( sServer.isEmpty() || sTopic.isEmpty() || sItem.isEmpty() ) return false; diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx index 00952d391b55..3ce245452b94 100644 --- a/sfx2/source/appl/impldde.hxx +++ b/sfx2/source/appl/impldde.hxx @@ -44,7 +44,7 @@ class SvDDEObject : public SvLinkSource sal_uInt8 nError : 7; // Error code for dialogue - bool ImplHasOtherFormat( DdeTransaction& ); + static bool ImplHasOtherFormat( DdeTransaction& ); DECL_LINK( ImplGetDDEData, DdeData* ); DECL_LINK( ImplDoneDDEData, void* ); diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index a64704b0503b..31ccadaa9513 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -226,7 +226,7 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * pLink, OUString* pType, OUString* pFile, OUString* pLinkStr, - OUString* pFilter ) const + OUString* pFilter ) { bool bRet = false; const OUString sLNm( pLink->GetLinkSourceName() ); @@ -444,7 +444,7 @@ void LinkManager::ReconnectDdeLink(SfxObjectShell& rServer) } } -void LinkManager::LinkServerShell(const OUString& rPath, SfxObjectShell& rServer, ::sfx2::SvBaseLink& rLink) const +void LinkManager::LinkServerShell(const OUString& rPath, SfxObjectShell& rServer, ::sfx2::SvBaseLink& rLink) { ::sfx2::SvLinkSource* pSrvSrc = rServer.DdeCreateLinkSource(rPath); if (pSrvSrc) @@ -576,7 +576,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) sal_uInt16 nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE; OUString sTopic, sItem, sReferer; LinkManager* pLinkMgr = pLink->GetLinkManager(); - if (pLinkMgr && pLinkMgr->GetDisplayNames(pLink, 0, &sTopic, &sItem) && !sTopic.isEmpty()) + if (pLinkMgr && sfx2::LinkManager::GetDisplayNames(pLink, 0, &sTopic, &sItem) && !sTopic.isEmpty()) { // first only loop over the DocumentShells the shells and find those // with the name: @@ -687,7 +687,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink ) if (xComp.is() && pFndShell) { pLinkMgr->InsertCachedComp(xComp); - pLinkMgr->LinkServerShell(sItem, *pFndShell, *pLink); + sfx2::LinkManager::LinkServerShell(sItem, *pFndShell, *pLink); return true; } } diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 4f0aa7382a6b..d06c54df8e4f 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -396,12 +396,12 @@ void SvBaseLink::_GetRealObject( bool bConnect) if( OBJECT_CLIENT_DDE == nObjType ) { OUString sServer; - if( pImpl->m_pLinkMgr->GetDisplayNames( this, &sServer ) && + if( sfx2::LinkManager::GetDisplayNames( this, &sServer ) && sServer == Application::GetAppName() ) // internal Link !!! { // so that the Internal link can be created! nObjType = OBJECT_INTERN; - xObj = pImpl->m_pLinkMgr->CreateObj( this ); + xObj = sfx2::LinkManager::CreateObj( this ); pImplData->ClientType.bIntrnlLnk = true; nObjType = OBJECT_CLIENT_DDE; // so we know what it once was! @@ -409,11 +409,11 @@ void SvBaseLink::_GetRealObject( bool bConnect) else { pImplData->ClientType.bIntrnlLnk = false; - xObj = pImpl->m_pLinkMgr->CreateObj( this ); + xObj = sfx2::LinkManager::CreateObj( this ); } } else if( (OBJECT_CLIENT_SO & nObjType) ) - xObj = pImpl->m_pLinkMgr->CreateObj( this ); + xObj = sfx2::LinkManager::CreateObj( this ); if( bConnect && ( !xObj.Is() || !xObj->Connect( this ) ) ) Disconnect(); @@ -490,7 +490,7 @@ void SvBaseLink::Edit( vcl::Window* pParent, const Link& rEndEditHdl ) { if( pImpl->m_pLinkMgr ) { - SvLinkSourceRef ref = pImpl->m_pLinkMgr->CreateObj( this ); + SvLinkSourceRef ref = sfx2::LinkManager::CreateObj( this ); if( ref.Is() ) { ref->Edit( pParent, this, aLink ); @@ -521,7 +521,7 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName ) if( !Update() ) { OUString sApp, sTopic, sItem, sError; - pImpl->m_pLinkMgr->GetDisplayNames( this, &sApp, &sTopic, &sItem ); + sfx2::LinkManager::GetDisplayNames( this, &sApp, &sTopic, &sItem ); if( nObjType == OBJECT_CLIENT_DDE ) { sError = SFX2_RESSTR(STR_DDE_ERROR); diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 5557ab3c6f6d..226f2faeb9e0 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -209,7 +209,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An OUString aMacro( rURL ); sal_Int32 nHashPos = aMacro.indexOf( '/', 8 ); sal_Int32 nArgsPos = aMacro.indexOf( '(' ); - BasicManager *pAppMgr = SfxGetpApp()->GetBasicManager(); + BasicManager *pAppMgr = SfxApplication::GetBasicManager(); BasicManager *pBasMgr = 0; ErrCode nErr = ERRCODE_NONE; diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx index 6965f42b06b2..71eeb09e099b 100644 --- a/sfx2/source/appl/shutdownicon.hxx +++ b/sfx2/source/appl/shutdownicon.hxx @@ -111,7 +111,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase void init() throw( ::com::sun::star::uno::Exception ); OUString GetResString( int id ); - OUString GetUrlDescription( const OUString& aUrl ); + static OUString GetUrlDescription( const OUString& aUrl ); void SetVeto( bool bVeto ) { m_bVeto = bVeto;} bool GetVeto() { return m_bVeto; } diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 72ad1ea3a63d..90349f7261b0 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -179,8 +179,7 @@ static void add_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, aLabel = OUStringToOString (*pOverrideLabel, RTL_TEXTENCODING_UTF8); else { - ShutdownIcon *pShutdownIcon = ShutdownIcon::getInstance(); - aLabel = OUStringToOString (pShutdownIcon->GetUrlDescription( *pURL ), + aLabel = OUStringToOString (ShutdownIcon::GetUrlDescription( *pURL ), RTL_TEXTENCODING_UTF8); } diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index b36a20d293c8..ac67cbb0c954 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -83,8 +83,8 @@ struct SfxInterface_Impl bool bRegistered; SfxInterface_Impl() : - aPopupRes(nullptr, *SfxApplication::GetOrCreate()->GetSfxResManager()), - aStatBarRes(nullptr, *SfxApplication::GetOrCreate()->GetSfxResManager()) + aPopupRes(nullptr, *SfxApplication::GetSfxResManager()), + aStatBarRes(nullptr, *SfxApplication::GetSfxResManager()) , pModule(NULL) , bRegistered(false) { diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 9e5a9b5b5c23..351dc0704429 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -521,7 +521,10 @@ const SfxPoolItem* SfxShell::GetSlotState } SFX_EXEC_STUB(SfxShell, VerbExec) -SFX_STATE_STUB(SfxShell, VerbState) +void SfxStubSfxShellVerbState(SfxShell *, SfxItemSet& rSet) +{ + SfxShell::VerbState( rSet ); +} void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& aVerbs) { diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 141fa1d5bc8a..03940a43f61d 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -497,7 +497,7 @@ void SfxDispatchController_Impl::UnBindController() } } -void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util::URL& aURL, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ) const +void SfxDispatchController_Impl::addParametersToArgs( const com::sun::star::util::URL& aURL, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ) { // Extract the parameter from the URL and put them into the property value sequence sal_Int32 nQueryIndex = aURL.Complete.indexOf( '?' ); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index ac7d9ec2e081..f02af36c770a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -171,7 +171,7 @@ void SAL_CALL FileDialogHelper_Impl::directoryChanged( const FilePickerEvent& aE OUString SAL_CALL FileDialogHelper_Impl::helpRequested( const FilePickerEvent& aEvent ) throw ( RuntimeException, std::exception ) { SolarMutexGuard aGuard; - return mpAntiImpl->HelpRequested( aEvent ); + return sfx2::FileDialogHelper::HelpRequested( aEvent ); } void SAL_CALL FileDialogHelper_Impl::controlStateChanged( const FilePickerEvent& aEvent ) throw ( RuntimeException, std::exception ) @@ -2558,7 +2558,7 @@ void SAL_CALL FileDialogHelper::DirectoryChanged( const FilePickerEvent& aEvent OUString SAL_CALL FileDialogHelper::HelpRequested( const FilePickerEvent& aEvent ) { - return mpImp->handleHelpRequested( aEvent ); + return sfx2::FileDialogHelper_Impl::handleHelpRequested( aEvent ); } void SAL_CALL FileDialogHelper::ControlStateChanged( const FilePickerEvent& aEvent ) diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index b9e069680095..00c2d358d0c5 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -170,7 +170,7 @@ namespace sfx2 // handle XFilePickerListener events void handleFileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); void handleDirectoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); - OUString handleHelpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); + static OUString handleHelpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); void handleControlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent ); void handleDialogSizeChanged(); diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index c208bc190bc3..0e19ee4c9361 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -235,7 +235,7 @@ public: const bool i_bCopyPrecedesSource); /** create a Undo Metadatable for i_rObject. */ - std::shared_ptr<MetadatableUndo> CreateUndo( + static std::shared_ptr<MetadatableUndo> CreateUndo( Metadatable const& i_rObject); /** merge i_rMerged and i_rOther into i_rMerged. */ @@ -339,7 +339,7 @@ private: const OUString & i_rIdref) const SAL_OVERRIDE; /** create a Clipboard Metadatable for i_rObject. */ - std::shared_ptr<MetadatableClipboard> CreateClipboard( + static std::shared_ptr<MetadatableClipboard> CreateClipboard( const bool i_isInContent); struct XmlIdRegistry_Impl; @@ -1492,7 +1492,7 @@ std::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const XmlIdRegistryDocument * pRegDoc( dynamic_cast<XmlIdRegistryDocument*>( m_pReg ) ); std::shared_ptr<MetadatableUndo> xUndo( - pRegDoc->CreateUndo(*this) ); + sfx2::XmlIdRegistryDocument::CreateUndo(*this) ); pRegDoc->RegisterCopy(*this, *xUndo, false); xUndo->m_pReg = pRegDoc; return xUndo; diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 346dd0d90607..ac24da5bfaf1 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -217,12 +217,12 @@ class SfxDocTplService_Impl bool bFsysFolder, Content &rNewFolder ); - bool CreateNewUniqueFolderWithPrefix( const OUString& aPath, + static bool CreateNewUniqueFolderWithPrefix( const OUString& aPath, const OUString& aPrefix, OUString& aNewFolderName, OUString& aNewFolderURL, Content& aNewFolder ); - OUString CreateNewUniqueFileWithPrefix( const OUString& aPath, + static OUString CreateNewUniqueFileWithPrefix( const OUString& aPath, const OUString& aPrefix, const OUString& aExt ); @@ -239,9 +239,9 @@ class SfxDocTplService_Impl bool WriteUINamesForTemplateDir_Impl( const OUString& aUserPath, const uno::Sequence< beans::StringPair >& aUINames ); - OUString CreateNewGroupFsys( const OUString& rGroupName, Content& aGroup ); + OUString CreateNewGroupFsys( const OUString& rGroupName, Content& aGroup ); - bool removeContent( Content& rContent ); + static bool removeContent( Content& rContent ); bool removeContent( const OUString& rContentURL ); bool setProperty( Content& rContent, diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 09b5bf13f715..ff7db2686d5e 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1484,7 +1484,7 @@ ErrCode SfxObjectShell::CallBasic( const OUString& rMacro, BasicManager *pMgr = GetBasicManager(); if( pApp->GetName() == rBasic ) - pMgr = pApp->GetBasicManager(); + pMgr = SfxApplication::GetBasicManager(); ErrCode nRet = SfxApplication::CallBasic( rMacro, pMgr, pArgs, pRet ); return nRet; } diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 854094b293fd..4e562e54f56d 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -189,7 +189,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even VBAConstantNameMap::iterator aIt = s_aRegisteredVBAConstants.find( _rEvent.Source.get() ); if ( aIt != s_aRegisteredVBAConstants.end() ) { - if ( BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager() ) + if ( BasicManager* pAppMgr = SfxApplication::GetBasicManager() ) pAppMgr->SetGlobalUNOConstant( aIt->second.getStr(), Any( Reference< XInterface >() ) ); s_aRegisteredVBAConstants.erase( aIt ); } @@ -711,7 +711,7 @@ BasicManager* SfxObjectShell::GetBasicManager() const { pBasMgr = lcl_getBasicManagerForDocument( *this ); if ( !pBasMgr ) - pBasMgr = SfxGetpApp()->GetBasicManager(); + pBasMgr = SfxApplication::GetBasicManager(); } catch (const css::ucb::ContentCreationException& e) { @@ -960,7 +960,7 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp // but we should have filtered quite some unnecessary calls already. #if HAVE_FEATURE_SCRIPTING - BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager(); + BasicManager* pAppMgr = SfxApplication::GetBasicManager(); rTheCurrentComponent = _rxComponent; if ( pAppMgr ) { diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index ad06943463ba..af5192e38a83 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -291,12 +291,12 @@ void SfxOleStringHelper::SaveString8( SvStream& rStrm, const OUString& rValue ) ImplSaveString8( rStrm, rValue ); } -OUString SfxOleStringHelper::LoadString16( SvStream& rStrm ) const +OUString SfxOleStringHelper::LoadString16( SvStream& rStrm ) { return ImplLoadString16( rStrm ); } -void SfxOleStringHelper::SaveString16( SvStream& rStrm, const OUString& rValue ) const +void SfxOleStringHelper::SaveString16( SvStream& rStrm, const OUString& rValue ) { ImplSaveString16( rStrm, rValue ); } @@ -322,7 +322,7 @@ OUString SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const return aValue; } -OUString SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const +OUString SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) { OUString aValue; // read size field (signed 32-bit), may be buffer size or character count @@ -363,7 +363,7 @@ void SfxOleStringHelper::ImplSaveString8( SvStream& rStrm, const OUString& rValu rStrm.WriteUChar( 0 ); } -void SfxOleStringHelper::ImplSaveString16( SvStream& rStrm, const OUString& rValue ) const +void SfxOleStringHelper::ImplSaveString16( SvStream& rStrm, const OUString& rValue ) { // write size field (including trailing NUL character) sal_Int32 nSize = static_cast< sal_Int32 >( rValue.getLength() + 1 ); diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index b93361075a59..81f37d0d60f5 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -153,15 +153,15 @@ public: void SaveString8( SvStream& rStrm, const OUString& rValue ) const; /** Loads a Unicode string from the passed stream, ignores own encoding. */ - OUString LoadString16( SvStream& rStrm ) const; + static OUString LoadString16( SvStream& rStrm ); /** Saves a Unicode string to the passed stream, ignores own encoding. */ - void SaveString16( SvStream& rStrm, const OUString& rValue ) const; + static void SaveString16( SvStream& rStrm, const OUString& rValue ); private: OUString ImplLoadString8( SvStream& rStrm ) const; - OUString ImplLoadString16( SvStream& rStrm ) const; + static OUString ImplLoadString16( SvStream& rStrm ); void ImplSaveString8( SvStream& rStrm, const OUString& rValue ) const; - void ImplSaveString16( SvStream& rStrm, const OUString& rValue ) const; + static void ImplSaveString16( SvStream& rStrm, const OUString& rValue ); }; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index c24f3eaf5852..7ff72bc51530 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -349,7 +349,7 @@ class SfxOwnFramesLocker { Sequence< Reference< frame::XFrame > > m_aLockedFrames; - vcl::Window* GetVCLWindow( const Reference< frame::XFrame >& xFrame ); + static vcl::Window* GetVCLWindow( const Reference< frame::XFrame >& xFrame ); public: SfxOwnFramesLocker( SfxObjectShell* ObjechShell ); ~SfxOwnFramesLocker(); diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx index eb83aff068c7..502492c0e61f 100644 --- a/sfx2/source/inc/sfxpicklist.hxx +++ b/sfx2/source/inc/sfxpicklist.hxx @@ -58,7 +58,7 @@ class SfxPickList : public SfxListener certain requirements, e.g. being writable. Check implementation for requirement details. */ - void AddDocumentToPickList( SfxObjectShell* pDocShell ); + static void AddDocumentToPickList( SfxObjectShell* pDocShell ); public: static SfxPickList& Get(); @@ -67,8 +67,8 @@ class SfxPickList : public SfxListener sal_uInt32 GetAllowedMenuSize() { return m_nAllowedMenuSize; } sal_uInt32 GetNumOfEntries() const { return m_aPicklistVector.size(); } void CreateMenuEntries( Menu* pMenu ); - void ExecuteMenuEntry( sal_uInt16 nId ); - void ExecuteEntry( sal_uInt32 nIndex ); + static void ExecuteMenuEntry( sal_uInt16 nId ); + static void ExecuteEntry( sal_uInt32 nIndex ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; }; diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 3355cde2d3e6..70b67aa16b1f 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -965,7 +965,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu ) } else if ( nSlotId >= START_ITEMID_PICKLIST && nSlotId <= END_ITEMID_PICKLIST ) { - SfxPickList::Get().ExecuteMenuEntry( nSlotId ); + SfxPickList::ExecuteMenuEntry( nSlotId ); return sal_True; } diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index d91f412aabe8..78fe32af6de0 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -283,7 +283,7 @@ void ResourceManager::ReadPanelList() void ResourceManager::ReadContextList ( const utl::OConfigurationNode& rParentNode, ContextList& rContextList, - const OUString& rsDefaultMenuCommand) const + const OUString& rsDefaultMenuCommand) { const Any aValue = rParentNode.getNodeValue("ContextList"); Sequence<OUString> aValues; @@ -522,7 +522,7 @@ void ResourceManager::StorePanelExpansionState ( } } -utl::OConfigurationTreeRoot ResourceManager::GetLegacyAddonRootNode (const OUString& rsModuleName) const +utl::OConfigurationTreeRoot ResourceManager::GetLegacyAddonRootNode (const OUString& rsModuleName) { try { @@ -550,7 +550,7 @@ utl::OConfigurationTreeRoot ResourceManager::GetLegacyAddonRootNode (const OUStr void ResourceManager::GetToolPanelNodeNames ( std::vector<OUString>& rMatchingNames, - const utl::OConfigurationTreeRoot& aRoot) const + const utl::OConfigurationTreeRoot& aRoot) { Sequence<OUString> aChildNodeNames (aRoot.getNodeNames()); const sal_Int32 nCount (aChildNodeNames.getLength()); @@ -564,7 +564,7 @@ void ResourceManager::GetToolPanelNodeNames ( bool ResourceManager::IsDeckEnabled ( const OUString& rsDeckId, const Context& rContext, - const Reference<frame::XFrame>& rxFrame) const + const Reference<frame::XFrame>& rxFrame) { // Check if any panel that matches the current context can be // displayed. diff --git a/sfx2/source/sidebar/ResourceManager.hxx b/sfx2/source/sidebar/ResourceManager.hxx index 560793f2601f..9151760d00e4 100644 --- a/sfx2/source/sidebar/ResourceManager.hxx +++ b/sfx2/source/sidebar/ResourceManager.hxx @@ -106,16 +106,16 @@ private: void ReadDeckList(); void ReadPanelList(); - void ReadContextList(const utl::OConfigurationNode& rNode, + static void ReadContextList(const utl::OConfigurationNode& rNode, ContextList& rContextList, - const OUString& rsDefaultMenuCommand) const; + const OUString& rsDefaultMenuCommand); void ReadLegacyAddons(const css::uno::Reference<css::frame::XFrame>& rxFrame); - utl::OConfigurationTreeRoot GetLegacyAddonRootNode(const OUString& rsModuleName) const; - void GetToolPanelNodeNames(std::vector<OUString>& rMatchingNames, - const utl::OConfigurationTreeRoot& aRoot) const; - bool IsDeckEnabled(const OUString& rsDeckId, + static utl::OConfigurationTreeRoot GetLegacyAddonRootNode(const OUString& rsModuleName); + static void GetToolPanelNodeNames(std::vector<OUString>& rMatchingNames, + const utl::OConfigurationTreeRoot& aRoot); + static bool IsDeckEnabled(const OUString& rsDeckId, const Context& rContext, - const css::uno::Reference<css::frame::XFrame>& rxFrame) const; + const css::uno::Reference<css::frame::XFrame>& rxFrame); }; } } // end of namespace sfx2::sidebar diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index c93691e28254..df469123cb1d 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -905,7 +905,7 @@ Theme::ChangeListenerContainer* Theme::GetChangeListeners ( bool Theme::DoVetoableListenersVeto ( const VetoableListenerContainer* pListeners, - const beans::PropertyChangeEvent& rEvent) const + const beans::PropertyChangeEvent& rEvent) { if (pListeners == NULL) return false; @@ -935,7 +935,7 @@ bool Theme::DoVetoableListenersVeto ( void Theme::BroadcastPropertyChange ( const ChangeListenerContainer* pListeners, - const beans::PropertyChangeEvent& rEvent) const + const beans::PropertyChangeEvent& rEvent) { if (pListeners == NULL) return; diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index f62c77c14b56..0f6ea883211f 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -133,10 +133,10 @@ private: const OUString& i_rServiceName ) const; - OUString impl_askForFilter_nothrow( + static OUString impl_askForFilter_nothrow( const css::uno::Reference< css::task::XInteractionHandler >& i_rxHandler, const OUString& i_rDocumentURL - ) const; + ); const SfxFilter* impl_detectFilterForURL( const OUString& _rURL, @@ -144,7 +144,7 @@ private: const SfxFilterMatcher& rMatcher ) const; - bool impl_createNewDocWithSlotParam( + static bool impl_createNewDocWithSlotParam( const sal_uInt16 _nSlotID, const css::uno::Reference< css::frame::XFrame >& i_rxFrame, const bool i_bHidden @@ -158,34 +158,34 @@ private: ::comphelper::NamedValueCollection& io_rDescriptor ) const; - sal_uInt16 impl_findSlotParam( + static sal_uInt16 impl_findSlotParam( const OUString& i_rFactoryURL - ) const; + ); - SfxObjectShellRef impl_findObjectShell( + static SfxObjectShellRef impl_findObjectShell( const css::uno::Reference< css::frame::XModel2 >& i_rxDocument - ) const; + ); - void impl_handleCaughtError_nothrow( + static void impl_handleCaughtError_nothrow( const css::uno::Any& i_rCaughtError, const ::comphelper::NamedValueCollection& i_rDescriptor - ) const; + ); - void impl_removeLoaderArguments( + static void impl_removeLoaderArguments( ::comphelper::NamedValueCollection& io_rDescriptor ); - sal_Int16 impl_determineEffectiveViewId_nothrow( + static sal_Int16 impl_determineEffectiveViewId_nothrow( const SfxObjectShell& i_rDocument, const ::comphelper::NamedValueCollection& i_rDescriptor ); - ::comphelper::NamedValueCollection + static ::comphelper::NamedValueCollection impl_extractViewCreationArgs( ::comphelper::NamedValueCollection& io_rDescriptor ); - css::uno::Reference< css::frame::XController2 > + static css::uno::Reference< css::frame::XController2 > impl_createDocumentView( const css::uno::Reference< css::frame::XModel2 >& i_rModel, const css::uno::Reference< css::frame::XFrame >& i_rFrame, @@ -297,7 +297,7 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con OUString SfxFrameLoader_Impl::impl_askForFilter_nothrow( const Reference< XInteractionHandler >& i_rxHandler, - const OUString& i_rDocumentURL ) const + const OUString& i_rDocumentURL ) { ENSURE_OR_THROW( i_rxHandler.is(), "invalid interaction handler" ); @@ -400,7 +400,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti } -SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const +SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) { for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, false ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, false ) ) { @@ -466,7 +466,7 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal } -sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const OUString& i_rFactoryURL ) const +sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const OUString& i_rFactoryURL ) { OUString sSlotParam; const sal_Int32 nParamPos = i_rFactoryURL.indexOf( '?' ); @@ -485,7 +485,7 @@ sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const OUString& i_rFactoryUR } -void SfxFrameLoader_Impl::impl_handleCaughtError_nothrow( const Any& i_rCaughtError, const ::comphelper::NamedValueCollection& i_rDescriptor ) const +void SfxFrameLoader_Impl::impl_handleCaughtError_nothrow( const Any& i_rCaughtError, const ::comphelper::NamedValueCollection& i_rDescriptor ) { try { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 509fa7dac853..cecb1386bd8c 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2621,7 +2621,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro ) if ( aLocation.equalsIgnoreAsciiCase( "application" ) ) { // application basic - pBasMgr = pSfxApp->GetBasicManager(); + pBasMgr = SfxApplication::GetBasicManager(); } else if ( aLocation.equalsIgnoreAsciiCase( "document" ) ) { diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 16444595d913..5d46afde66f3 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -906,7 +906,7 @@ bool SfxViewShell::HasPrintOptionsPage() const return false; } -JobSetup SfxViewShell::GetJobSetup() const +JobSetup SfxViewShell::GetJobSetup() { return JobSetup(); } diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 70a9480a615d..cc4f9154d2d7 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -947,7 +947,7 @@ namespace svxform if ( sMacroLocation.isEmpty() ) { // legacy format: use the app-wide Basic, if it has a respective method, otherwise fall back to the doc's Basic - if ( SfxGetpApp()->GetBasicManager()->HasMacro( sScriptCode ) ) + if ( SfxApplication::GetBasicManager()->HasMacro( sScriptCode ) ) sMacroLocation = "application"; else sMacroLocation = "document"; diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 3aec601a17f8..9253a46b652d 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -226,7 +226,7 @@ void SdrGraphicLink::RemoveGraphicUpdater() if( pLinkManager && rValue.hasValue() ) { - pLinkManager->GetDisplayNames( this, 0, &rGrafObj.aFileName, 0, &rGrafObj.aFilterName ); + sfx2::LinkManager::GetDisplayNames( this, 0, &rGrafObj.aFileName, 0, &rGrafObj.aFilterName ); Graphic aGraphic; if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic )) diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 7a26f78b729b..403646b6f10e 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -930,7 +930,7 @@ bool SdrOle2Obj::UpdateLinkURL_Impl() if ( pLinkManager ) { OUString aNewLinkURL; - pLinkManager->GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( mpImpl->mpObjectLink, 0, &aNewLinkURL, 0, 0 ); if ( !aNewLinkURL.equalsIgnoreAsciiCase( mpImpl->maLinkURL ) ) { const_cast<SdrOle2Obj*>(this)->GetObjRef_Impl(); diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 27d97a259b85..c0913d2ce7bd 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -81,7 +81,7 @@ void ImpSdrObjTextLink::Closed() { OUString aFile; OUString aFilter; - pLinkManager->GetDisplayNames( this, 0,&aFile, 0, &aFilter ); + sfx2::LinkManager::GetDisplayNames( this, 0,&aFile, 0, &aFilter ); if( pData->aFileName != aFile || pData->aFilterName != aFilter ) diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index 952b1f1490b5..7ed4e7bf9b7f 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -61,7 +61,7 @@ namespace {} }; - ::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr ) + ::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks ) { for( ::sfx2::SvBaseLinks::size_type n = 0; n < rLinks.size(); ++n ) { @@ -74,7 +74,7 @@ namespace ::sfx2::SvBaseLinkRef xLink = pLnk; OUString sFName; - rLnkMgr.GetDisplayNames( xLink, 0, &sFName, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( xLink, 0, &sFName, 0, 0 ); INetURLObject aURL( sFName ); if( INetProtocol::File == aURL.GetProtocol() || @@ -391,7 +391,7 @@ bool DocumentLinksAdministrationManager::EmbedAllLinks() ::sw::UndoGuard const undoGuard(m_rDoc.GetIDocumentUndoRedo()); ::sfx2::SvBaseLink* pLnk = 0; - while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks, rLnkMgr ) ) ) + while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks ) ) ) { ::sfx2::SvBaseLinkRef xLink = pLnk; // Tell the link that it's being destroyed! diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 98cf47e14918..7fb68343930d 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -561,7 +561,7 @@ OUString SwSection::GetLinkFileName() const OUString sRange; OUString sFilter; if (m_RefLink->GetLinkManager() && - m_RefLink->GetLinkManager()->GetDisplayNames( + sfx2::LinkManager::GetDisplayNames( m_RefLink, 0, &sTmp, &sRange, &sFilter )) { sTmp += OUString(sfx2::cTokenSeparator) + sFilter @@ -1161,7 +1161,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) { // It's in the Section, so update. But only if it's not in the same File! OUString sFName; - pDoc->getIDocumentLinksAdministration().GetLinkManager().GetDisplayNames( pBLink, 0, &sFName, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( pBLink, 0, &sFName, 0, 0 ); if( sFName != sName ) { pBLink->DataChanged( sMimeType, aValue ); @@ -1263,7 +1263,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) break; OUString sFilter; OUString sRange; - pDoc->getIDocumentLinksAdministration().GetLinkManager().GetDisplayNames( this, 0, &sFileName, + sfx2::LinkManager::GetDisplayNames( this, 0, &sFileName, &sRange, &sFilter ); RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE; diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index a77c1d118aaf..28629cce65bb 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -629,14 +629,14 @@ bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const { sal_uInt16 nType = refLink->GetObjType(); if( OBJECT_CLIENT_GRF == nType ) - bRet = refLink->GetLinkManager()->GetDisplayNames( + bRet = sfx2::LinkManager::GetDisplayNames( refLink, 0, pFileNm, 0, pFilterNm ); else if( OBJECT_CLIENT_DDE == nType && pFileNm && pFilterNm ) { OUString sApp; OUString sTopic; OUString sItem; - if( refLink->GetLinkManager()->GetDisplayNames( + if( sfx2::LinkManager::GetDisplayNames( refLink, &sApp, &sTopic, &sItem ) ) { *pFileNm = sApp + OUString(sfx2::cTokenSeparator) @@ -933,14 +933,13 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const Graphic aTmpGrf = GetGrf(); - const sfx2::LinkManager& rMgr = getIDocumentLinksAdministration()->GetLinkManager(); OUString sFile, sFilter; if( IsLinkedFile() ) - rMgr.GetDisplayNames( refLink, 0, &sFile, 0, &sFilter ); + sfx2::LinkManager::GetDisplayNames( refLink, 0, &sFile, 0, &sFilter ); else if( IsLinkedDDE() ) { OUString sTmp1, sTmp2; - rMgr.GetDisplayNames( refLink, &sTmp1, &sTmp2, &sFilter ); + sfx2::LinkManager::GetDisplayNames( refLink, &sTmp1, &sTmp2, &sFilter ); sfx2::MakeLnkName( sFile, &sTmp1, sTmp2, sFilter ); sFilter = "DDE"; } @@ -1096,7 +1095,7 @@ void SwGrfNode::TriggerAsyncRetrieveInputStream() mpThreadConsumer.reset( new SwAsyncRetrieveInputStreamThreadConsumer( *this ) ); OUString sGrfNm; - refLink->GetLinkManager()->GetDisplayNames( refLink, 0, &sGrfNm, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( refLink, 0, &sGrfNm, 0, 0 ); OUString sReferer; SfxObjectShell * sh = GetDoc()->GetPersist(); if (sh != 0 && sh->HasName()) @@ -1151,7 +1150,7 @@ bool SwGrfNode::IsAsyncRetrieveInputStreamPossible() const if ( IsLinkedFile() ) { OUString sGrfNm; - refLink->GetLinkManager()->GetDisplayNames( refLink, 0, &sGrfNm, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( refLink, 0, &sGrfNm, 0, 0 ); if ( !sGrfNm.startsWith( "vnd.sun.star.pkg:" ) ) { bRet = true; diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index e04159bebe5c..2952981039d4 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -519,7 +519,7 @@ bool SwOLENode::UpdateLinkURL_Impl() if ( mpObjectLink ) { OUString aNewLinkURL; - GetDoc()->getIDocumentLinksAdministration().GetLinkManager().GetDisplayNames( mpObjectLink, 0, &aNewLinkURL, 0, 0 ); + sfx2::LinkManager::GetDisplayNames( mpObjectLink, 0, &aNewLinkURL, 0, 0 ); if ( !aNewLinkURL.equalsIgnoreAsciiCase( maLinkURL ) ) { if ( !aOLEObj.xOLERef.is() ) diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index e91c1c099d70..51ebc2f276d7 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -263,7 +263,7 @@ void SwHTMLWriter::OutBasic() BasicManager *pBasicMan = pDoc->GetDocShell()->GetBasicManager(); OSL_ENSURE( pBasicMan, "Wo ist der Basic-Manager?" ); // nur das DocumentBasic schreiben - if( !pBasicMan || pBasicMan == SfxGetpApp()->GetBasicManager() ) + if( !pBasicMan || pBasicMan == SfxApplication::GetBasicManager() ) { return; } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 91b8e4104f7c..1ef8a1fd1025 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1290,7 +1290,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie if( rHtmlOptions.IsStarBasic() && HasBasic()) { BasicManager *pBasicMan = GetBasicManager(); - if( pBasicMan && (pBasicMan != SfxGetpApp()->GetBasicManager()) ) + if( pBasicMan && (pBasicMan != SfxApplication::GetBasicManager()) ) { sal_uInt16 nLibCount = pBasicMan->GetLibCount(); while( nLibCount ) diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 34de5d205ab6..2163096bce98 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1216,7 +1216,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, } pWorkView->StartPrint( aOptions, IsMergeSilent(), rMergeDescriptor.bPrintAsync ); SfxPrinter* pDocPrt = pWorkView->GetPrinter(false); - JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : pWorkView->GetJobSetup(); + JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : SfxViewShell::GetJobSetup(); Printer::PreparePrintJob( pWorkView->GetPrinterController(), aJobSetup ); #if ENABLE_CUPS && !defined(MACOSX) psp::PrinterInfoManager::get().startBatchPrint(); diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index c1cc81c5bcce..a4759d267019 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -188,7 +188,7 @@ uno::Reference< frame::XModel > getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel; - SbxObject* pBasic = dynamic_cast< SbxObject* > ( SfxGetpApp()->GetBasic() ); + SbxObject* pBasic = dynamic_cast< SbxObject* > ( SfxApplication::GetBasic() ); SbxObject* basicChosen = pBasic ; if ( basicChosen == NULL) { |