LibreOffice
LibreOffice 24.2 SDK API Reference
|
Implement this interface to expose the hypertext structure of a document. More...
import"XAccessibleHypertext.idl";
Public Member Functions | |
long | getHyperLinkCount () |
Returns the number of links and link groups contained within this hypertext document. More... | |
XAccessibleHyperlink | getHyperLink ([in] long nLinkIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException) |
Return the specified link. More... | |
long | getHyperLinkIndex ([in] long nCharIndex) raises (::com::sun::star::lang::IndexOutOfBoundsException) |
Returns the index of the hyperlink that is associated with this character index. 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... | |
Implement this interface to expose the hypertext structure of a document.
The XAccessibleHypertext interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other (parts of) documents. For supporting the XAccessibleHypertext::getLinkIndex() method of this interface and other character related methods of the XAccessibleHyperlink interface, it is necessary to also support the XAccessibleText interface.
XAccessibleHyperlink getHyperLink | ( | [in] long | nLinkIndex | ) | |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException | |||
) |
Return the specified link.
The returned XAccessibleHyperlink object encapsulates the hyperlink and provides several kinds of information describing it.
nLinkIndex | This index specifies the hyperlink to return. |
long getHyperLinkCount | ( | ) |
Returns the number of links and link groups contained within this hypertext document.
long getHyperLinkIndex | ( | [in] long | nCharIndex | ) | |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException | |||
) |
Returns the index of the hyperlink that is associated with this character index.
In a HTML document this is the case when a <a href> tag spans (includes) the given character index.
nCharIndex | Index of the character for which to return the link index. If the XAccessibleText interface is used to represent the text containing the link, then the character index is only valid if it is greater than or equal to zero and lower than the number of characters in the text. See that interface's documentation for more details. |