ooodev.adapter.script.library_container2_partial module
- class ooodev.adapter.script.library_container2_partial.LibraryContainer2Partial(component, interface=com.sun.star.script.XLibraryContainer2)[source]
Bases:
LibraryContainerPartial
Partial class for XLibraryContainer2.
- Parameters:
component (XLibraryContainer2) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.script.XLibraryContainer2)[source]
Constructor
- Parameters:
component (XLibraryContainer2) – UNO Component that implements
com.sun.star.script.XLibraryContainer2
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XLibraryContainer2
.
- Return type:
None
- get_library_link_url(name)[source]
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
- Raises:
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
com.sun.star.container.NoSuchElementException –
NoSuchElementException
- Return type:
str
- Parameters:
name (str) –
- is_library_link(name)[source]
returns true if the accessed library item is a link, e.g., created by createLibraryLink, otherwise false.
- Raises:
com.sun.star.container.NoSuchElementException –
NoSuchElementException
- Return type:
bool
- Parameters:
name (str) –
- is_library_read_only(name)[source]
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)
- Raises:
com.sun.star.container.NoSuchElementException –
NoSuchElementException
- Return type:
bool
- Parameters:
name (str) –
- rename_library(name, new_name)[source]
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.
- Raises:
com.sun.star.container.NoSuchElementException –
NoSuchElementException
com.sun.star.container.ElementExistException –
ElementExistException
- Return type:
None
- Parameters:
name (str) –
new_name (str) –
- set_library_read_only(name, read_only)[source]
Sets the accessed library item (library or library link) to read only according to the flag bReadOnly (true means read only)
- Raises:
com.sun.star.container.NoSuchElementException –
NoSuchElementException
- Return type:
None
- Parameters:
name (str) –
read_only (bool) –