LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XSelectionSupplier Interface Referencepublished

makes it possible to access and change the selection in a view. More...

`import"XSelectionSupplier.idl";`

Inheritance diagram for XSelectionSupplier:

## Public Member Functions
boolean | select ([in] any xSelection) raises ( com::sun::star::lang::IllegalArgumentException )
| selects the object represented by xSelection if it is known and selectable in this object. More...
any | getSelection ()
void | addSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener)
| registers an event listener, which is called when the selection changes. More...
void | removeSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener)
| unregisters an event listener which was registered with XSelectionSupplier::addSelectionChangeListener(). More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

makes it possible to access and change the selection in a view.

See also
  OfficeDocumentView

Developers Guide
  Office Development - Component - Controllers - XSelectionSupplier
  Drawings and Presentations - Setting the Current Page
  Text Documents - TextView

## Member Function Documentation

## ◆ addSelectionChangeListener()

void addSelectionChangeListener | ( | [in] com::sun::star::view::XSelectionChangeListener | xListener | ) |

registers an event listener, which is called when the selection changes.

## ◆ getSelection()

any getSelection | ( |  | ) |

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.

## ◆ removeSelectionChangeListener()

void removeSelectionChangeListener | ( | [in] com::sun::star::view::XSelectionChangeListener | xListener | ) |

unregisters an event listener which was registered with XSelectionSupplier::addSelectionChangeListener().

## ◆ select()

boolean select | ( | [in] any | xSelection | ) |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

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

The documentation for this interface was generated from the following file:

- com/sun/star/view/XSelectionSupplier.idl