LibreOffice Module comphelper (master)  1
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
comphelper::OCommonAccessibleText Class Referenceabstract

base class encapsulating common functionality for the helper classes implementing the XAccessibleText More...

#include <accessibletexthelper.hxx>

Inheritance diagram for comphelper::OCommonAccessibleText:
[legend]

Static Public Member Functions

static bool implInitTextChangedEvent (const OUString &rOldString, const OUString &rNewString, css::uno::Any &rDeleted, css::uno::Any &rInserted)
 Helper method, that detects the difference between two strings and returns the deleted selection and the inserted selection if available. More...
 

Protected Member Functions

 OCommonAccessibleText ()
 
virtual ~OCommonAccessibleText ()
 
css::uno::Reference< css::i18n::XBreakIterator > const & implGetBreakIterator ()
 
css::uno::Reference< css::i18n::XCharacterClassification > const & implGetCharacterClassification ()
 
virtual OUString implGetText ()=0
 
virtual css::lang::Locale implGetLocale ()=0
 
virtual void implGetSelection (sal_Int32 &nStartIndex, sal_Int32 &nEndIndex)=0
 
void implGetGlyphBoundary (const OUString &rText, css::i18n::Boundary &rBoundary, sal_Int32 nIndex)
 
bool implGetWordBoundary (const OUString &rText, css::i18n::Boundary &rBoundary, sal_Int32 nIndex)
 
void implGetSentenceBoundary (const OUString &rText, css::i18n::Boundary &rBoundary, sal_Int32 nIndex)
 
virtual void implGetParagraphBoundary (const OUString &rText, css::i18n::Boundary &rBoundary, sal_Int32 nIndex)
 
virtual void implGetLineBoundary (const OUString &rText, css::i18n::Boundary &rBoundary, sal_Int32 nIndex)
 
OUString getSelectedText ()
 non-virtual versions of the methods More...
 
sal_Int32 getSelectionStart ()
 
sal_Int32 getSelectionEnd ()
 
css::accessibility::TextSegment getTextAtIndex (sal_Int32 nIndex, sal_Int16 aTextType)
 
css::accessibility::TextSegment getTextBeforeIndex (sal_Int32 nIndex, sal_Int16 aTextType)
 
css::accessibility::TextSegment getTextBehindIndex (sal_Int32 nIndex, sal_Int16 aTextType)
 

Static Protected Member Functions

static bool implIsValidBoundary (css::i18n::Boundary const &rBoundary, sal_Int32 nLength)
 
static bool implIsValidIndex (sal_Int32 nIndex, sal_Int32 nLength)
 
static bool implIsValidRange (sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength)
 
static sal_Unicode implGetCharacter (const OUString &rText, sal_Int32 nIndex)
 
static OUString implGetTextRange (const OUString &rText, sal_Int32 nStartIndex, sal_Int32 nEndIndex)
 

Private Attributes

css::uno::Reference< css::i18n::XBreakIterator > m_xBreakIter
 
css::uno::Reference< css::i18n::XCharacterClassification > m_xCharClass
 

Detailed Description

base class encapsulating common functionality for the helper classes implementing the XAccessibleText

Definition at line 42 of file accessibletexthelper.hxx.

Constructor & Destructor Documentation

comphelper::OCommonAccessibleText::OCommonAccessibleText ( )
protected

Definition at line 48 of file accessibletexthelper.cxx.

comphelper::OCommonAccessibleText::~OCommonAccessibleText ( )
protectedvirtual

Definition at line 53 of file accessibletexthelper.cxx.

Member Function Documentation

OUString comphelper::OCommonAccessibleText::getSelectedText ( )
protected

non-virtual versions of the methods

Exceptions
css::lang::IndexOutOfBoundsException
css::uno::RuntimeException

Definition at line 226 of file accessibletexthelper.cxx.

References implGetSelection(), implGetText(), and implGetTextRange().

Referenced by comphelper::OAccessibleTextHelper::getSelectedText().

sal_Int32 comphelper::OCommonAccessibleText::getSelectionEnd ( )
protected
Exceptions
css::uno::RuntimeException

Definition at line 257 of file accessibletexthelper.cxx.

References implGetSelection().

Referenced by comphelper::OAccessibleTextHelper::getSelectionEnd().

sal_Int32 comphelper::OCommonAccessibleText::getSelectionStart ( )
protected
Exceptions
css::uno::RuntimeException

Definition at line 246 of file accessibletexthelper.cxx.

References implGetSelection().

Referenced by comphelper::OAccessibleTextHelper::getSelectionStart().

TextSegment comphelper::OCommonAccessibleText::getTextAtIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
protected
Exceptions
css::lang::IndexOutOfBoundsException
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 280 of file accessibletexthelper.cxx.

References implGetGlyphBoundary(), implGetLineBoundary(), implGetParagraphBoundary(), implGetSentenceBoundary(), implGetText(), implGetWordBoundary(), implIsValidBoundary(), implIsValidIndex(), and nLength.

Referenced by comphelper::OAccessibleTextHelper::getTextAtIndex().

TextSegment comphelper::OCommonAccessibleText::getTextBeforeIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
protected
Exceptions
css::lang::IndexOutOfBoundsException
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 384 of file accessibletexthelper.cxx.

References implGetGlyphBoundary(), implGetLineBoundary(), implGetParagraphBoundary(), implGetSentenceBoundary(), implGetText(), implGetWordBoundary(), implIsValidBoundary(), implIsValidIndex(), and nLength.

Referenced by comphelper::OAccessibleTextHelper::getTextBeforeIndex().

TextSegment comphelper::OCommonAccessibleText::getTextBehindIndex ( sal_Int32  nIndex,
sal_Int16  aTextType 
)
protected
Exceptions
css::lang::IndexOutOfBoundsException
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 508 of file accessibletexthelper.cxx.

References implGetGlyphBoundary(), implGetLineBoundary(), implGetParagraphBoundary(), implGetSentenceBoundary(), implGetText(), implGetWordBoundary(), implIsValidBoundary(), implIsValidIndex(), and nLength.

Referenced by comphelper::OAccessibleTextHelper::getTextBehindIndex().

Reference< i18n::XBreakIterator > const & comphelper::OCommonAccessibleText::implGetBreakIterator ( )
protected
sal_Unicode comphelper::OCommonAccessibleText::implGetCharacter ( const OUString &  rText,
sal_Int32  nIndex 
)
staticprotected

Definition at line 218 of file accessibletexthelper.cxx.

References implIsValidIndex().

Reference< i18n::XCharacterClassification > const & comphelper::OCommonAccessibleText::implGetCharacterClassification ( )
protected

Definition at line 70 of file accessibletexthelper.cxx.

References comphelper::getProcessComponentContext(), and m_xCharClass.

Referenced by implGetWordBoundary().

void comphelper::OCommonAccessibleText::implGetGlyphBoundary ( const OUString &  rText,
css::i18n::Boundary &  rBoundary,
sal_Int32  nIndex 
)
protected
void comphelper::OCommonAccessibleText::implGetLineBoundary ( const OUString &  rText,
css::i18n::Boundary &  rBoundary,
sal_Int32  nIndex 
)
protectedvirtual

Definition at line 201 of file accessibletexthelper.cxx.

References implIsValidIndex(), and nLength.

Referenced by getTextAtIndex(), getTextBeforeIndex(), and getTextBehindIndex().

virtual css::lang::Locale comphelper::OCommonAccessibleText::implGetLocale ( )
protectedpure virtual
void comphelper::OCommonAccessibleText::implGetParagraphBoundary ( const OUString &  rText,
css::i18n::Boundary &  rBoundary,
sal_Int32  nIndex 
)
protectedvirtual

Definition at line 178 of file accessibletexthelper.cxx.

References implIsValidIndex().

Referenced by getTextAtIndex(), getTextBeforeIndex(), and getTextBehindIndex().

virtual void comphelper::OCommonAccessibleText::implGetSelection ( sal_Int32 &  nStartIndex,
sal_Int32 &  nEndIndex 
)
protectedpure virtual
void comphelper::OCommonAccessibleText::implGetSentenceBoundary ( const OUString &  rText,
css::i18n::Boundary &  rBoundary,
sal_Int32  nIndex 
)
protected
virtual OUString comphelper::OCommonAccessibleText::implGetText ( )
protectedpure virtual
OUString comphelper::OCommonAccessibleText::implGetTextRange ( const OUString &  rText,
sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
)
staticprotected

Definition at line 268 of file accessibletexthelper.cxx.

References implIsValidRange().

Referenced by getSelectedText().

bool comphelper::OCommonAccessibleText::implGetWordBoundary ( const OUString &  rText,
css::i18n::Boundary &  rBoundary,
sal_Int32  nIndex 
)
protected
bool comphelper::OCommonAccessibleText::implInitTextChangedEvent ( const OUString &  rOldString,
const OUString &  rNewString,
css::uno::Any &  rDeleted,
css::uno::Any &  rInserted 
)
static

Helper method, that detects the difference between two strings and returns the deleted selection and the inserted selection if available.

Returns
true if there are differences between the two strings and false if both are equal
See also
css::accessibility::AccessibleEventId css::accessibility::TextSegment

Definition at line 636 of file accessibletexthelper.cxx.

bool comphelper::OCommonAccessibleText::implIsValidBoundary ( css::i18n::Boundary const &  rBoundary,
sal_Int32  nLength 
)
staticprotected

Definition at line 81 of file accessibletexthelper.cxx.

Referenced by getTextAtIndex(), getTextBeforeIndex(), and getTextBehindIndex().

bool comphelper::OCommonAccessibleText::implIsValidIndex ( sal_Int32  nIndex,
sal_Int32  nLength 
)
staticprotected
bool comphelper::OCommonAccessibleText::implIsValidRange ( sal_Int32  nStartIndex,
sal_Int32  nEndIndex,
sal_Int32  nLength 
)
staticprotected

Definition at line 93 of file accessibletexthelper.cxx.

Referenced by implGetTextRange().

Member Data Documentation

css::uno::Reference< css::i18n::XBreakIterator > comphelper::OCommonAccessibleText::m_xBreakIter
private

Definition at line 45 of file accessibletexthelper.hxx.

Referenced by implGetBreakIterator().

css::uno::Reference< css::i18n::XCharacterClassification > comphelper::OCommonAccessibleText::m_xCharClass
private

Definition at line 46 of file accessibletexthelper.hxx.

Referenced by implGetCharacterClassification().


The documentation for this class was generated from the following files: