include/svx/sidebar/SelectionChangeHandler.hxx | 10 ++++------ svx/source/sidebar/SelectionChangeHandler.cxx | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-)
New commits: commit b66bc8fb918acd19ee0bd02312e7506db43d8317 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Wed Dec 29 08:23:12 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Dec 29 17:58:05 2021 +0100 use comphelper::WeakComponentImplHelper in svx::sidebar::SelectionChangeHandler Change-Id: I7f60374710f5768efef07ee993757558a225c111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svx/sidebar/SelectionChangeHandler.hxx b/include/svx/sidebar/SelectionChangeHandler.hxx index 4f5c5b818b5f..a4d5dbc32f96 100644 --- a/include/svx/sidebar/SelectionChangeHandler.hxx +++ b/include/svx/sidebar/SelectionChangeHandler.hxx @@ -24,8 +24,7 @@ #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/view/XSelectionChangeListener.hpp> -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> +#include <comphelper/compbase.hxx> #include <functional> @@ -34,13 +33,12 @@ class SdrMarkView; namespace svx::sidebar { -typedef cppu::WeakComponentImplHelper< +typedef comphelper::WeakComponentImplHelper< css::view::XSelectionChangeListener > SelectionChangeHandlerInterfaceBase; class SVX_DLLPUBLIC SelectionChangeHandler final - : private ::cppu::BaseMutex, - public SelectionChangeHandlerInterfaceBase + : public SelectionChangeHandlerInterfaceBase { public: SelectionChangeHandler ( @@ -53,7 +51,7 @@ public: virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override; - virtual void SAL_CALL disposing() override; + virtual void disposing(std::unique_lock<std::mutex>&) override; void Connect(); void Disconnect(); diff --git a/svx/source/sidebar/SelectionChangeHandler.cxx b/svx/source/sidebar/SelectionChangeHandler.cxx index c015578e8671..f4ef4d8934d1 100644 --- a/svx/source/sidebar/SelectionChangeHandler.cxx +++ b/svx/source/sidebar/SelectionChangeHandler.cxx @@ -33,8 +33,7 @@ SelectionChangeHandler::SelectionChangeHandler ( const std::function<OUString()>& rSelectionChangeCallback, const Reference<css::frame::XController>& rxController, const vcl::EnumContext::Context eDefaultContext) - : SelectionChangeHandlerInterfaceBase(m_aMutex), - maSelectionChangeCallback(rSelectionChangeCallback), + : maSelectionChangeCallback(rSelectionChangeCallback), mxController(rxController), meDefaultContext(eDefaultContext), mbIsConnected(false) @@ -67,7 +66,7 @@ void SAL_CALL SelectionChangeHandler::disposing (const lang::EventObject&) } -void SAL_CALL SelectionChangeHandler::disposing() +void SelectionChangeHandler::disposing(std::unique_lock<std::mutex>&) { if (mbIsConnected) Disconnect();