LibreOffice: XMutableGridDataModel Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XMutableGridDataModel Interface Referencepublished

allows to modify the data represented by a XGridDataModel More...

`import "XMutableGridDataModel.idl";`

Inheritance diagram for XMutableGridDataModel:

## Public Member Functions
void | addRow ([in] any Heading, [in] sequence< any > Data)
| appends a row to the model.
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.
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
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.
void | removeRow ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| removes a row of data from the model
void | removeAllRows ()
| Removes all rows from the model.
void | updateCellData ([in] long ColumnIndex, [in] long RowIndex, [in] any Value) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| updates the content of the given cell
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.
void | updateRowHeading ([in] long RowIndex, [in] any Heading) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| sets a new title for a given row.
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
void | updateRowToolTip ([in] long RowIndex, [in] any Value) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| updates the tooltip for all cells of a given row
void | addGridDataListener ([in] XGridDataListener Listener)
| registers listener to be notified of data changes in the model
void | removeGridDataListener ([in] XGridDataListener Listener)
| revokes a listener which was previously registered via addGridDataListener()
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
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
any | getRowHeading ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the heading of a given row
sequence< any > | getRowData ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the data for a complete row
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.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XCloneable
com::sun::star::util::XCloneable | createClone ()
| creates a copy of the object.

## Additional Inherited Members
Exported Interfaces inherited from XGridDataModel
interface | ::com::sun::star::lang::XComponent
| implements life time control for the component
interface | ::com::sun::star::util::XCloneable
| allows cloning the complete data model
Public Attributes inherited from XGridDataModel
long | RowCount
| denotes the number of rows for which the model can provide data
long | ColumnCount
| denotes the number of columns for which the model can provide data

## Detailed Description

allows to modify the data represented by a XGridDataModel

## Member Function Documentation

## ◆ addGridDataListener()

void addGridDataListener | ( | [in] XGridDataListener | Listener | ) |

registers listener to be notified of data changes in the model

Parameters

  Listener | specifies the listener to register

## ◆ addRow()

void addRow | ( | [in] any | Heading,
|  | [in] sequence< any > | Data )

appends a row to the model.

Parameters

  Heading | denotes the heading of the row.
  Data | specifies the content of the row.

## ◆ addRows()

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.

Parameters

  Headings | denotes the headings of the to-be-added rows.
  Data | specifies the data of the rows to be added.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if `Titles` and `Data` are of different length.

## ◆ insertRow()

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

Parameters

  Index | denotes the position at which the row is to be inserted
  Heading | denotes the heading of the row.
  Data | specifies the content of the row.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Index` is smaller than `0` or greater than the number of rows in the model.

## ◆ insertRows()

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.

Parameters

  Index | denotes the position at which the rows are to be inserted
  Headings | denotes the headings of the to-be-added rows.
  Data | specifies the data of the rows to be added.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if `Titles` and `Data` are of different length.
  com::sun::star::lang::IndexOutOfBoundsException | if `Index` is smaller than `0` or greater than the number of rows in the model.

## ◆ removeAllRows()

void removeAllRows | ( |  | ) |

Removes all rows from the model.

## ◆ removeGridDataListener()

void removeGridDataListener | ( | [in] XGridDataListener | Listener | ) |

revokes a listener which was previously registered via addGridDataListener()

Parameters

  Listener | specifies the listener to revoke.

## ◆ removeRow()

void removeRow | ( | [in] long | RowIndex | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException ) |  |  |

removes a row of data from the model

Parameters

  RowIndex | the index of the row that should be removed.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the given index is invalid

## ◆ updateCellData()

void updateCellData | ( | [in] long | ColumnIndex,
|  | [in] long | RowIndex,
|  | [in] any | Value )
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException ) |  |  |

updates the content of the given cell

Parameters

  ColumnIndex | the column index of the to-be-updated cell
  RowIndex | the row index of the to-be-updated cell
  Value | the new value of the cell.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the row or column index is invalid

## ◆ updateCellToolTip()

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

See also
  XGridDataModel::getCellToolTip

## ◆ updateRowData()

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.

The change in the data model will be notified to registered listeners via XGridDataListener::dataChanged(). The GridDataEvent::FirstColumn and GridDataEvent::LastColumn will denote the smallest respectively largest column index from ColumnIndexes.

Parameters

  ColumnIndexes | contains the column indexes of the cells, which should be updated
  RowIndex | contains the index of the row whose data is to be updated
  Values | specifies the new values of the cells.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if one of the row indexes or the column index is invalid
  com::sun::star::lang::IllegalArgumentException | if the lengths of the `ColumnIndexes` and `Values` sequences are not equal.

## ◆ updateRowHeading()

void updateRowHeading | ( | [in] long | RowIndex,
|  | [in] any | Heading )
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException ) |  |  |

sets a new title for a given row.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the given index does not denote a valid row.

## ◆ updateRowToolTip()

void updateRowToolTip | ( | [in] long | RowIndex,
|  | [in] any | Value )
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException ) |  |  |

updates the tooltip for all cells of a given row

Effectively this method is a shortcut for calling updateCellToolTip() multiple times in a row, for all cells of a given row.

See also
  XGridDataModel::getCellToolTip
  updateCellToolTip

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

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