sd/source/ui/framework/module/ShellStackGuard.cxx | 12 ++++++------ sd/source/ui/framework/module/ShellStackGuard.hxx | 10 ++++------ 2 files changed, 10 insertions(+), 12 deletions(-)
New commits: commit dbc411773457aeb9e740a61325845469c8b5603e Author: Noel Grandin <[email protected]> AuthorDate: Mon Dec 27 15:27:51 2021 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Dec 27 20:57:16 2021 +0100 use comphelper::WeakComponentImplHelper in ShellStackGuard Change-Id: Ibb771041d60512ee0ca2201ecf810d0703a47884 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127562 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx index 95712cc43ab9..83d73b055a54 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.cxx +++ b/sd/source/ui/framework/module/ShellStackGuard.cxx @@ -39,8 +39,7 @@ namespace sd::framework { //===== CenterViewFocusModule ==================================================== ShellStackGuard::ShellStackGuard (Reference<frame::XController> const & rxController) - : ShellStackGuardInterfaceBase(m_aMutex), - mpBase(nullptr), + : mpBase(nullptr), maPrinterPollingIdle("sd ShellStackGuard PrinterPollingIdle") { Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY); @@ -72,12 +71,13 @@ ShellStackGuard::~ShellStackGuard() { } -void SAL_CALL ShellStackGuard::disposing() +void ShellStackGuard::disposing(std::unique_lock<std::mutex>&) { - if (mxConfigurationController.is()) + if (mxConfigurationController) + { mxConfigurationController->removeConfigurationChangeListener(this); - - mxConfigurationController = nullptr; + mxConfigurationController = nullptr; + } mpBase = nullptr; } diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx b/sd/source/ui/framework/module/ShellStackGuard.hxx index 20db60339f94..72b7ed2c6603 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.hxx +++ b/sd/source/ui/framework/module/ShellStackGuard.hxx @@ -19,14 +19,12 @@ #pragma once -#include <cppuhelper/basemutex.hxx> - #include <framework/ConfigurationController.hxx> #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp> #include <vcl/idle.hxx> -#include <cppuhelper/compbase.hxx> +#include <comphelper/compbase.hxx> #include <memory> namespace com::sun::star::drawing::framework @@ -45,7 +43,7 @@ class ViewShellBase; namespace sd::framework { -typedef ::cppu::WeakComponentImplHelper<css::drawing::framework::XConfigurationChangeListener> +typedef comphelper::WeakComponentImplHelper<css::drawing::framework::XConfigurationChangeListener> ShellStackGuardInterfaceBase; /** This module locks updates of the current configuration in situations @@ -58,13 +56,13 @@ typedef ::cppu::WeakComponentImplHelper<css::drawing::framework::XConfigurationC When in the future there are no resources left that use shells then this module can be removed. */ -class ShellStackGuard : private ::cppu::BaseMutex, public ShellStackGuardInterfaceBase +class ShellStackGuard : public ShellStackGuardInterfaceBase { public: explicit ShellStackGuard(css::uno::Reference<css::frame::XController> const& rxController); virtual ~ShellStackGuard() override; - virtual void SAL_CALL disposing() override; + virtual void disposing(std::unique_lock<std::mutex>&) override; // XConfigurationChangeListener
