XAccessibleHyperlink

From Apache OpenOffice Wiki
Jump to: navigation, search



Hyperlinks contained in a hypertext document are modeled by the XAccessibleHyperlink interface. In its simplest form, a hyperlink corresponds to an HTML link. However, there may be more complex hyperlinks where there is more than one action assigned to a single hyperlink. An example of this is HTML image maps. To give access to the actions, the interface is derived from the com.sun.star.accessibility.XAccessibleAction interface. In addition to the information provided by the com.sun.star.accessibility.XAccessibleAction interface, you can request an action's anchor and object. A typical return value of the getAccessibleActionAnchor() function for HTML links would be the text between the <a href…> and </a> tags. Likewise, the getAccessibleActionObject() function returns a HTML link's URL.

A hyperlink specifies its text relative to the enclosing hypertext by providing a start- and end index through the getStartIndex() and getEndIndex() functions. You can ask a link about the validity of the referenced target by calling its isValid() function. Note that this state is volatile and may change without notice.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages