ooodev.adapter.container.name_access_partial module

class ooodev.adapter.container.name_access_partial.NameAccessPartial(component, interface=com.sun.star.container.XNameAccess)[source]

Bases: Generic[T], ElementAccessPartial

Partial Class for XNameAccess.

__init__(component, interface=com.sun.star.container.XNameAccess)[source]

Constructor

Parameters:
  • component (XNameAccess) – UNO Component that implements com.sun.star.container.XNameAccess interface.

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

Return type:

None

get_by_name(name)[source]

Gets the element with the specified name.

Parameters:

name (str) – The name of the element.

Returns:

The element with the specified name.

Return type:

Any

get_element_names()[source]

Gets the names of all elements contained in the container.

Returns:

The names of all elements.

Return type:

tuple[str, …]

has_by_name(name)[source]

Checks if the container has an element with the specified name.

Parameters:

name (str) – The name of the element.

Returns:

True if the container has an element with the specified name, otherwise False.

Return type:

bool

ooodev.adapter.container.name_access_partial.get_builder(component)[source]

Get the builder for the component.

Parameters:

component (Any) – The component.

Returns:

Builder instance.

Return type:

DefaultBuilder

ooodev.adapter.container.name_access_partial.T = TypeVar(T)

Type:    TypeVar

Invariant TypeVar.