summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-24 21:01:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-25 19:33:53 +0100
commit98dbe250d7d5e3ebe626e8c8650e7fdccd399869 (patch)
tree5e985680c267c18c72a904c568525e5d1ffb1cff /framework
parent752052cb1ff82949183cea59ca18683266c7b4ff (diff)
use comphelper::WeakComponentImplHelper in ContextChangeEventMultiplexer
Change-Id: I6f8c2be817695e44b25f209a5a56e021cd3e94d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127487 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/ContextChangeEventMultiplexer.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/services/ContextChangeEventMultiplexer.cxx b/framework/source/services/ContextChangeEventMultiplexer.cxx
index 0dea0823c52b..76424b3aea03 100644
--- a/framework/source/services/ContextChangeEventMultiplexer.cxx
+++ b/framework/source/services/ContextChangeEventMultiplexer.cxx
@@ -26,10 +26,10 @@
#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <rtl/ref.hxx>
+#include <osl/diagnose.h>
#include <algorithm>
#include <map>
@@ -40,22 +40,21 @@ using namespace css::uno;
namespace {
-typedef ::cppu::WeakComponentImplHelper <
+typedef comphelper::WeakComponentImplHelper <
css::ui::XContextChangeEventMultiplexer,
css::lang::XServiceInfo,
css::lang::XEventListener
> ContextChangeEventMultiplexerInterfaceBase;
class ContextChangeEventMultiplexer
- : private ::cppu::BaseMutex,
- public ContextChangeEventMultiplexerInterfaceBase
+ : public ContextChangeEventMultiplexerInterfaceBase
{
public:
ContextChangeEventMultiplexer();
ContextChangeEventMultiplexer(const ContextChangeEventMultiplexer&) = delete;
ContextChangeEventMultiplexer& operator=(const ContextChangeEventMultiplexer&) = delete;
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>&) override;
// XContextChangeEventMultiplexer
virtual void SAL_CALL addContextChangeEventListener (
@@ -106,15 +105,16 @@ public:
};
ContextChangeEventMultiplexer::ContextChangeEventMultiplexer()
- : ContextChangeEventMultiplexerInterfaceBase(m_aMutex)
{
}
-void SAL_CALL ContextChangeEventMultiplexer::disposing()
+void ContextChangeEventMultiplexer::disposing(std::unique_lock<std::mutex>& rGuard)
{
ListenerMap aListeners;
aListeners.swap(maListeners);
+ rGuard.unlock();
+
css::uno::Reference<css::uno::XInterface> xThis (static_cast<XWeak*>(this));
css::lang::EventObject aEvent (xThis);
for (auto const& container : aListeners)