ooodev.adapter.util.replaceable_partial module

class ooodev.adapter.util.replaceable_partial.ReplaceablePartial(component, interface=com.sun.star.util.XReplaceable)[source]

Bases: SearchablePartial

Partial Class XReplaceable.

Parameters:
  • component (XReplaceable) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.util.XReplaceable)[source]

Constructor

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

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

Return type:

None

create_replace_descriptor()[source]

Creates a descriptor which contains properties that specify a search in this container.

Returns:

The replace descriptor.

Return type:

ReplaceDescriptorComp

replace_all(desc)[source]

Searches and replace all occurrences of whatever is specified.

Returns:

The number of replacements.

Return type:

int

Parameters:

desc (com.sun.star.util.XSearchDescriptor) –

set_replace_string(replace)[source]

Sets the string to replace the found string with.

Parameters:

replace (str) – The string to replace the found string with.

Return type:

None