sd/source/ui/framework/factories/PresentationFactory.cxx |    9 ++-------
 sd/source/ui/inc/framework/PresentationFactory.hxx       |   13 +++++--------
 2 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit f5f97c7949d08c706ffb1f7a17b8bab32d2e2109
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Tue Dec 28 17:08:51 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Dec 29 08:35:07 2021 +0100

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

diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx 
b/sd/source/ui/framework/factories/PresentationFactory.cxx
index 4fb0ac40e2ad..57304923f142 100644
--- a/sd/source/ui/framework/factories/PresentationFactory.cxx
+++ b/sd/source/ui/framework/factories/PresentationFactory.cxx
@@ -91,8 +91,7 @@ constexpr OUStringLiteral gsPresentationViewURL = 
u"private:resource/view/Presen
 
 PresentationFactory::PresentationFactory (
     const Reference<frame::XController>& rxController)
-    : PresentationFactoryInterfaceBase(m_aMutex),
-      mxController(rxController)
+    : mxController(rxController)
 {
 }
 
@@ -100,10 +99,6 @@ PresentationFactory::~PresentationFactory()
 {
 }
 
-void SAL_CALL PresentationFactory::disposing()
-{
-}
-
 //----- XViewFactory ----------------------------------------------------------
 
 Reference<XResource> SAL_CALL PresentationFactory::createResource (
@@ -146,7 +141,7 @@ void SAL_CALL PresentationFactory::disposing (
 
 void PresentationFactory::ThrowIfDisposed() const
 {
-    if (rBHelper.bDisposed || rBHelper.bInDispose)
+    if (m_bDisposed)
     {
         throw lang::DisposedException ("PresentationFactory object has already 
been disposed",
             const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
diff --git a/sd/source/ui/inc/framework/PresentationFactory.hxx 
b/sd/source/ui/inc/framework/PresentationFactory.hxx
index 058086081c2b..897825c8acfb 100644
--- a/sd/source/ui/inc/framework/PresentationFactory.hxx
+++ b/sd/source/ui/inc/framework/PresentationFactory.hxx
@@ -21,14 +21,13 @@
 
 #include <com/sun/star/drawing/framework/XResourceFactory.hpp>
 #include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
 
 namespace com::sun::star::frame { class XController; }
 
 namespace sd::framework {
 
-typedef ::cppu::WeakComponentImplHelper <
+typedef comphelper::WeakComponentImplHelper <
     css::drawing::framework::XResourceFactory,
     css::drawing::framework::XConfigurationChangeListener
     > PresentationFactoryInterfaceBase;
@@ -37,17 +36,14 @@ typedef ::cppu::WeakComponentImplHelper <
     indicates that a slideshow is running (in another but associated
     application window).
 */
-class PresentationFactory
-    : private cppu::BaseMutex,
-      public PresentationFactoryInterfaceBase
+class PresentationFactory final
+    : public PresentationFactoryInterfaceBase
 {
 public:
     PresentationFactory (
         const css::uno::Reference<css::frame::XController>& rxController);
     virtual ~PresentationFactory() override;
 
-    virtual void SAL_CALL disposing() override;
-
     // XResourceFactory
 
     virtual css::uno::Reference<css::drawing::framework::XResource>
@@ -65,6 +61,7 @@ public:
 
     // lang::XEventListener
 
+    using WeakComponentImplHelperBase::disposing;
     virtual void SAL_CALL disposing (
         const css::lang::EventObject& rEventObject) override;
 

Reply via email to