ooodev.adapter.text.paragraph_cursor_partial module

class ooodev.adapter.text.paragraph_cursor_partial.ParagraphCursorPartial(component, interface=com.sun.star.text.XParagraphCursor)[source]

Bases: object

Partial class for XParagraphCursor.

Parameters:
  • component (XParagraphCursor) –

  • interface (UnoInterface | None) –

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

Constructor

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

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

Return type:

None

goto_end_of_paragraph(expand=False)[source]

Moves the cursor to the end of the current paragraph.

Parameters:

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

Returns:

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

Return type:

bool

goto_next_paragraph(expand=False)[source]

Moves the cursor to the next paragraph.

Parameters:

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

Returns:

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

Return type:

bool

goto_previous_paragraph(expand=False)[source]

Moves the cursor to the previous paragraph.

Parameters:

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

Returns:

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

Return type:

bool

goto_start_of_paragraph(expand=False)[source]

Moves the cursor to the start of the current paragraph.

Parameters:

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

Returns:

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

Return type:

bool

is_end_of_paragraph()[source]

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

Returns:

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

Return type:

bool

is_start_of_paragraph()[source]

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

Returns:

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

Return type:

bool