vcl/qt5/QtAccessibleWidget.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit e4066a41406b1ddd454901b4fa718cf9be2746c4 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Jul 5 18:30:02 2022 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Jul 5 20:30:00 2022 +0200 qt a11y: Implement QtAccessibleWidget::table Implement that `QAccessibleTableCellInterface::table` override by returning the parent, if it is a table. This turned out to be the missing piece when working on an implementation for the Qt library to expose the AT-SPI table cell interface for a11y objects that implement `QAccessibleTableCellInterface`, and testing the "GetTable" method by calling `acc.queryTableCell().get_table()` on a selected LO Calc cell in Accerciser's IPython console. Change-Id: I6144c613f31cafc338ccac739cd7db1bf314d4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136836 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 88616a555efd..44d9f896217b 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -1480,8 +1480,15 @@ int QtAccessibleWidget::rowIndex() const QAccessibleInterface* QtAccessibleWidget::table() const { - SAL_WARN("vcl.qt", "Unsupported QAccessibleTableCellInterface::table"); - return nullptr; + Reference<XAccessibleTable> xTable = getAccessibleTableForParent(); + if (!xTable.is()) + return nullptr; + + Reference<XAccessible> xTableAcc(xTable, UNO_QUERY); + if (!xTableAcc.is()) + return nullptr; + + return QAccessible::queryAccessibleInterface(new QtXAccessible(xTableAcc)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
