summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-23 13:05:26 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2021-03-30 11:39:25 +0200
commitc9f08c3008984039f18c23aab3f6690e3ae27649 (patch)
treed06c5fc156ecd74f80ef39ab97bd9082b17d74db
parentsw fr_FR AutoCorrect: fix crash using "Apply and Edit changes" (diff)
downloadcore-c9f08c3008984039f18c23aab3f6690e3ae27649.tar.gz
core-c9f08c3008984039f18c23aab3f6690e3ae27649.zip
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/+/112956 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx12
-rw-r--r--sd/source/ui/inc/AccessibleDocumentViewBase.hxx2
2 files changed, 11 insertions, 3 deletions
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 67c1a1fb08b7..17036e3e6cea 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;