[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 30 09:40:23 UTC 2021


 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |   12 +++++++++---
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx           |    2 ++
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 38f678a357b3f8c179a91da013593156b7f95ab4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 23 13:05:26 2021 +0000
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 30 11:39:39 2021 +0200

    Resolves: tdf#135364 ensure the window is released by a11y dispose
    
    the window dtor wasn't called with a11y enabled, with the side
    effect that the pen color wasn't stored by the dtor
    
    Change-Id: I5f482f53d4d93f1e2632cacf7c0a7407f0df1450
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112955
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 67238cb3154c..66bef0694c28 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -88,13 +88,17 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
     mpViewShell = pViewShell;
 }
 
+void AccessibleDocumentViewBase::ReleaseWindow()
+{
+    SolarMutexGuard g;
+    mpWindow.reset();
+}
+
 AccessibleDocumentViewBase::~AccessibleDocumentViewBase()
 {
     // At this place we should be disposed.  You may want to add a
     // corresponding assertion into the destructor of a derived class.
-
-    SolarMutexGuard g;
-    mpWindow.reset();
+    ReleaseWindow(); // this should already be done by impl_dispose
 }
 
 void AccessibleDocumentViewBase::Init()
@@ -484,6 +488,8 @@ void AccessibleDocumentViewBase::impl_dispose()
     mxController = nullptr;
 
     maShapeTreeInfo.SetDocumentWindow (nullptr);
+
+    ReleaseWindow(); // tdf#135363 - ensure the window is released by dispose
 }
 
 //=====  XEventListener  ======================================================
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 2194dee2f290..44079e305560 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -238,6 +238,8 @@ private:
     virtual void
         implSelect( sal_Int32 nAccessibleChildIndex, bool bSelect ) override;
 
+    void ReleaseWindow();
+
 protected:
     /// The core window that is made accessible.
     VclPtr< ::sd::Window> mpWindow;


More information about the Libreoffice-commits mailing list