From fda5c8a28a2601df5a2dcab0f30ac5ac64cbccf0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 14 Jan 2011 13:19:09 +0100 Subject: [PATCH] gridsort: re-add tooltip support to X(Mutable)GridDataModel, this time more explicit, and less magical --- offapi/com/sun/star/awt/grid/XGridDataModel.idl | 13 +++++++++++++ .../com/sun/star/awt/grid/XMutableGridDataModel.idl | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index f62271d6acf3..d686a04f2028 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -72,10 +72,23 @@ interface XGridDataModel any getCellData( [in] long Column, [in] long Row ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the tool tip to be displayed when the mouse hovers over a given cell + +

At the moment, only string tool tips are supported.

+ + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the column or row index do not denote a valid cell position. + */ + any getCellToolTip( [in] long Column, [in] long Row ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the title of the given row

A grid control will usually paint a row's title in the header column of the respective row.

+

If is returned here, the cell's content will be displayed as tip, but only if it does + not fit into the cell.

+ @throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row. */ diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl index 58023cadc7b7..e593cc1a7c27 100755 --- a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -85,7 +85,7 @@ interface XMutableGridDataModel : XGridDataModel @throws ::com::sun::star::lang::IndexOutOfBoundsException if the row or column index is invalid */ - void updateCell([in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + void updateCell( [in] long RowIndex, [in] long ColumnIndex, [in] any Value ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** updates the content of a given row. @@ -119,6 +119,13 @@ interface XMutableGridDataModel : XGridDataModel setRowTitle( [in] long RowIndex, [in] string Title ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** updates the tooltip to be displayed for a given cell + + @see XGridDataModel::getCellToolTip + */ + void setCellToolTip( [in] long RowIndex, [in] long ColumnIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + //------------------------------------------------------------------------- /** registers listener to be notified of data changes in the model