accessibility/source/extended/AccessibleGridControlTable.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit de9de202a6336f3ba8da0d2deeb8e1e34ac569ab Author: Michael Weghorn <[email protected]> AuthorDate: Tue Aug 1 19:09:48 2023 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Wed Aug 2 05:09:33 2023 +0200 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 <[email protected]> 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
