summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-29 08:23:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-29 17:58:05 +0100
commitb66bc8fb918acd19ee0bd02312e7506db43d8317 (patch)
tree684eaabc7d3beb5c8d02ef005e674f5e4afd7e63
parent0c920406888f141d163ce2df01e707404f9e7acd (diff)
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.grandin@collabora.co.uk>
-rw-r--r--include/svx/sidebar/SelectionChangeHandler.hxx10
-rw-r--r--svx/source/sidebar/SelectionChangeHandler.cxx5
2 files changed, 6 insertions, 9 deletions
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();