ooodev.adapter.text.text_table_cursor_partial module

class ooodev.adapter.text.text_table_cursor_partial.TextTableCursorPartial(component, interface=com.sun.star.text.XTextTableCursor)[source]

Bases: object

Partial class for XTextTableCursor.

Parameters:
  • component (XTextTableCursor) –

  • interface (UnoInterface | None) –

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

Constructor

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

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

Return type:

None

get_range_name()[source]

The name is the cell name of the top left table cell of the range concatenated by : with the table cell name of the bottom left table cell of the cell range. If the range consists of one table cell only then the name of that table cell is returned.

Return type:

str

go_down(count, expand=False)[source]

Moves the cursor to the bottom neighbor cell.

Parameters:
  • count (int) – The number of cells to move.

  • expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Returns:

True if the cursor was moved, False otherwise.

Return type:

bool

go_left(count, expand=False)[source]

Moves the cursor to the left neighbor.

Parameters:
  • count (int) – The number of cells to move.

  • expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Returns:

True if the cursor was moved, False otherwise.

Return type:

bool

go_right(count, expand=False)[source]

Moves the cursor to the right neighbor.

Parameters:
  • count (int) – The number of cells to move.

  • expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Returns:

True if the cursor was moved, False otherwise.

Return type:

bool

go_up(count, expand=False)[source]

Moves the cursor to the top neighbor.

Parameters:
  • count (int) – The number of cells to move.

  • expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Returns:

True if the cursor was moved, False otherwise.

Return type:

bool

goto_cell_by_name(cell_name, expand=False)[source]

Moves the cursor to the cell with the specified name.

Parameters:
  • cell_name (str) – The name of the cell.

  • expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Returns:

True if the cursor was moved, False otherwise.

Return type:

bool

goto_end(expand=False)[source]

Moves the cursor to the bottom right cell of the table.

Parameters:

expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Return type:

None

goto_start(expand=False)[source]

Moves the cursor to the top left cell of the table.

Parameters:

expand (bool, optional) – Specifies whether the selection is to be expanded. Defaults to False.

Return type:

None

merge_range()[source]

Merges the selected range of cells.

Returns:

True if the range was merged, False otherwise.

Return type:

bool

split_range(count, horizontal=True)[source]

Splits the range of cells.

Parameters:
  • count (int) – The number of cells to split.

  • horizontal (bool, optional) – True if the range should be split vertically. Otherwise it will be split horizontally. Defaults to True.

Returns:

True if the range was split, False otherwise.

Return type:

bool