ooodev.adapter.container.name_container_impl module

class ooodev.adapter.container.name_container_impl.NameContainerImpl(element_type)[source]

Bases: Base, XNameContainer

Class that implements XNameContainer Component.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(element_type)[source]
Parameters:

element_type (Any) –

getByName(aName)[source]
Raises:
  • com.sun.star.container.NoSuchElementExceptionNoSuchElementException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

Any

Parameters:

aName (str) –

getElementNames()[source]

The order of the names is not specified.

Return type:

Tuple[str, ...]

getElementType()[source]

Returns the type of the elements.

Return type:

Any

hasByName(aName)[source]

In many cases the next call is XNameAccess.getByName(). You should optimize this case.

Return type:

bool

Parameters:

aName (str) –

hasElements()[source]

Determines if the container has elements.

Return type:

bool

insertByName(aName, aElement)[source]

inserts the given element at the specified name.

Raises:
  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.container.ElementExistExceptionElementExistException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • aName (str) –

  • aElement (Any) –

removeByName(Name)[source]

removes the element with the specified name.

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

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:

Name (str) –

replaceByName(aName, aElement)[source]

replaces the element with the specified name with the given element.

Raises:
  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.container.NoSuchElementExceptionNoSuchElementException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • aName (str) –

  • aElement (Any) –