summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-09-09 22:22:09 +0300
committerMichael Weghorn <m.weghorn@posteo.de>2023-09-10 07:09:14 +0200
commit7737dab14baea000810965c572f06a10a94f73df (patch)
tree8d626e772ce5d297892860d8054e623c3d04422b /svtools
parent8740a1db21298be2dc81a8388a2df3aa8451531c (diff)
tdf#157160 a11y: Don't assert ValueSetAcc parent on add/remove
After commit 2f5e7a07775690e57d639eeca7a1e41733fa93a9 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 7 08:09:31 2023 +0200 tdf#157092 a11y Let only drawing area dispose its ValueSet acc had fixed a crash when using the search feature with the Qt-based VCL plugins, the previous `DBG_ASSERT` that got promoted to a real assert with the above commit got triggered now that a11y CHILD events for removed children are handled since commit be8b031d8b3c66b223ea2478f1129427f3a362bd Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 7 09:51:38 2023 +0200 qt a11y: Forward CHILD event for removed child , s. the backtrace in tdf#157160. Since the ValueSet isn't needed for this, and at least removing a listener after the ValueSet has been dropped even seems logical if it's a valid use case to delete the ValueSet before e.g. hiding the window (s.a. comment in above-mentioned 2f5e7a07775690e57d639eeca7a1e41733fa93a9), don't check for it, but only that the object hasn't been disposed yet (as was effectively the case before 2f5e7a07775690e57d639eeca7a1e41733fa93a9, when only a SAL_WARN would have been triggered). Change-Id: I5be0a44decbe4508f4a419ec3dca9f8aaf85e951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156782 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueacc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 2f897ae015ce..57c1777d4800 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -632,7 +632,7 @@ lang::Locale SAL_CALL ValueSetAcc::getLocale()
void SAL_CALL ValueSetAcc::addAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener )
{
- ThrowIfDisposed();
+ ThrowIfDisposed(false);
std::unique_lock aGuard (m_aMutex);
if( !rxListener.is() )
@@ -656,7 +656,7 @@ void SAL_CALL ValueSetAcc::addAccessibleEventListener( const uno::Reference< acc
void SAL_CALL ValueSetAcc::removeAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener )
{
- ThrowIfDisposed();
+ ThrowIfDisposed(false);
std::unique_lock aGuard (m_aMutex);
if( rxListener.is() )