summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-10-30 22:37:54 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-10-31 08:41:22 +0100
commita5123f05769dbecd6af8b7de71d209257be24a8a (patch)
treef968375d73405e295057ccbcfebf2b6fbceb7377 /vcl
parentaca430292fc287e110fe3a7a91c6a61371ab8689 (diff)
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@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qt5/Qt5AccessibleWidget.cxx33
1 files changed, 23 insertions, 10 deletions
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: */