ooodev.adapter.view.selection_supplier_partial module

class ooodev.adapter.view.selection_supplier_partial.SelectionSupplierPartial(component, interface=com.sun.star.view.XSelectionSupplier)[source]

Bases: object

Partial class for XSelectionSupplier.

Parameters:
  • component (XSelectionSupplier) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.view.XSelectionSupplier)[source]

Constructor

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

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

Return type:

None

add_selection_change_listener(listener)[source]

Adds a selection change listener.

Parameters:

listener (XSelectionChangeListener) – The listener to be added.

Return type:

None

get_selection()[source]

Returns the current selection.

The selection is either specified by an object which is contained in the component to which the view belongs, or it is an interface of a collection which contains such objects.

Return type:

Any

remove_selection_change_listener(listener)[source]

Removes a selection change listener.

Parameters:

listener (XSelectionChangeListener) – The listener to be removed.

Return type:

None

select(selection)[source]

selects the object represented by selection if it is known and selectable in this object.

Parameters:

selection (Any) – The selection to be set.

Returns:

True if the selection could be set, otherwise False.

Return type:

bool