LibreOffice: XAccessibleTextMarkup Interface Reference

LibreOffice LibreOffice 7.5 SDK API Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
XAccessibleTextMarkup Interface Reference

Implement this interface to expose the text markups of a text. More...

Inheritance diagram for XAccessibleTextMarkup:

## Public Member Functions
long | getTextMarkupCount ([in] long TextMarkupType) raises (::com::sun::star::lang::IllegalArgumentException)
| Returns the number of text markup of the given text markup type of a text.
TextSegment | getTextMarkup ([in] long TextMarkupIndex, [in] long TextMarkupType) raises (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException)
| Returns the text segment of the text markup of the given index and of the given text mark type.
sequence< TextSegment > | getTextMarkupAtIndex ([in] long CharIndex, [in] long TextMarkupType) raises (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException)
| returns a sequence of the text segments of the text markups at the given character index and of the given text markup type.
Public Member Functions inherited from XAccessibleText
long | getCaretPosition ()
| Return the position of the caret.
boolean | setCaretPosition ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Set the position of the caret.
char | getCharacter ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Return the character at the specified position.
sequence<::com::sun::star::beans::PropertyValue > | getCharacterAttributes ([in] long nIndex, [in] sequence< string > aRequestedAttributes) raises (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::beans::UnknownPropertyException)
| Get the attribute set for the specified position.
::com::sun::star::awt::Rectangle | getCharacterBounds ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Return the bounding box of the specified position.
long | getCharacterCount ()
| Return the number of characters in the represented text.
long | getIndexAtPoint ([in] ::com::sun::star::awt::Point aPoint)
| Return the text position for the specified screen position.
string | getSelectedText ()
| Return the selected text.
long | getSelectionStart ()
| Return the position of the start of the selection.
long | getSelectionEnd ()
| Return the position of the end of the selection.
boolean | setSelection ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Set a new selection.
string | getText ()
| Return the whole text.
string | getTextRange ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Return the specified text range.
TextSegment | getTextAtIndex ([in] long nIndex, [in] short nTextType) raises (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException)
| Get a text portion around the given position.
TextSegment | getTextBeforeIndex ([in] long nIndex, [in] short nTextType) raises (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException)
| Get a text portion before the given position.
TextSegment | getTextBehindIndex ([in] long nIndex, [in] short nTextType) raises (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException)
| Get a text portion behind the given position.
boolean | copyText ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Copy the specified text into the clipboard.
boolean | scrollSubstringTo ([in] long nStartIndex, [in] long nEndIndex, [in] AccessibleScrollType aScrollType) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Scroll the specified text to make it visible on screen.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

Implement this interface to expose the text markups of a text.

The XAccessibleTextMarkup interface is the main interface to expose text markups in a text, typically of a text document, that are used to reference other (parts of) documents. For supporting the XAccessibleTextMarkup::getTextMarkupIndex() method of this interface and other character related methods of the XAccessibleTextMarkup interface, it is necessary to also support the XAccessibleText interface.

See also
  XAccessibleText

Since
  OOo 3.0

## Member Function Documentation

## ◆ getTextMarkup()

TextSegment getTextMarkup | ( | [in] long | TextMarkupIndex,
|  | [in] long | TextMarkupType
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException,
|  | ::com::sun::star::lang::IllegalArgumentException
| ) |  |

Returns the text segment of the text markup of the given index and of the given text mark type.

Throws IndexOutOfBoundsException, if given index is out of valid range.

Throws IllegalArgumentException, if given text markup type is out of valid range.

Parameters

  TextMarkupIndex | This index specifies the text markup to return.
  TextMarkupType | This specifies the type of the text markup to be returned - see TextMarkupType.

Returns
  If the given index is in range [0..getTextMarkupCount(TextMarkupType)-1], the text segment - see TextSegment - of the text markup of the given text markup type is returned.

## ◆ getTextMarkupAtIndex()

sequence< TextSegment > getTextMarkupAtIndex | ( | [in] long | CharIndex,
|  | [in] long | TextMarkupType
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException,
|  | ::com::sun::star::lang::IllegalArgumentException
| ) |  |

returns a sequence of the text segments of the text markups at the given character index and of the given text markup type.

Throws IndexOutOfBoundsException, if given character index is out of range [0..number of characters in the text).

Throws IllegalArgumentException, if given text markup type is out of valid range.

Parameters

  CharIndex | This index specifies the character index in the text.
  TextMarkupType | This specifies the type of the text markups to be returned - see TextMarkupType.

Returns
  If character index is in range [0..number of characters in the text-1], a sequence of TextSegments of the text markups at given character index of the given text markup type are returned. The sequence is empty, if no such text markup is found.

## ◆ getTextMarkupCount()

long getTextMarkupCount | ( | [in] long | TextMarkupType | ) |
raises | ( | ::com::sun::star::lang::IllegalArgumentException
| ) |  |

Returns the number of text markup of the given text markup type of a text.

Throws IllegalArgumentException, if given text markup type is out of valid range.

Parameters

  TextMarkupType | This specifies the type of text markups, whose count should be returned - see TextMarkupType.

Returns
  The number of text markup of the given text markup type. Returns 0 if there is no text markup.

The documentation for this interface was generated from the following file:

- com/sun/star/accessibility/XAccessibleTextMarkup.idl