ooodev.adapter.text.sentence_cursor_partial module

class ooodev.adapter.text.sentence_cursor_partial.SentenceCursorPartial(component, interface=com.sun.star.text.XSentenceCursor)[source]

Bases: object

Partial class for XSentenceCursor.

Parameters:
  • component (XSentenceCursor) –

  • interface (UnoInterface | None) –

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

Constructor

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

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

Return type:

None

goto_end_of_sentence(expand=False)[source]

Moves the cursor to the end of the sentence.

Parameters:

expand (bool, optional) – If True the range of the cursor will be expanded to the end of the sentence. Default is False.

Returns:

True if the cursor is now at the end of a sentence, False otherwise. If False is returned the cursor will remain at its original position.

Return type:

bool

goto_next_sentence(expand=False)[source]

Moves the cursor to the next sentence.

Parameters:

expand (bool, optional) – If True the range of the cursor will be expanded to the next sentence. Default is False.

Returns:

True if the cursor is now at the start of a sentence, False otherwise. If False is returned the cursor will remain at its original position.

Return type:

bool

goto_previous_sentence(expand=False)[source]

Moves the cursor to the previous sentence.

Parameters:

expand (bool, optional) – If True the range of the cursor will be expanded to the previous sentence. Default is False.

Returns:

True if the cursor is now at the start of a sentence, False otherwise. If False is returned the cursor will remain at its original position.

Return type:

bool

goto_start_of_sentence(expand=False)[source]

Moves the cursor to the start of the sentence.

Parameters:

expand (bool, optional) – If True the range of the cursor will be expanded to the start of the sentence. Default is False.

Returns:

True if the cursor is now at the start of a sentence, False otherwise. If False is returned the cursor will remain at its original position.

Return type:

bool

is_end_of_sentence()[source]

Returns true if the cursor is at the end of a sentence.

Returns:

True if the cursor is at the end of a sentence.

Return type:

bool

is_start_of_sentence()[source]

Returns true if the cursor is at the start of a sentence.

Returns:

True if the cursor is at the start of a sentence.

Return type:

bool