The interface com.sun.star.document.XLinkTargetSupplier of the document model provides all elements of the document that can be used as link targets. These targets can be used for load URLs and sets the selection to a certain position object inside of a document. An example of a URL containing a link target is "file:///c:/documents/document1|bookmarkname".
This interface is used from the hyperlink dialog to detect the links available inside of a document.
The interface com.sun.star.container.XNameAccess returned by the method
getLinks() provides access to an array of target types. These types are:
- Text frame
The names of the elements depend on the installed language.
Each returned object supports the interfaces com.sun.star.beans.XPropertySet and interface com.sun.star.container.XNameAccess. The property set provides the properties
LinkDisplayName (string) and
LinkDisplayBitmap (com.sun.star.awt.XBitmap). Each of these objects provides an array of targets of the relating type. Each target returned supports the interface com.sun.star.beans.XPropertySet and the property
The name of the objects is the bookmark to be added to the document URL, for example, "Table1|table". The
LinkDisplayName contains the name of the object, e.g. "
|Content on this page is licensed under the Public Documentation License (PDL).|