diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-05-07 14:18:51 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-05-09 00:17:59 +0200 |
commit | 6aef5a1e880262354cf739e461a12a0ef9573fef (patch) | |
tree | c80d02d75206bcfc5acbfd4d0518443071fbb370 /vcl/qt5 | |
parent | cad788328ec6ef4b3071cf9002dfac12347562da (diff) |
tdf#118418 implement scrollSubstringTo() for Qt & windows
Use new accessibility scroll type compatible with IAccessible2.
Change-Id: I0967d1c56425e1e860db34f4b9c17427e531fe02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93636
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5AccessibleWidget.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index dd062e369c46..0ffdf102a10a 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/accessibility/AccessibleRelationType.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> +#include <com/sun/star/accessibility/AccessibleScrollType.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/accessibility/XAccessibleAction.hpp> @@ -900,9 +901,11 @@ void Qt5AccessibleWidget::removeSelection(int /* selectionIndex */) { SAL_INFO("vcl.qt5", "Unsupported QAccessibleTextInterface::removeSelection"); } -void Qt5AccessibleWidget::scrollToSubstring(int /* startIndex */, int /* endIndex */) +void Qt5AccessibleWidget::scrollToSubstring(int startIndex, int endIndex) { - SAL_INFO("vcl.qt5", "Unsupported QAccessibleTextInterface::scrollToSubstring"); + Reference<XAccessibleText> xText(m_xAccessible, UNO_QUERY); + if (xText.is()) + xText->scrollSubstringTo(startIndex, endIndex, AccessibleScrollType_SCROLL_ANYWHERE); } void Qt5AccessibleWidget::selection(int selectionIndex, int* startOffset, int* endOffset) const |