LibreOffice LibreOffice 25.2 SDK API Reference

Public Member Functions | List of all members
SortableGridDataModel Service Reference

provides a default implementation of a XSortableGridData. More...

`import"SortableGridDataModel.idl";`

Inheritance diagram for SortableGridDataModel:

## Public Member Functions
| create ([in] XMutableGridDataModel DelegatorModel) raises ( ::com::sun::star::lang::IllegalArgumentException )
| creates a new instance of the `SortableGridDataModel` More...
| createWithCollator ([in] XMutableGridDataModel DelegatorModel, [in] ::com::sun::star::i18n::XCollator Collator) raises ( ::com::sun::star::lang::IllegalArgumentException )
| creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison. More...
Public Member Functions inherited from XMutableGridDataModel
void | addRow ([in] any Heading, [in] sequence< any > Data)
| appends a row to the model. More...
void | addRows ([in] sequence< any > Headings, [in] sequence< sequence< any > > Data) raises ( ::com::sun::star::lang::IllegalArgumentException )
| appends multiple rows of data to the model. More...
void | insertRow ([in] long Index, [in] any Heading, [in] sequence< any > Data) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| inserts a row into the set of data rows More...
void | insertRows ([in] long Index, [in] sequence< any > Headings, [in] sequence< sequence< any > > Data) raises ( ::com::sun::star::lang::IndexOutOfBoundsException , ::com::sun::star::lang::IllegalArgumentException )
| inserts multiple rows of data into the model. More...
void | removeRow ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| removes a row of data from the model More...
void | removeAllRows ()
| Removes all rows from the model. More...
void | updateCellData ([in] long ColumnIndex, [in] long RowIndex, [in] any Value) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| updates the content of the given cell More...
void | updateRowData ([in] sequence< long > ColumnIndexes, [in] long RowIndex, [in] sequence< any > Values) raises ( ::com::sun::star::lang::IndexOutOfBoundsException , ::com::sun::star::lang::IllegalArgumentException)
| updates the content of a given row. More...
void | updateRowHeading ([in] long RowIndex, [in] any Heading) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| sets a new title for a given row. More...
void | updateCellToolTip ([in] long ColumnIndex, [in] long RowIndex, [in] any Value) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| updates the tooltip to be displayed for a given cell More...
void | updateRowToolTip ([in] long RowIndex, [in] any Value) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| updates the tooltip for all cells of a given row More...
void | addGridDataListener ([in] XGridDataListener Listener)
| registers listener to be notified of data changes in the model More...
void | removeGridDataListener ([in] XGridDataListener Listener)
| revokes a listener which was previously registered via addGridDataListener() More...
Public Member Functions inherited from XGridDataModel
any | getCellData ([in] long Column, [in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the data for a given cell More...
any | getCellToolTip ([in] long Column, [in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the tool tip to be displayed when the mouse hovers over a given cell More...
any | getRowHeading ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the heading of a given row More...
sequence< any > | getRowData ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the data for a complete row More...
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. 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...
Public Member Functions inherited from XCloneable
com::sun::star::util::XCloneable | createClone ()
| creates a copy of the object. More...
Public Member Functions inherited from XSortableGridData
void | sortByColumn ([in] long ColumnIndex, [in] boolean SortAscending) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| sorts the rows represented by the model by a given column's data. More...
void | removeColumnSort ()
| removes any possibly present sorting of the grid data More...
::com::sun::star::beans::Pair< long, boolean > | getCurrentSortOrder ()
| returns the current sort order. More...

## Additional Inherited Members
Exported Interfaces inherited from XSortableMutableGridDataModel
interface | XMutableGridDataModel
| provides access to the basic functionality of a grid data model, plus functions to modify it. More...
interface | XSortableGridData
| provides means to sort the data represented by the model. More...
Exported Interfaces inherited from XGridDataModel
interface | ::com::sun::star::lang::XComponent
| implements life time control for the component More...
interface | ::com::sun::star::util::XCloneable
| allows cloning the complete data model More...
Public Attributes inherited from XGridDataModel
long | RowCount
| denotes the number of rows for which the model can provide data More...
long | ColumnCount
| denotes the number of columns for which the model can provide data More...

## Detailed Description

provides a default implementation of a XSortableGridData.

This service must be created with a secondary grid data model, which all actual data requests are delegated to. But before providing this data to the service's own clients, it is sorted, according to the sort order defined via the `XSortableGridData` interface.

The service implementation is able to compare the default scalar types, plus strings.

For determining the data type of a column which the data should be sorted by, the first non-`VOID` data encountered in this column is taken into account. Further read requests to this column will assume that all non-`VOID` data is of the same type.

Consequently, you cannot use this service with data sets containing heterogeneous data in a given column.

All requests made via the XMutableGridDataModel are delegated to the `XMutableGridDataModel` instance passed in the service constructor.

Note that changing the data might result in the sort order being destroyed. If you want to ensure that the data represented by the model is still sorted after your modifications, you should call XSortableGridData::sortByColumn(), again.

## Member Function Documentation

## ◆ create()

create | ( | [in] XMutableGridDataModel | DelegatorModel | ) |
raises | ( | ::com::sun::star::lang::IllegalArgumentException
| ) |  |

creates a new instance of the `SortableGridDataModel`

For string comparison, a default com::sun::star::i18n::Collator, based on the system's locale, will be used.

Parameters

  DelegatorModel | the data model to which read requests are delegated.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the given `DelegatorModel` is `NULL`

## ◆ createWithCollator()

createWithCollator | ( | [in] XMutableGridDataModel | DelegatorModel,
|  | [in] ::com::sun::star::i18n::XCollator | Collator
| ) |  |
raises | ( | ::com::sun::star::lang::IllegalArgumentException
| ) |  |

creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison.

Parameters

  DelegatorModel | is the data model to which read requests are delegated
  Collator | is the collator to be used for string comparison

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the given `DelegatorModel` is `NULL`

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

- com/sun/star/awt/grid/SortableGridDataModel.idl