summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-28 20:06:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-29 07:13:29 +0100
commite833a526ba141eb7f9524f173525b177c29266c0 (patch)
tree60905937e77e63ee2c57e4cfdbeda9ea6db4ca74 /sd
parent7d01e69a91250c321eb10c133684adaedf28c439 (diff)
use comphelper::WeakComponentImplHelper in ViewTabBarModule
Change-Id: Ie3c5f2f868cf68f2701c3cbd4bf0091894c901d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/module/ViewTabBarModule.cxx12
-rw-r--r--sd/source/ui/framework/module/ViewTabBarModule.hxx10
2 files changed, 10 insertions, 12 deletions
diff --git a/sd/source/ui/framework/module/ViewTabBarModule.cxx b/sd/source/ui/framework/module/ViewTabBarModule.cxx
index b62eba9996f9..3ee872bc84a0 100644
--- a/sd/source/ui/framework/module/ViewTabBarModule.cxx
+++ b/sd/source/ui/framework/module/ViewTabBarModule.cxx
@@ -48,8 +48,7 @@ namespace sd::framework {
ViewTabBarModule::ViewTabBarModule (
const Reference<frame::XController>& rxController,
const Reference<XResourceId>& rxViewTabBarId)
- : ViewTabBarModuleInterfaceBase(m_aMutex),
- mxViewTabBarId(rxViewTabBarId)
+ : mxViewTabBarId(rxViewTabBarId)
{
Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY);
@@ -80,12 +79,13 @@ ViewTabBarModule::~ViewTabBarModule()
{
}
-void SAL_CALL ViewTabBarModule::disposing()
+void ViewTabBarModule::disposing(std::unique_lock<std::mutex>&)
{
if (mxConfigurationController.is())
+ {
mxConfigurationController->removeConfigurationChangeListener(this);
-
- mxConfigurationController = nullptr;
+ mxConfigurationController = nullptr;
+ }
}
void SAL_CALL ViewTabBarModule::notifyConfigurationChange (
@@ -130,7 +130,7 @@ void SAL_CALL ViewTabBarModule::disposing (
{
// Without the configuration controller this class can do nothing.
mxConfigurationController = nullptr;
- disposing();
+ dispose();
}
}
diff --git a/sd/source/ui/framework/module/ViewTabBarModule.hxx b/sd/source/ui/framework/module/ViewTabBarModule.hxx
index 2975294cea44..bfb252b8d4ff 100644
--- a/sd/source/ui/framework/module/ViewTabBarModule.hxx
+++ b/sd/source/ui/framework/module/ViewTabBarModule.hxx
@@ -20,8 +20,7 @@
#pragma once
#include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
namespace com::sun::star::drawing::framework { class XConfigurationController; }
namespace com::sun::star::drawing::framework { class XTabBar; }
@@ -29,7 +28,7 @@ namespace com::sun::star::frame { class XController; }
namespace sd::framework {
-typedef ::cppu::WeakComponentImplHelper <
+typedef comphelper::WeakComponentImplHelper <
css::drawing::framework::XConfigurationChangeListener
> ViewTabBarModuleInterfaceBase;
@@ -37,8 +36,7 @@ typedef ::cppu::WeakComponentImplHelper <
the center pane.
*/
class ViewTabBarModule
- : private cppu::BaseMutex,
- public ViewTabBarModuleInterfaceBase
+ : public ViewTabBarModuleInterfaceBase
{
public:
/** Create a new module that controls the view tab bar above the view
@@ -55,7 +53,7 @@ public:
css::drawing::framework::XResourceId>& rxViewTabBarId);
virtual ~ViewTabBarModule() override;
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>&) override;
// XConfigurationChangeListener