Link targets

From Apache OpenOffice Wiki
Jump to: navigation, search

The interface 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 returned by the method getLinks() provides access to an array of target types. These types are:

  • Tables
  • Text frame
  • Graphics
  • OLEObjects
  • Sections
  • Headings
  • Bookmarks.

The names of the elements depend on the installed language.

Each returned object supports the interfaces and interface The property set provides the properties LinkDisplayName (string) and LinkDisplayBitmap ( Each of these objects provides an array of targets of the relating type. Each target returned supports the interface and the property LinkDisplayName (string).

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. "Table1".

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