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

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

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

diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx 
b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 6b308ae78375..5b4a57337ec0 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -48,8 +48,7 @@ ViewShellWrapper::ViewShellWrapper (
     const std::shared_ptr<ViewShell>& pViewShell,
     const Reference<XResourceId>& rxViewId,
     const Reference<awt::XWindow>& rxWindow)
-    : ViewShellWrapperInterfaceBase(m_aMutex),
-      mpViewShell(pViewShell),
+    : mpViewShell(pViewShell),
       mpSlideSorterViewShell(
           std::dynamic_pointer_cast< ::sd::slidesorter::SlideSorterViewShell 
>( pViewShell )),
       mxViewId(rxViewId),
@@ -61,10 +60,8 @@ ViewShellWrapper::~ViewShellWrapper()
 {
 }
 
-void SAL_CALL ViewShellWrapper::disposing()
+void ViewShellWrapper::disposing(std::unique_lock<std::mutex>&)
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
-
     SAL_INFO("sd.ui", "disposing ViewShellWrapper " << this);
     Reference<awt::XWindow> xWindow (mxWindow);
     if (xWindow.is())
diff --git a/sd/source/ui/inc/framework/ViewShellWrapper.hxx 
b/sd/source/ui/inc/framework/ViewShellWrapper.hxx
index 4e44f970d32c..43dca4d6754a 100644
--- a/sd/source/ui/inc/framework/ViewShellWrapper.hxx
+++ b/sd/source/ui/inc/framework/ViewShellWrapper.hxx
@@ -24,8 +24,7 @@
 #include <com/sun/star/view/XSelectionSupplier.hpp>
 #include <com/sun/star/awt/XWindowListener.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
 
 #include <memory>
 
@@ -35,7 +34,7 @@ namespace com::sun::star::awt { class XWindow; }
 
 namespace sd::framework {
 
-typedef ::cppu::WeakComponentImplHelper    <   css::lang::XUnoTunnel
+typedef comphelper::WeakComponentImplHelper    <   css::lang::XUnoTunnel
                                             ,   css::awt::XWindowListener
                                             ,   css::view::XSelectionSupplier
                                             ,   
css::drawing::framework::XRelocatableResource
@@ -46,8 +45,7 @@ typedef ::cppu::WeakComponentImplHelper    <   
css::lang::XUnoTunnel
     Most importantly it provides a tunnel to the ViewShell implementation.
     Then it forwards size changes of the pane window to the view shell.
 */
-class ViewShellWrapper  :private cppu::BaseMutex
-                        ,public ViewShellWrapperInterfaceBase
+class ViewShellWrapper final : public ViewShellWrapperInterfaceBase
 {
 public:
     /** Create a new ViewShellWrapper object that wraps the given ViewShell
@@ -67,7 +65,7 @@ public:
         const css::uno::Reference<css::awt::XWindow>& rxWindow);
     virtual ~ViewShellWrapper() override;
 
-    virtual void SAL_CALL disposing() override;
+    virtual void disposing(std::unique_lock<std::mutex>&) override;
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & 
rType ) override;
 
     static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();

Reply via email to