ooodev.adapter.text.text_range_partial module

class ooodev.adapter.text.text_range_partial.TextRangePartial(component, interface=com.sun.star.text.XTextRange)[source]

Bases: object

Partial class for XTextRange.

Parameters:
  • component (XTextRange) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.text.XTextRange)[source]

Constructor

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

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

Return type:

None

get_end()[source]

Returns a text range which contains only the end of this text range.

Return type:

TextRangeComp

get_start()[source]

Returns a text range which contains only the start of this text range.

Return type:

TextRangeComp

get_string()[source]

Returns the string of this text range.

Return type:

str

get_text()[source]

Gets the text of the range.

Returns:

The text of the range.

Return type:

XText

set_string(string)[source]

Sets the string of this text range.

The whole string of characters of this piece of text is replaced. All styles are removed when applying this method.

Return type:

None

Parameters:

string (str) –