LibreOffice: XMultiSelectionSupplier Interface Reference

LibreOffice LibreOffice 6.2 SDK API Reference

Public Member Functions | List of all members
XMultiSelectionSupplier Interface Reference

makes it possible to append and remove objects from a selection. More...

`import"XMultiSelectionSupplier.idl";`

Inheritance diagram for XMultiSelectionSupplier:

## Public Member Functions
boolean | addSelection ([in] any Selection) raises ( com::sun::star::lang::IllegalArgumentException )
| adds the object or the objects represented by Selection to the selection of this XMultiSelectionSupplier. More...
void | removeSelection ([in] any Selection) raises ( com::sun::star::lang::IllegalArgumentException )
| remove the object or objects represented by Selection from the selection of this XMultiSelectionSupplier. More...
void | clearSelection ()
| clears the selection of this XMultiSelectionSupplier. More...
long | getSelectionCount ()
| returns the number of selected objects of this XMultiSelectionSupplier. More...
com::sun::star::container::XEnumeration | createSelectionEnumeration ()
com::sun::star::container::XEnumeration | createReverseSelectionEnumeration ()
Public Member Functions inherited from XSelectionSupplier
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 append and remove objects from a selection.

The method XSelectionSupplier::setSelection() for an instance that also supports XMultiSelectionSupplier should be implemented that it also takes either a selectable object or a sequence of selectable objects.

Adding an object more than once to a selection should not toggle the selection for that object but only select it once

## Member Function Documentation

## ◆ addSelection()

boolean addSelection | ( | [in] any | Selection | ) |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

adds the object or the objects represented by Selection to the selection of this XMultiSelectionSupplier.

Parameters

  Selection | either an Object that is selectable or a sequence of objects that are selectable.

Returns
  `TRUE`/, if Selection was added to the current selection. `FALSE`, if Selection or parts of Selection could not be added to the current selection. For example, if the selection already contains objects that are forbidden to be selected together with Selection

Exceptions

  com::sun::star::lang::IllegalArgumentException | If Selection is not a selectable object for this XMultiSelectionSupplier.

Adding an object to the selection that is already part of the selection should not raise this exception

## ◆ clearSelection()

void clearSelection | ( |  | ) |

clears the selection of this XMultiSelectionSupplier.

## ◆ createReverseSelectionEnumeration()

com::sun::star::container::XEnumeration createReverseSelectionEnumeration | ( |  | ) |

Returns
  a new object to enumerate the selection of this XMultiSelectionSupplier in reverse order. If the order of the selected objects It returns NULL if there are no objects in the selection.

## ◆ createSelectionEnumeration()

com::sun::star::container::XEnumeration createSelectionEnumeration | ( |  | ) |

Returns
  a new object to enumerate the selection of this XMultiSelectionSupplier. It returns NULL if there are no objects in the selection.

## ◆ getSelectionCount()

long getSelectionCount | ( |  | ) |

returns the number of selected objects of this XMultiSelectionSupplier.

## ◆ removeSelection()

void removeSelection | ( | [in] any | Selection | ) |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

remove the object or objects represented by Selection from the selection of this XMultiSelectionSupplier.

Parameters

  Selection | either an Object that is selectable or a sequence of objects that are selectable.

Returns
  `TRUE`/, if Selection was added to the current selection. `FALSE`, if Selection or parts of Selection could not be added to the current selection. For example, if the selection already contains objects that are forbidden to be selected together with Selection.

Exceptions

  com::sun::star::lang::IllegalArgumentException | If Selection is not a selectable object for this XMultiSelectionSupplier.

Removing an object from the selection that is not part of the selection should not raise this exception

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

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