diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-01 19:09:48 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-08-02 05:09:33 +0200 |
commit | de9de202a6336f3ba8da0d2deeb8e1e34ac569ab (patch) | |
tree | 77042f750c447662f22f867fd705f313d6eb1d5f /accessibility | |
parent | 256926cace5819b0107e8d24579e05bcab9b5a7e (diff) |
tdf#156473 a11y: Properly retrireve a11y context from XAccessible
... by using `XAccessible::getAccessibleContext` rather
than trying to just query for the `XAccessibleContext`
interface on the `XAccessible` object.
(While in many cases, the class implementing
both interfaces is the same, that doesn't have to be
the case.)
Change-Id: I281082672447c7bfd2812d7f3cd54c74414df66e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155193
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/AccessibleGridControlTable.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 4629a4b3ee66..e0c1a9a1d27f 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -372,7 +372,11 @@ Reference< XAccessibleTable > AccessibleGridControlTable::implGetHeaderBar( sal_Int32 nChildIndex ) { Reference< XAccessible > xRet; - Reference< XAccessibleContext > xContext( m_xParent, uno::UNO_QUERY ); + + if (!m_xParent.is()) + return nullptr; + + Reference<XAccessibleContext> xContext = m_xParent->getAccessibleContext(); if( xContext.is() ) { try |