[Libreoffice-commits] core.git: vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 31 07:41:52 UTC 2018
vcl/qt5/Qt5AccessibleWidget.cxx | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
New commits:
commit a5123f05769dbecd6af8b7de71d209257be24a8a
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Oct 30 22:37:54 2018 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Oct 31 08:41:22 2018 +0100
qt5 a11y: Add table selection support
Change-Id: I4e655a2b4c6a0057935ac5e47c93b16e763d4357
Reviewed-on: https://gerrit.libreoffice.org/62675
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index bf066f96df54..bb547c6bc974 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
@@ -986,16 +987,22 @@ QString Qt5AccessibleWidget::rowDescription(int row) const
return toQString(xTable->getAccessibleRowDescription(row));
}
-bool Qt5AccessibleWidget::selectColumn(int /* column */)
+bool Qt5AccessibleWidget::selectColumn(int column)
{
- SAL_INFO("vcl.qt5", "Unsupported QAccessibleTableInterface::selectColumn");
- return false;
+ Reference<XAccessibleTableSelection> xTableSelection(m_xAccessible->getAccessibleContext(),
+ UNO_QUERY);
+ if (!xTableSelection.is())
+ return nullptr;
+ return xTableSelection->selectColumn(column);
}
-bool Qt5AccessibleWidget::selectRow(int /* row */)
+bool Qt5AccessibleWidget::selectRow(int row)
{
- SAL_INFO("vcl.qt5", "Unsupported QAccessibleTableInterface::selectRow");
- return false;
+ Reference<XAccessibleTableSelection> xTableSelection(m_xAccessible->getAccessibleContext(),
+ UNO_QUERY);
+ if (!xTableSelection.is())
+ return nullptr;
+ return xTableSelection->selectRow(row);
}
int Qt5AccessibleWidget::selectedCellCount() const
@@ -1053,14 +1060,20 @@ QAccessibleInterface* Qt5AccessibleWidget::summary() const
bool Qt5AccessibleWidget::unselectColumn(int column)
{
- SAL_INFO("vcl.qt5", "Unsupported QAccessibleTableInterface::unselectColumn");
- return false;
+ Reference<XAccessibleTableSelection> xTableSelection(m_xAccessible->getAccessibleContext(),
+ UNO_QUERY);
+ if (!xTableSelection.is())
+ return nullptr;
+ return xTableSelection->unselectColumn(column);
}
bool Qt5AccessibleWidget::unselectRow(int row)
{
- SAL_INFO("vcl.qt5", "Unsupported QAccessibleTableInterface::unselectRow");
- return false;
+ Reference<XAccessibleTableSelection> xTableSelection(m_xAccessible->getAccessibleContext(),
+ UNO_QUERY);
+ if (!xTableSelection.is())
+ return nullptr;
+ return xTableSelection->unselectRow(row);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list