ooodev.adapter.ui.ui_configuration_manager_partial module

class ooodev.adapter.ui.ui_configuration_manager_partial.UIConfigurationManagerPartial(component, interface=com.sun.star.ui.XUIConfigurationManager)[source]

Bases: object

Partial Class for XUIConfigurationManager.

Parameters:
  • component (XUIConfigurationManager) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.ui.XUIConfigurationManager)[source]

Constructor

Parameters:
  • component (XUIConfigurationManager) – UNO Component that implements com.sun.star.ui.XUIConfigurationManager.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XUIConfigurationManager.

Return type:

None

create_settings()[source]

Creates an empty settings data container.

Return type:

IndexContainerComp[Any]

get_events_manager()[source]

retrieves the events manager from the user interface configuration manager.

Every user interface configuration manager has one events manager instance which controls the mapping of events to script URLs of a module or document.

Return type:

XInterface

get_image_manager()[source]

retrieves the image manager from the user interface configuration manager.

Every user interface configuration manager has one image manager instance which controls all images of a module or document.

Return type:

XInterface

get_settings(resource_url, writeable)[source]

retrieves the settings of a user interface element.

Raises:
  • com.sun.star.container.NoSuchElementExceptionNoSuchElementException

  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

IndexAccessComp[Any]

Parameters:
  • resource_url (str) –

  • writeable (bool) –

get_short_cut_manager()[source]

Gets the keyboard short cut manager from the user interface configuration manager.

Every user interface configuration manager has one keyboard short cut manager instance which controls all short cuts of a module or document.

Return type:

AcceleratorConfigurationComp

get_ui_elements_info(element_type)[source]

Gets information about all user interface elements within the user interface configuration manager.

The following PropertyValue entries are defined inside the sequence for every user interface element.

Raises:

com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

Tuple[Tuple[PropertyValue, ...], ...]

Parameters:

element_type (int) –

has_settings(resource_url)[source]

determines if the settings of a user interface element is part the user interface configuration manager.

Raises:

com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

bool

Parameters:

resource_url (str) –

insert_settings(new_resource_url, new_data)[source]

Insert the settings of a new user interface element.

If the settings data is already present a com.sun.star.container.ElementExistException is thrown. If the new_resource_url is not valid or describes an unknown type a com.sun.star.lang.IllegalArgumentException is thrown. If the configuration manager is read-only a com.sun.star.lang.IllegalAccessException is thrown.

Raises:
  • com.sun.star.container.ElementExistExceptionElementExistException

  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.lang.IllegalAccessExceptionIllegalAccessException

Return type:

None

Parameters:
  • new_resource_url (str) –

  • new_data (com.sun.star.container.XIndexAccess) –

remove_settings(ResourceURL)[source]

removes the settings of an existing user interface element.

If the settings data cannot be found a com.sun.star.container.NoSuchElementException is thrown. If the ResourceURL is not valid or describes an unknown type a com.sun.star.lang.IllegalArgumentException is thrown. If the configuration manager is read-only a com.sun.star.lang.IllegalAccessException is thrown.

Raises:
  • com.sun.star.container.NoSuchElementExceptionNoSuchElementException

  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.lang.IllegalAccessExceptionIllegalAccessException

Return type:

None

Parameters:

ResourceURL (str) –

replace_settings(resource_url, new_data)[source]

Replaces the settings of a user interface element with new settings.

If the settings data cannot be found a com.sun.star.container.NoSuchElementException is thrown. If the resource_url is not valid or describes an unknown type a com.sun.star.lang.IllegalArgumentException is thrown. If the configuration manager is read-only a com.sun.star.lang.IllegalAccessException is thrown.

Raises:
  • com.sun.star.container.NoSuchElementExceptionNoSuchElementException

  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.lang.IllegalAccessExceptionIllegalAccessException

Return type:

None

Parameters:
  • resource_url (str) –

  • new_data (com.sun.star.container.XIndexAccess) –

reset()[source]

Resets the configuration manager to the default user interface configuration data.

This means that all user interface configuration data of the instance will be removed. A module based user interface configuration manager removes user defined elements, but set all other elements back to default. It is not possible to remove default elements from a module user interface configuration manager.

Return type:

None