sd/source/ui/framework/factories/BasicPaneFactory.cxx |    7 +++----
 sd/source/ui/framework/factories/BasicPaneFactory.hxx |   11 +++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 9ed378edc9a3f5c3730e046fc4be72f6e0507e93
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Mon Dec 27 15:23:23 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 27 16:26:55 2021 +0100

    use comphelper::WeakComponentImplHelper in BasicPaneFactory
    
    Change-Id: I2bf00d2534bb31670998eeee65109e2e9a0d20c7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127559
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx 
b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index e45b35c9015c..17b66d7d82c8 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -85,8 +85,7 @@ public:
 
 BasicPaneFactory::BasicPaneFactory (
     const Reference<XComponentContext>& rxContext)
-    : BasicPaneFactoryInterfaceBase(m_aMutex),
-      mxComponentContext(rxContext),
+    : mxComponentContext(rxContext),
       mpViewShellBase(nullptr),
       mpPaneContainer(new PaneContainer)
 {
@@ -96,7 +95,7 @@ BasicPaneFactory::~BasicPaneFactory()
 {
 }
 
-void SAL_CALL BasicPaneFactory::disposing()
+void BasicPaneFactory::disposing(std::unique_lock<std::mutex>&)
 {
     Reference<XConfigurationController> xCC (mxConfigurationControllerWeak);
     if (xCC.is())
@@ -412,7 +411,7 @@ Reference<XResource> 
BasicPaneFactory::CreateChildWindowPane (
 
 void BasicPaneFactory::ThrowIfDisposed() const
 {
-    if (rBHelper.bDisposed || rBHelper.bInDispose)
+    if (m_bDisposed)
     {
         throw lang::DisposedException ("BasicPaneFactory object has already 
been disposed",
             const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx 
b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
index 1027bbec2592..317776e48c28 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
@@ -22,8 +22,8 @@
 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
+#include <cppuhelper/weakref.hxx>
 
 #include <memory>
 
@@ -37,7 +37,7 @@ class ViewShellBase;
 
 namespace sd::framework {
 
-typedef ::cppu::WeakComponentImplHelper <
+typedef comphelper::WeakComponentImplHelper <
     css::lang::XInitialization,
     css::drawing::framework::XResourceFactory,
     css::drawing::framework::XConfigurationChangeListener
@@ -52,15 +52,14 @@ typedef ::cppu::WeakComponentImplHelper <
     show different titles for the left pane in Draw and Impress.
 */
 class BasicPaneFactory
-    : private ::cppu::BaseMutex,
-      public BasicPaneFactoryInterfaceBase
+    : public BasicPaneFactoryInterfaceBase
 {
 public:
     explicit BasicPaneFactory (
         const css::uno::Reference<css::uno::XComponentContext>& rxContext);
     virtual ~BasicPaneFactory() override;
 
-    virtual void SAL_CALL disposing() override;
+    virtual void disposing(std::unique_lock<std::mutex>&) override;
 
     // XInitialization
 

Reply via email to