diff options
author | Colomban Wendling <cwendling@hypra.fr> | 2020-04-30 10:49:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-05-07 12:11:33 +0200 |
commit | b46a0a7f9f88a0213b0a5ca2712b6eb93b74d088 (patch) | |
tree | af83d20d3c08508268c465a7c6983db294f64559 /include | |
parent | e420b89a698f50b174422b962a24e2a21672a178 (diff) |
tdf#118418 implement scrollSubstringTo() for gtk
Define & use new accessibility scroll type compatible with IAccessible2
and extend the XAccessibleText interface to require scrollSubstringTo().
Co-authored-by: Martin Pieuchot <mpi@grenadille.net>
Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/AccessibleEditableTextPara.hxx | 2 | ||||
-rw-r--r-- | include/editeng/AccessibleStaticTextBase.hxx | 2 | ||||
-rw-r--r-- | include/svx/AccessibleShape.hxx | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/include/editeng/AccessibleEditableTextPara.hxx b/include/editeng/AccessibleEditableTextPara.hxx index f6d77171c1b3..34fab512fbcb 100644 --- a/include/editeng/AccessibleEditableTextPara.hxx +++ b/include/editeng/AccessibleEditableTextPara.hxx @@ -28,6 +28,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/accessibility/AccessibleScrollType.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/accessibility/XAccessibleContext.hpp> #include <com/sun/star/accessibility/XAccessibleComponent.hpp> @@ -139,6 +140,7 @@ namespace accessibility /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine) virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override; virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override; + virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override; // XAccessibleEditableText virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override; diff --git a/include/editeng/AccessibleStaticTextBase.hxx b/include/editeng/AccessibleStaticTextBase.hxx index 0ecf3021a2f4..2f2095f073ae 100644 --- a/include/editeng/AccessibleStaticTextBase.hxx +++ b/include/editeng/AccessibleStaticTextBase.hxx @@ -24,6 +24,7 @@ #include <tools/gen.hxx> #include <cppuhelper/implbase2.hxx> #include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/accessibility/AccessibleScrollType.hpp> #include <com/sun/star/accessibility/XAccessibleText.hpp> #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> #include <com/sun/star/accessibility/TextSegment.hpp> @@ -198,6 +199,7 @@ namespace accessibility virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override; /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override; + virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override; // XAccessibleTextAttributes virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getDefaultAttributes( const css::uno::Sequence< OUString >& RequestedAttributes ) override; diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx index 487c7aeabd80..046463e666c0 100644 --- a/include/svx/AccessibleShape.hxx +++ b/include/svx/AccessibleShape.hxx @@ -21,6 +21,7 @@ #ifndef INCLUDED_SVX_ACCESSIBLESHAPE_HXX #define INCLUDED_SVX_ACCESSIBLESHAPE_HXX +#include <com/sun/star/accessibility/AccessibleScrollType.hpp> #include <com/sun/star/accessibility/TextSegment.hpp> #include <com/sun/star/accessibility/XAccessibleSelection.hpp> #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp> @@ -350,6 +351,7 @@ public: virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override; virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override; virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override; + virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override; //===== Misc ======================================================== |