LibreOffice: XLibraryContainer2 Interface Reference

LibreOffice LibreOffice 7.6 SDK API Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
XLibraryContainer2 Interface Referencepublished

Extension of XLibraryContainer to provide additional information about the libraries contained in a library container. More...

`import <XLibraryContainer2.idl;`

Inheritance diagram for XLibraryContainer2:

## Public Member Functions
boolean | isLibraryLink ([in] string Name) raises ( com::sun::star::container::NoSuchElementException )
| returns true if the accessed library item is a link, e.g., created by createLibraryLink, otherwise false.
string | getLibraryLinkURL ([in] string Name) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::NoSuchElementException )
| returns the location of the library link target.
boolean | isLibraryReadOnly ([in] string Name) raises ( com::sun::star::container::NoSuchElementException )
| returns true if the accessed library item (library or library link) is read only.
void | setLibraryReadOnly ([in] string Name, [in] boolean bReadOnly) raises ( com::sun::star::container::NoSuchElementException )
| Sets the accessed library item (library or library link) to read only according to the flag bReadOnly (true means read only)
void | renameLibrary ([in] string Name, [in] string NewName) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::container::ElementExistException )
| renames the library item with the specified name.
Public Member Functions inherited from XLibraryContainer
com::sun::star::container::XNameContainer | createLibrary ([in] string Name) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException )
| Creates a new library.
com::sun::star::container::XNameAccess | createLibraryLink ([in] string Name, [in] string StorageURL, [in] boolean ReadOnly) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException )
| Creates a link to an "external" library that then can be accessed using this library manager.
void | removeLibrary ([in] string Name) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
| removes the library item with the specified name.
boolean | isLibraryLoaded ([in] string Name) raises ( com::sun::star::container::NoSuchElementException )
| returns true if the accessed library is already loaded from the storage, otherwise false.
void | loadLibrary ([in] string Name) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
| Causes the accessed library to be loaded from its storage if it hasn't already been loaded.
Public Member Functions inherited from XNameAccess
any | getByName ([in] string aName) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
sequence< string > | getElementNames ()
boolean | hasByName ([in] string aName)
Public Member Functions inherited from XElementAccess
type | getElementType ()
boolean | hasElements ()
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

Extension of XLibraryContainer to provide additional information about the libraries contained in a library container.

## Member Function Documentation

## ◆ getLibraryLinkURL()

string getLibraryLinkURL | ( | [in] string | Name | ) |
raises | ( | com::sun::star::lang::IllegalArgumentException,
|  | com::sun::star::container::NoSuchElementException
| ) |  |

returns the location of the library link target.

Should return the same URL that was passed to createLibraryLink in the StorageURL parameter.

If the accessed library item exists but isn't a link, an IllegalArgumentException is thrown

## ◆ isLibraryLink()

boolean isLibraryLink | ( | [in] string | Name | ) |
raises | ( | com::sun::star::container::NoSuchElementException
| ) |  |

returns true if the accessed library item is a link, e.g., created by createLibraryLink, otherwise false.

## ◆ isLibraryReadOnly()

boolean isLibraryReadOnly | ( | [in] string | Name | ) |
raises | ( | com::sun::star::container::NoSuchElementException
| ) |  |

returns true if the accessed library item (library or library link) is read only.

A library can be read only because it was set to read only using the methods provided by this interface or because of other reasons depending on the implementation (e.g., file system write protection)

## ◆ renameLibrary()

void renameLibrary | ( | [in] string | Name,
|  | [in] string | NewName
| ) |  |
raises | ( | com::sun::star::container::NoSuchElementException,
|  | com::sun::star::container::ElementExistException
| ) |  |

renames the library item with the specified name.

If the accessed library item is a link only the link is renamed, not the target library. If a library with the new name exists already a com::sun::star::container::ElementExistException is thrown.

## ◆ setLibraryReadOnly()

void setLibraryReadOnly | ( | [in] string | Name,
|  | [in] boolean | bReadOnly
| ) |  |
raises | ( | com::sun::star::container::NoSuchElementException
| ) |  |

Sets the accessed library item (library or library link) to read only according to the flag bReadOnly (true means read only)

The documentation for this interface was generated from the following file:

- com/sun/star/script/XLibraryContainer2.idl