LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XAccessibleTextMarkup Interface Reference

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

import"XAccessibleTextMarkup.idl";

Inheritance diagram for XAccessibleTextMarkup:
XAccessibleText XInterface

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. More...
 
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. More...
 
sequence< TextSegmentgetTextMarkupAtIndex ([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. 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::PropertyValuegetCharacterAttributes ([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 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
TextMarkupIndexThis index specifies the text markup to return.
TextMarkupTypeThis 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
CharIndexThis index specifies the character index in the text.
TextMarkupTypeThis 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
TextMarkupTypeThis 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: