LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XAccessibleEditableText Interface Reference

Implement this interface to give read and write access to a text representation. More...

`import"XAccessibleEditableText.idl";`

Inheritance diagram for XAccessibleEditableText:

## Public Member Functions
boolean | cutText ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Copies the text range into the clipboard. More...
boolean | pasteText ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Pastes text from the clipboard. More...
boolean | deleteText ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Deletes a range of text. More...
boolean | insertText ([in] string sText, [in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Inserts text at the specified position. More...
boolean | replaceText ([in] long nStartIndex, [in] long nEndIndex, [in] string sReplacement) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Replaces text. More...
boolean | setAttributes ([in] long nStartIndex, [in] long nEndIndex, [in] sequence<::com::sun::star::beans::PropertyValue > aAttributeSet) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Replaces the attributes of a text range by the given set of attributes. More...
boolean | setText ([in] string sText)
| Replaces the whole text with the given text. More...
Public Member Functions inherited from XAccessibleText
long | getCaretPosition ()
| Return the position of the caret. More...
boolean | setCaretPosition ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Set the position of the caret. More...
char | getCharacter ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Return the character at the specified position. More...
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. More...
::com::sun::star::awt::Rectangle | getCharacterBounds ([in] long nIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Return the bounding box of the specified position. More...
long | getCharacterCount ()
| Return the number of characters in the represented text. More...
long | getIndexAtPoint ([in] ::com::sun::star::awt::Point aPoint)
| Return the text position for the specified screen position. More...
string | getSelectedText ()
| Return the selected text. More...
long | getSelectionStart ()
| Return the position of the start of the selection. More...
long | getSelectionEnd ()
| Return the position of the end of the selection. More...
boolean | setSelection ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Set a new selection. More...
string | getText ()
| Return the whole text. More...
string | getTextRange ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Return the specified text range. More...
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. More...
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. More...
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. More...
boolean | copyText ([in] long nStartIndex, [in] long nEndIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Copy the specified text into the clipboard. More...
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. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Implement this interface to give read and write access to a text representation.

This interface is typically used in conjunction with the XAccessibleText interface and extends it with the ability to modify the text represented by that interface.

Since
  OOo 1.1.2

## Member Function Documentation

## ◆ cutText()

boolean cutText | ( | [in] long | nStartIndex,
|  | [in] long | nEndIndex
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Copies the text range into the clipboard.

The specified text between and including the two given indices is copied into the system clipboard and is deleted afterwards from the text represented by this object. This is equivalent to calling first XAccessibleText::copyText() and then XAccessibleEditableText::deleteText() with the given start and end indices.

The text indices are interpreted like those in the XAccessibleText::getTextRange() method.

Parameters

  nStartIndex | Start index of the text to moved into the clipboard. The valid range is 0..length.
  nEndIndex | End index of the text to moved into the clipboard. The valid range is 0..length.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the indices are invalid

## ◆ deleteText()

boolean deleteText | ( | [in] long | nStartIndex,
|  | [in] long | nEndIndex
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Deletes a range of text.

The text between and including the two given indices is deleted from the text represented by this object.

The text indices are interpreted like those in the XAccessibleText::getTextRange() method.

Parameters

  nStartIndex | Start index of the text to be deleted. The valid range is 0..length.
  nEndIndex | End index of the text to be deleted. The valid range is 0..length.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the indices are invalid

## ◆ insertText()

boolean insertText | ( | [in] string | sText,
|  | [in] long | nIndex
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Inserts text at the specified position.

The specified string is inserted at the given index into the text represented by this object.

Parameters

  sText | Text that is inserted.
  nIndex | Index at which to insert the text. The valid range is 0..length.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the indices are invalid

## ◆ pasteText()

boolean pasteText | ( | [in] long | nIndex | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Pastes text from the clipboard.

The text in the system clipboard is pasted into the text represented by this object at the given index. This method is similar to the XAccessibleEditableText::insertText() method. If the index is not valid then the system clipboard text is not inserted.

Parameters

  nIndex | Index at which to insert the text from the system clipboard into the text represented by this object. The valid range is 0..length.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the index is invalid

## ◆ replaceText()

boolean replaceText | ( | [in] long | nStartIndex,
|  | [in] long | nEndIndex,
|  | [in] string | sReplacement
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Replaces text.

The text between the two given indices is replaced by the specified replacement string. This method is equivalent to calling first XAccessibleEditableText::deleteText() with the two indices and afterwards calling XAccessibleEditableText::insertText() with the replacement text and the start index.

The text indices are interpreted like those in the XAccessibleText::getTextRange() method.

Parameters

  nStartIndex | Start index of the text to be replaced. The valid range is 0..length.
  nEndIndex | Start index of the text to be replaced. The valid range is 0..length.
  sReplacement | The Text that replaces the text between the given indices.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the indices are invalid

## ◆ setAttributes()

boolean setAttributes | ( | [in] long | nStartIndex,
|  | [in] long | nEndIndex,
|  | [in] sequence<::com::sun::star::beans::PropertyValue > | aAttributeSet
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Replaces the attributes of a text range by the given set of attributes.

Sets the attributes for the text between and including the two given indices to those given. The old attributes of this text portion are replaced by the new list of attributes.

The text indices are interpreted like those in the XAccessibleText::getTextRange() method.

Parameters

  nStartIndex | Start index of the text whose attributes are modified. The valid range is 0..length.
  nEndIndex | Start index of the text whose attributes are modified. The valid range is 0..length.
  aAttributeSet | Set of attributes that replaces the old list of attributes of the specified text portion.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the indices are invalid

## ◆ setText()

boolean setText | ( | [in] string | sText | ) |

Replaces the whole text with the given text.

The text content of this object is set to the given string.

Parameters

  sText | The new text that replaces the old text.

Returns
  Returns a flag that indicates whether the operation has been executed successfully.

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

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