20#ifndef INCLUDED_COMPHELPER_ACCESSIBLETEXTHELPER_HXX
21#define INCLUDED_COMPHELPER_ACCESSIBLETEXTHELPER_HXX
23#include <com/sun/star/accessibility/XAccessibleText.hpp>
24#include <com/sun/star/accessibility/TextSegment.hpp>
46 css::uno::Reference < css::i18n::XCharacterClassification >
m_xCharClass;
52 css::uno::Reference < css::i18n::XBreakIterator >
const & implGetBreakIterator();
53 css::uno::Reference < css::i18n::XCharacterClassification >
const & implGetCharacterClassification();
54 static bool implIsValidBoundary( css::i18n::Boundary
const & rBoundary, sal_Int32 nLength );
55 static bool implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength );
56 static bool implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength );
57 static sal_Unicode implGetCharacter( std::u16string_view rText, sal_Int32 nIndex );
58 static OUString implGetTextRange( std::u16string_view rText, sal_Int32 nStartIndex, sal_Int32 nEndIndex );
62 void implGetGlyphBoundary(
const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
63 bool implGetWordBoundary(
const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
64 void implGetSentenceBoundary(
const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
65 virtual void implGetParagraphBoundary(
const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
66 virtual void implGetLineBoundary(
const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
73 OUString getSelectedText();
75 sal_Int32 getSelectionStart();
77 sal_Int32 getSelectionEnd();
81 css::accessibility::TextSegment getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType );
85 css::accessibility::TextSegment getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType );
89 css::accessibility::TextSegment getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType );
103 static bool implInitTextChangedEvent(
104 std::u16string_view rOldString,
105 std::u16string_view rNewString,
106 css::uno::Any& rDeleted,
107 css::uno::Any& rInserted);
118 OAccessibleExtendedComponentHelper,
119 css::accessibility::XAccessibleText>,
133 virtual OUString SAL_CALL getSelectedText()
override;
134 virtual sal_Int32 SAL_CALL getSelectionStart()
override;
135 virtual sal_Int32 SAL_CALL getSelectionEnd()
override;
136 virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType )
override;
137 virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType )
override;
138 virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType )
override;
a helper class for implementing an AccessibleExtendedComponent which at the same time supports an XAc...
OAccessibleTextHelper(OAccessibleTextHelper &&)=delete
OAccessibleTextHelper(OAccessibleTextHelper const &)=delete
base class encapsulating common functionality for the helper classes implementing the XAccessibleText
css::uno::Reference< css::i18n::XBreakIterator > m_xBreakIter
virtual OUString implGetText()=0
virtual void implGetSelection(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex)=0
virtual css::lang::Locale implGetLocale()=0
css::uno::Reference< css::i18n::XCharacterClassification > m_xCharClass
#define COMPHELPER_DLLPUBLIC