From d197d524c5292cf6d66be802ec7d1fed78e30416 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 15 Nov 2018 12:28:17 +0200 Subject: loplugin:staticmethods in sfx2 Change-Id: Ide10d0186431e745c3bb17d321cf46724e801c8f Reviewed-on: https://gerrit.libreoffice.org/63404 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/sfx2/basedlgs.hxx | 6 +++--- include/sfx2/objsh.hxx | 2 +- include/sfx2/progress.hxx | 2 +- include/sfx2/sidebar/DeckTitleBar.hxx | 2 +- sfx2/source/dialog/basedlgs.cxx | 6 +++--- sfx2/source/sidebar/DeckTitleBar.cxx | 2 +- sfx2/source/sidebar/SidebarController.cxx | 2 +- sfx2/source/view/classificationcontroller.cxx | 6 +++--- sw/source/core/layout/paintfrm.cxx | 6 +++--- sw/source/uibase/app/mainwn.cxx | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 28bf55a93f2a..06c928265277 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -55,7 +55,7 @@ private: SAL_DLLPRIVATE void SetDialogData_Impl(); SAL_DLLPRIVATE void GetDialogData_Impl(); - DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); + DECL_DLLPRIVATE_STATIC_LINK(SfxModalDialog, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); protected: SfxModalDialog(vcl::Window *pParent, const OUString& rID, const OUString& rUIXMLDescription); @@ -86,7 +86,7 @@ class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog void Init(SfxBindings *pBindinx, SfxChildWindow *pCW); - DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); + DECL_DLLPRIVATE_STATIC_LINK(SfxModelessDialog, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); protected: SfxModelessDialog( SfxBindings*, SfxChildWindow*, vcl::Window*, const OUString& rID, const OUString& rUIXMLDescription ); @@ -110,7 +110,7 @@ public: class SFX2_DLLPUBLIC SfxDialogController : public weld::GenericDialogController { private: - DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); + DECL_DLLPRIVATE_STATIC_LINK(SfxDialogController, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); public: SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const OString& rDialogId); }; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index ced0db56320d..af6c050c1dc8 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -750,7 +750,7 @@ public: SAL_DLLPRIVATE SignatureState ImplGetSignatureState( bool bScriptingContent = false ); SAL_DLLPRIVATE bool QuerySaveSizeExceededModules_Impl( const css::uno::Reference< css::task::XInteractionHandler >& xHandler ); - SAL_DLLPRIVATE bool QueryAllowExoticFormat_Impl( const css::uno::Reference< css::task::XInteractionHandler >& xHandler, + SAL_DLLPRIVATE static bool QueryAllowExoticFormat_Impl( const css::uno::Reference< css::task::XInteractionHandler >& xHandler, const OUString& rURL, const OUString& rFilterUIName); diff --git a/include/sfx2/progress.hxx b/include/sfx2/progress.hxx index 0734998c7357..10b9de3f22ec 100644 --- a/include/sfx2/progress.hxx +++ b/include/sfx2/progress.hxx @@ -55,7 +55,7 @@ public: void Suspend(); bool IsSuspended() const { return bSuspended; } - void Reschedule(); + static void Reschedule(); void Stop(); diff --git a/include/sfx2/sidebar/DeckTitleBar.hxx b/include/sfx2/sidebar/DeckTitleBar.hxx index 73daefb4d8e4..26e1a29b4216 100644 --- a/include/sfx2/sidebar/DeckTitleBar.hxx +++ b/include/sfx2/sidebar/DeckTitleBar.hxx @@ -31,7 +31,7 @@ public: const std::function& rCloserAction); void SetCloserVisible(const bool bIsCloserVisible); - tools::Rectangle GetDragArea() const; + static tools::Rectangle GetDragArea(); virtual void DataChanged(const DataChangedEvent& rEvent) override; virtual void MouseMove(const MouseEvent& rMouseEvent) override; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index f3b35c63071d..7ad50b9b86ad 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -130,7 +130,7 @@ SfxModalDialog::SfxModalDialog(vcl::Window *pParent, const OUString& rID, const GetDialogData_Impl(); } -IMPL_LINK_NOARG(SfxModalDialog, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) +IMPL_STATIC_LINK_NOARG(SfxModalDialog, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) { return SfxViewShell::Current(); } @@ -274,7 +274,7 @@ SfxModelessDialog::SfxModelessDialog(SfxBindings* pBindinx, Init(pBindinx, pCW); } -IMPL_LINK_NOARG(SfxModelessDialog, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) +IMPL_STATIC_LINK_NOARG(SfxModelessDialog, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) { return SfxViewShell::Current(); } @@ -840,7 +840,7 @@ SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& m_xDialog->SetInstallLOKNotifierHdl(LINK(this, SfxDialogController, InstallLOKNotifierHdl)); } -IMPL_LINK_NOARG(SfxDialogController, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) +IMPL_STATIC_LINK_NOARG(SfxDialogController, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) { return SfxViewShell::Current(); } diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 40450ddeaa7b..35e62b9eee4b 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -82,7 +82,7 @@ tools::Rectangle DeckTitleBar::GetTitleArea (const tools::Rectangle& rTitleBarBo rTitleBarBox.Bottom()); } -tools::Rectangle DeckTitleBar::GetDragArea() const +tools::Rectangle DeckTitleBar::GetDragArea() { Image aGripImage (Theme::GetImage(Theme::Image_Grip)); return tools::Rectangle(0,0, diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 338fd9d6137d..95b33d7cde4a 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1389,7 +1389,7 @@ tools::Rectangle SidebarController::GetDeckDragArea() const if(pTitleBar) { - aRect = pTitleBar->GetDragArea(); + aRect = DeckTitleBar::GetDragArea(); } } diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx index accb1d9d0c28..f07824a3774a 100644 --- a/sfx2/source/view/classificationcontroller.cxx +++ b/sfx2/source/view/classificationcontroller.cxx @@ -97,7 +97,7 @@ public: { return m_pCategory; } - sfx::ClassificationCreationOrigin getExistingClassificationOrigin(); + static sfx::ClassificationCreationOrigin getExistingClassificationOrigin(); void toggleInteractivityOnOrigin(); void setCategoryStateFromPolicy(SfxClassificationHelper & rHelper); }; @@ -175,7 +175,7 @@ IMPL_LINK(ClassificationCategoriesController, SelectHdl, ListBox&, rCategory, vo { m_pClassification->toggleInteractivityOnOrigin(); - if (m_pClassification->getExistingClassificationOrigin() == sfx::ClassificationCreationOrigin::MANUAL) + if (ClassificationControl::getExistingClassificationOrigin() == sfx::ClassificationCreationOrigin::MANUAL) { SfxObjectShell* pObjectShell = SfxObjectShell::Current(); if (!pObjectShell) @@ -211,7 +211,7 @@ void ClassificationCategoriesController::statusChanged(const frame::FeatureState m_pClassification->toggleInteractivityOnOrigin(); // check if classification was set via the advanced dialog - if (m_pClassification->getExistingClassificationOrigin() != sfx::ClassificationCreationOrigin::MANUAL) + if (ClassificationControl::getExistingClassificationOrigin() != sfx::ClassificationCreationOrigin::MANUAL) { VclPtr pCategories = m_pClassification->getCategory(); if (pCategories->GetEntryCount() == 0) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 67979b8d4984..b7abc1e3453b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3331,7 +3331,7 @@ void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect cons if( aShortCut.Stop( aPaintRect ) ) break; if ( bCnt && gProp.pSProgress ) - gProp.pSProgress->Reschedule(); + SfxProgress::Reschedule(); //We need to retouch if a frame explicitly requests it. //First do the retouch, because this could flatten the borders. @@ -4092,7 +4092,7 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRenderContext.Pop(); if ( gProp.pSProgress && pNoText ) - gProp.pSProgress->Reschedule(); + SfxProgress::Reschedule(); } void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const @@ -6292,7 +6292,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP SwShortCut aShortCut( *pFrame, aBorderRect ); do { if ( gProp.pSProgress ) - gProp.pSProgress->Reschedule(); + SfxProgress::Reschedule(); aFrameRect = pFrame->GetPaintArea(); if ( aFrameRect.IsOver( aBorderRect ) ) diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx index 747b69e953f3..36a34038f856 100644 --- a/sw/source/uibase/app/mainwn.cxx +++ b/sw/source/uibase/app/mainwn.cxx @@ -132,7 +132,7 @@ void RescheduleProgress( SwDocShell const *pDocShell ) { SwProgress *pProgress = lcl_SwFindProgress( pDocShell ); if ( pProgress ) - pProgress->pProgress->Reschedule(); + SfxProgress::Reschedule(); } } -- cgit v1.2.3