diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-17 16:53:53 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-17 16:53:53 +0100 |
commit | 3a31213a7d437f1812f9d85540ab84bb157f5805 (patch) | |
tree | 02a7faed9cf0328160e6c48e456223f154e4c8d3 /offapi | |
parent | 16df77fb803bcdfccea3f69e8974c3b4e8891498 (diff) | |
parent | d14b4e0e15e71b45a1f30c457ebb6dcbf29db58d (diff) |
CWS-TOOLING: integrate CWS gridsort
Diffstat (limited to 'offapi')
28 files changed, 769 insertions, 561 deletions
diff --git a/offapi/com/sun/star/awt/UnoControlDialog.idl b/offapi/com/sun/star/awt/UnoControlDialog.idl index e7f08714e..0e6a73eef 100644 --- a/offapi/com/sun/star/awt/UnoControlDialog.idl +++ b/offapi/com/sun/star/awt/UnoControlDialog.idl @@ -35,8 +35,8 @@ #include <com/sun/star/awt/XTopWindow.idl> #endif -#ifndef __com_sun_star_awt_XDialog_idl__ -#include <com/sun/star/awt/XDialog.idl> +#ifndef __com_sun_star_awt_XDialog2_idl__ +#include <com/sun/star/awt/XDialog2.idl> #endif @@ -54,7 +54,7 @@ published service UnoControlDialog interface com::sun::star::awt::XTopWindow; - interface com::sun::star::awt::XDialog; + interface com::sun::star::awt::XDialog2; }; diff --git a/offapi/com/sun/star/awt/XDialog2.idl b/offapi/com/sun/star/awt/XDialog2.idl index 6237a7f3b..594f072fc 100644 --- a/offapi/com/sun/star/awt/XDialog2.idl +++ b/offapi/com/sun/star/awt/XDialog2.idl @@ -16,7 +16,7 @@ module com { module sun { module star { module awt { @since OOo 3.0 */ -interface XDialog2: com::sun::star::awt::XDialog +published interface XDialog2: com::sun::star::awt::XDialog { /** hides the dialog and then causes <member>XDialog::execute</member> to return with the given result value. diff --git a/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl b/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl index c4f866e58..3f62092d2 100644 --- a/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl @@ -27,9 +27,7 @@ #ifndef __com_sun_star_awt_DefaultGridDataModel_idl__ #define __com_sun_star_awt_DefaultGridDataModel_idl__ -#ifndef __com_sun_star_awt_grid_XGridDataModel_idl__ -#include <com/sun/star/awt/grid/XGridDataModel.idl> -#endif +#include <com/sun/star/awt/grid/XMutableGridDataModel.idl> //============================================================================= @@ -39,12 +37,15 @@ /** If you do not want to implement the <type>XGridDataModel</type> yourself, use this service. + <p>The <code>DefaultGridDataModel</code> implementation is a dumb container of tabular data. You can add + and remove rows, modify cell values, and the like.</p> + + <p>The implementation will implicitly increase its column count if you add a row which has more values than + the current column count.</p> + @since OOo 3.3.0 */ -service DefaultGridDataModel -{ - interface com::sun::star::awt::grid::XGridDataModel; -}; +service DefaultGridDataModel : ::com::sun::star::awt::grid::XMutableGridDataModel; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/GridColumnEvent.idl b/offapi/com/sun/star/awt/grid/GridColumnEvent.idl index 3ee38f50e..e86e296d6 100644 --- a/offapi/com/sun/star/awt/grid/GridColumnEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridColumnEvent.idl @@ -42,17 +42,17 @@ module com { module sun { module star { module awt { module grid { */ struct GridColumnEvent: com::sun::star::lang::EventObject { - /** Contains the property name of the changed value **/ - string valueName; + /** Contains the name of the attributes whose value changed. **/ + string AttributeName; /** Contains the old value **/ - any oldValue; + any OldValue; /** Contains the new value **/ - any newValue; + any NewValue; /** Contains the index of the changed column**/ - long index; + long ColumnIndex; //------------------------------------------------------------------------- }; diff --git a/offapi/com/sun/star/awt/grid/GridControlEvent.idl b/offapi/com/sun/star/awt/grid/GridControlEvent.idl deleted file mode 100644 index 18e9958e0..000000000 --- a/offapi/com/sun/star/awt/grid/GridControlEvent.idl +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_GridControlEvent_idl__ -#define __com_sun_star_awt_GridControlEvent_idl__ - -#ifndef __com_sun_star_lang_EventObject_idl__ -#include <com/sun/star/lang/EventObject.idl> -#endif - - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - - -struct GridControlEvent: com::sun::star::lang::EventObject -{ - //------------------------------------------------------------------------- - - string ActionCommand; - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/GridDataEvent.idl b/offapi/com/sun/star/awt/grid/GridDataEvent.idl index b406c33f4..3ac05f0ec 100644 --- a/offapi/com/sun/star/awt/grid/GridDataEvent.idl +++ b/offapi/com/sun/star/awt/grid/GridDataEvent.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -24,55 +24,54 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_awt_grid_GridDataEvent_idl__ -#define __com_sun_star_awt_grid_GridDataEvent_idl__ - -#include <com/sun/star/lang/EventObject.idl> - -//============================================================================= - +#ifndef __com_sun_star_awt_grid_GridDataEvent_idl__ +#define __com_sun_star_awt_grid_GridDataEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + +//============================================================================= + module com { module sun { module star { module awt { module grid { - -//============================================================================= - -/** An event used by a <type>XGridDataModel</type> to notify changes in the data - model to the <type>XGridControl</type>. - You usually need to fill this event only if you implement the <type>XGridDataModel</type> - yourself. - - @see XGridDataModel - @see XGridControl + +//============================================================================= + +/** used to notify changes in the data represented by an <type>XMutableGridDataModel</type>. + + <p>Effectively, a <code>GridDataEvent</code> denotes a continuous two-dimensional cell range + within a grid's data model, which is affected by a certain change.</p> + + @see XMutableGridDataModel @see XGridDataListener - @sonce OOo 3.3.0 - */ + @since OOo 3.3.0 + */ struct GridDataEvent: com::sun::star::lang::EventObject -{ - //------------------------------------------------------------------------- - - /** Contains the property name of the changed value **/ - string valueName; - - /** Contains the old value **/ - any oldValue; - - /** Contains the new value **/ - any newValue; - - /** Contains the index of the changed row**/ - long index; - - /** Contains the header name of the changed row**/ - string headerName; - - /** Contains the changed row**/ - sequence<any> rowData; - - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif +{ + /** denotes the first column affected by a change. + + <p>If <code>FirstColumn</code> is -1, the listener should assume that all rows of a grid's data model + are affected.</p> + */ + long FirstColumn; + + /** denotes the last column affected by a change + */ + long LastColumn; + + /** denotes the first row affected by a change. + + <p>If <code>FirstRow</code> is -1, the listener should assume that all rows of a grid's data model + are affected.</p> + */ + long FirstRow; + + /** denotes the last row affected by a change + */ + long LastRow; +}; + +//============================================================================= + +}; }; }; }; }; + +#endif diff --git a/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl new file mode 100755 index 000000000..2b7aca1ca --- /dev/null +++ b/offapi/com/sun/star/awt/grid/SortableGridDataModel.idl @@ -0,0 +1,102 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_SortableGridDataModel_idl__ +#define __com_sun_star_awt_grid_SortableGridDataModel_idl__ + +#include <com/sun/star/i18n/XCollator.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +interface XSortableMutableGridDataModel; +interface XMutableGridDataModel; + +//================================================================================================================== + +/** provides a default implementation of a <type>XSortableGridData</type>. + + <p>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 <code>XSortableGridData</code> interface.</p> + + <p>The service implementation is able to compare the default scalar types, plus strings.</p> + + <p>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.</p> + + <p>Consequently, you cannot use this service with data sets containing heterogenous data in a given column.</p> + + <p>All requests made via the <type>XMutableGridDataModel</type> are delegated to the <code>XMutableGridDataModel</code> + instance passed in the service constructor.</p> + + <p>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 + <member>XSortableGridData::sortByColumn</member>, again.</p> + */ +service SortableGridDataModel : XSortableMutableGridDataModel +{ + /** creates a new instance of the <code>SortableGridDataModel</code> + + <p>For string comparison, a default <type scope="::com::sun::star::i18n">Collator</type>, based on the system's + locale, will be used.</p> + + @param DelegatorModel + the data model to which read requests are delegated. + @throws ::com::sun::star::lang::IllegalArgumentException + if the given <code>DelegatorModel</code> is <NULL/> + */ + create( + [in] XMutableGridDataModel DelegatorModel + ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); + + /** creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison. + + @param DelegatorModel + is the data model to which read requests are delegated + @param Collator + is the collator to be used for string comparison + @throws ::com::sun::star::lang::IllegalArgumentException + if the given <code>DelegatorModel</code> is <NULL/> + */ + createWithCollator( + [in] XMutableGridDataModel DelegatorModel, + [in] ::com::sun::star::i18n::XCollator Collator + ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl index b61d8b568..c2478508e 100644 --- a/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl +++ b/offapi/com/sun/star/awt/grid/UnoControlGridModel.idl @@ -28,19 +28,11 @@ #define __com_sun_star_awt_grid_UnoControlGridModel_idl__ #include <com/sun/star/awt/grid/XGridColumnModel.idl> - #include <com/sun/star/awt/grid/XGridDataModel.idl> - -#include <com/sun/star/awt/grid/ScrollBarMode.idl> - #include <com/sun/star/awt/UnoControlModel.idl> - #include <com/sun/star/view/SelectionType.idl> - #include <com/sun/star/awt/FontDescriptor.idl> - #include <com/sun/star/style/VerticalAlignment.idl> - #include <com/sun/star/util/Color.idl> //============================================================================= @@ -49,7 +41,7 @@ module com { module sun { module star { module awt { module grid { //============================================================================= -/** specifies the standard model of a <type>UnoControlGridModel</type>. +/** specifies the standard model of a <type>UnoControlGrid</type> control. @since OOo 3.3.0 */ @@ -59,19 +51,51 @@ service UnoControlGridModel service com::sun::star::awt::UnoControlModel; /** Specifies whether the grid control should display a special header column. - <p>The default value is <FALSE/></p> + + <p>The default value is <FALSE/></p> */ [property] boolean ShowRowHeader; + /** specifies the width of the row header column, if applicable. + + <p>The width is specified in application font units - see <type scope="com::sun::star::util">MeasureUnit</type>.</p> + + <p>The value given here is ignored if <member>ShowRowHeader</member> is <FALSE/>.</p> + */ + [property] long RowHeaderWidth; + /** Specifies whether the grid control should display a title row. - <p>The default value is <TRUE/></p> + + <p>The default value is <TRUE/></p> */ [property] boolean ShowColumnHeader; + /** specifies the height of the column header row, if applicable. + + <p>The height is specified in application font units - see <type scope="com::sun::star::util">MeasureUnit</type>.</p> + + <p>The value given here is ignored if <member>ShowColumnHeader</member> is <FALSE/>.</p> + + <p>If the property is <void/>, the grid control shall automatically determine a height which conveniently allows, + according to the used font, to display one line of text.</p> + */ + [property, maybevoid] long ColumnHeaderHeight; + + /** Specifies the height of rows in the grid control. + + <p>The height is specified in application font units - see <type scope="com::sun::star::util">MeasureUnit</type>.</p> + */ + [property, maybevoid] long RowHeight; + /** Specifies the <type>XGridColumnModel</type> that is providing the column structure. <p>You can implement your own instance of <type>XGridColumnModel</type> or use the <type>DefaultGridColumnModel</type>. + + <p>The column model is in the ownership of the grid model: When you set a new column model, or dispose + the grid model, then the (old) column model is disposed, too.</p> + + <p>The default for this property is an empty instance of the <type>DefaultGridColumnModel</type>.</p> */ [property] XGridColumnModel ColumnModel; @@ -79,6 +103,11 @@ service UnoControlGridModel <p>You can implement your own instance of <type>XGridDataModel</type> or use the <type>DefaultGridDataModel</type>. + + <p>The data model is in the ownership of the grid model: When you set a new data model, or dispose + the grid model, then the (old) data model is disposed, too.</p> + + <p>The default for this property is an empty instance of the <type>DefaultGridDataModel</type>.</p> */ [property] XGridDataModel GridDataModel; @@ -101,27 +130,49 @@ service UnoControlGridModel */ [property] ::com::sun::star::view::SelectionType SelectionModel; - /** Specifies the background color of rows. If color for even rows is set, then specifies - the color of odd rows. Default value is white. + /** controls whether or not to paint horizontal and vertical lines between the grid cells. + + @see LineColor */ - [property] ::com::sun::star::util::Color RowBackgroundColor; + [property] boolean UseGridLines; - /** Specifies the background color of even rows. Default value is white. + /** specifies the color to be used when drawing lines between cells + + <p>If this property has a value of <VOID/>, the grid control renderer will use some default color, + depending on the system's style settings.</p> + + @see UseGridLines */ - [property] ::com::sun::star::util::Color EvenRowBackgroundColor; + [property, maybevoid] ::com::sun::star::util::Color GridLineColor; + + /** specifies the color to be used when drawing the background of row or column headers - /** Specifies the background color of header. Default value is white. + <p>If this property has a value of <VOID/>, the grid control renderer will use some default color, + depending on the system's style settings.</p> */ - [property] ::com::sun::star::util::Color HeaderBackgroundColor; + [property, maybevoid] ::com::sun::star::util::Color HeaderBackgroundColor; - /** Specifies the text color. Default value is black. + /** specifies the color to be used when drawing the text within row or column headers + + <p>If this property has a value of <VOID/>, the grid control renderer will use some default color, + depending on the system's style settings.</p> */ - [property] ::com::sun::star::util::Color TextColor; + [property, maybevoid] ::com::sun::star::util::Color HeaderTextColor; + + /** specifies the colors to be used as background for data rows. - /** Specifies the line color. Default value is white. + <p>If this sequence is non-empty, the data rows will be rendered with alternating background colors: Assuming + the sequence has <code>n</code> elements, each row will use the background color as specified by its number's + remainder modulo <code>n</code>.</p> + + <p>If this sequence is empty, all rows will use the same background color as the control as whole.</p> + + <p>If this property does not exist at a particular implementation, or is <VOID/>, rows will be painted + in alternating background colors, every second row having a background color derived from the control's + selection color.</p> */ - [property] ::com::sun::star::util::Color LineColor; - + [property, maybevoid] sequence< ::com::sun::star::util::Color > RowBackgroundColors; + /** specifies the vertical alignment of the content in the control. <pre> @@ -136,6 +187,20 @@ service UnoControlGridModel */ [property] com::sun::star::awt::FontDescriptor FontDescriptor; + /** specifies the color to be used when drawing cell texts + + <p>If this property has a value of <VOID/>, the grid control renderer will use some default color, + depending on the system's style settings.</p> + */ + [property, maybevoid] ::com::sun::star::util::Color TextColor; + + /** specifies the color to be used when drawing text lines (underlining and strikethrough) + + <p>If this property has a value of <VOID/>, the grid control renderer will use some default color, + depending on the system's style settings.</p> + */ + [property, maybevoid] com::sun::star::util::Color TextLineColor; + /** specifies the <type scope="com::sun::star::text">FontEmphasis</type> value of the text in the control. */ diff --git a/offapi/com/sun/star/awt/grid/XGridCell.idl b/offapi/com/sun/star/awt/grid/XGridCell.idl deleted file mode 100644 index 7b6ea52b6..000000000 --- a/offapi/com/sun/star/awt/grid/XGridCell.idl +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_XGridCell_idl__ -#define __com_sun_star_awt_grid_XGridCell_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif - - - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -interface XGridCell -{ - - [attribute] string Value; - - [attribute] boolean Editable; - - [attribute] any Data; -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/XGridCellRenderer.idl b/offapi/com/sun/star/awt/grid/XGridCellRenderer.idl deleted file mode 100644 index 996874e55..000000000 --- a/offapi/com/sun/star/awt/grid/XGridCellRenderer.idl +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_XGridCellRenderer_idl__ -#define __com_sun_star_awt_grid_XGridCellRenderer_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -/** renderer for cells - */ -interface XGridCellRenderer -{ - //------------------------------------------------------------------------- - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/XGridColumn.idl b/offapi/com/sun/star/awt/grid/XGridColumn.idl index 0ca7fad70..dfc5dfec8 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumn.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumn.idl @@ -27,12 +27,11 @@ #ifndef __com_sun_star_awt_grid_XGridColumn_idl__ #define __com_sun_star_awt_grid_XGridColumn_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif +#include <com/sun/star/lang/XComponent.idl> #include <com/sun/star/style/HorizontalAlignment.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> #include <com/sun/star/awt/grid/XGridColumnListener.idl> - +#include <com/sun/star/util/XCloneable.idl> //============================================================================= @@ -45,42 +44,96 @@ module com { module sun { module star { module awt { module grid { */ interface XGridColumn { - /** Specifies the an idendifier of the colomn.**/ + /** implements life time control for the component + */ + interface ::com::sun::star::lang::XComponent; + + /** allows cloning the complete grid column + */ + interface ::com::sun::star::util::XCloneable; + + /** specifies an identifier of the column + + <p>This identifier will not be evaluated by the grid control, or its model. It is merely for clients + to identify particular columns.</p> + */ [attribute] any Identifier; - /** Specifies the default column witdth. **/ + /** specifies the current width of the column. + */ [attribute] long ColumnWidth; - - /** Specifies the preferred column witdth. **/ - [attribute] long PreferredWidth; - /** Specifies the min column witdth. **/ + /** specifies the minimal width the column can have. + */ [attribute] long MinWidth; - /** Specifies the max column witdth. **/ + /** specifies the maximal width the column can have. + */ [attribute] long MaxWidth; - - /** Specifies whether column has fixed size or not. **/ + + /** controls whether or not the column's width is fixed or not. + + <p>If this is <TRUE/>, the user can interactively change the column's width. Also, the column is subject to + auto-resizing, if its <member>Flexibility</member> attribute is greater <code>0</code>.</p> + */ [attribute] boolean Resizeable; - - /** Specifies the horizontal alignment of the content in the control. - <pre> - LEFT - CENTER - RIGHT - </pre> + /** specifies the flexibility of the column when it is automatically resized due to the grid control as a whole + being resized. + + <p>Specify <code>0</code> here if you do not want the column to be resized automatically.</p> + + <p>If a column has a flexibility greater than 0, it is set in relationship to the flexibility of all + other such columns, and the respective widths of the columns are changed in the same relationship.</p> + + <p>Note that a column's flexibility is ignored if its <member>Resizeable</member> attribute is + <FALSE/>.</p> + + <p>A column's flexibility cannot be negative, attempts to set a negative value will raise an exception.</p> + */ + [attribute] long Flexibility + { + set raises ( ::com::sun::star::lang::IllegalArgumentException ); + }; + + /** Specifies the horizontal alignment of the content in the control. */ [attribute] ::com::sun::star::style::HorizontalAlignment HorizontalAlign; /** A title is displayed in the colum header row if <method>UnoControlGridModel::ShowRowHeader</method> is set to <true/>**/ [attribute] string Title; + /** is the help text associated with the column. + + <p>A grid control will usually display a column's help text as tooltip.</p> + */ + [attribute] string HelpText; + + /** denotes the index of the column within the grid column model it belongs to + + <p>If the column is not yet part of a column model, <code>Index</code> is -1.</p> + */ + [attribute, readonly] long Index; + + /** denotes the index of the data column which should be used to fetch this grid column's data + + <p>A grid control has a column model and a data model, both containing a possibly different number of columns. + The <code>DataColumnIndex</code> attribute defines the index of the column within the data model, which should + be used to retrieve actual data.</p> + + <p>Using this, you can do runtime changes to the column model, i.e. insertion and removal of columns, without + necessarily needing to adjust the data model, too.</p> + + <p>If <code>DataColumnIndex</code> is negative, the it will be ignored, then the column's index within its + column model, as determined by the <member>Index</member> attribute, will be used.</p> + */ + [attribute] long DataColumnIndex; + /** Adds a listener for the <type>GridColumnEvent</type> posted after the grid changes. @param Listener the listener to add. */ - [oneway] void addColumnListener( [in] XGridColumnListener listener); + void addGridColumnListener( [in] XGridColumnListener listener); //------------------------------------------------------------------------- @@ -88,20 +141,7 @@ interface XGridColumn @param Listener the listener to remove. */ - [oneway] void removeColumnListener( [in] XGridColumnListener listener); - - /**Updates changed column widths, when column widths are being resized. - @param name - can be PrefWidth or ColWidth, depending on which was changed - @param width - the new column width - */ - void updateColumn( [in] string name, [in] long width); - /**Sets column index - @param index - index, which is the index of the column in the column array of the column model - */ - void setIndex( [in] long index ); + void removeGridColumnListener( [in] XGridColumnListener listener); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridColumnListener.idl b/offapi/com/sun/star/awt/grid/XGridColumnListener.idl index c77943a3f..74a4e893d 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnListener.idl @@ -27,13 +27,8 @@ #ifndef __com_sun_star_awt_grid_XGridColumnListener_idl__ #define __com_sun_star_awt_grid_XGridColumnListener_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif - -#ifndef __com_sun_star_awt_grid_GridColumnEvent_idl__ #include <com/sun/star/awt/grid/GridColumnEvent.idl> -#endif +#include <com/sun/star/lang/XEventListener.idl> //============================================================================= @@ -44,25 +39,11 @@ module com { module sun { module star { module awt { module grid { /** An instance of this interface is used by the <type>XGridColumnModel</type> to get notifications about column model changes. - <p>Usually you must not implement this interface yourself, but you must notify it correctly if - you implement the <type>XGridColumnModel</type> yourself</p>. - @since OOo 3.3.0 */ -interface XGridColumnListener +interface XGridColumnListener : ::com::sun::star::lang::XEventListener { - // /** - // Invoked after a column was added to the column model. - //*/ - //void columnAdded( [in] GridColumnEvent event ); - // - // /** - // Invoked after a column was removed from the column model. - //*/ - //void columnRemoved( [in] GridColumnEvent event ); - - /** - Invoked after a column was modified. + /** Invoked after a column was modified. */ void columnChanged( [in] GridColumnEvent event ); }; diff --git a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl index b26dc2ef2..58d737169 100644 --- a/offapi/com/sun/star/awt/grid/XGridColumnModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridColumnModel.idl @@ -28,11 +28,14 @@ #define __com_sun_star_awt_grid_XGridColumnModel_idl__ #include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/util/XCloneable.idl> #include <com/sun/star/awt/grid/XGridColumn.idl> +#include <com/sun/star/container/XContainer.idl> +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> -#include <com/sun/star/awt/grid/XGridColumnListener.idl> - //============================================================================= module com { module sun { module star { module awt { module grid { @@ -48,37 +51,64 @@ module com { module sun { module star { module awt { module grid { */ interface XGridColumnModel { - ///** Specifies whether column selection is allowed - //*/ - //[attribute] boolean ColumnSelectionAllowed; + /** implements life time control for the component + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to register listeners to be notified when columns are inserted or removed + */ + interface ::com::sun::star::container::XContainer; - /**Specifies the height of column header. + /** allows cloning the complete column model */ - [attribute] long ColumnHeaderHeight; + interface ::com::sun::star::util::XCloneable; /** Returns the number of columns. + @returns the number of columns. */ long getColumnCount(); + /** creates a new column for use with the column model. + + <p>The newly created column is not yet inserted into the column container, you need to call <member>addColumn</member> + after you initialized the column object.</p> + */ + XGridColumn + createColumn(); + /** Adds a column to the model. + + <p>You should use the <member>createColumn</member> member to create a new column. This gives + implementations of the <code>XGridColumnModel</code> interface the possibility to provide own column + implementations which extend the basic <type>GridColumn</type> type.</p> + + <p>As soon as the column has been inserted into the model, the model takes ownership of it. This means when the + column is removed, or when the column model is disposed, the grid column is disposed as well.</p> + @param column the column to add to the model. - @returns - the index of new created column. + the index of new created column. + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given column is not a valid element for the column container, or if it is <NULL/>. */ - long addColumn( [in] XGridColumn column ); + long addColumn( [in] XGridColumn column ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); - /* - long getSelectedCount(); - - sequence<XGridColumn> getSelectedColumns(); - - sequence<long> getSelectedIndex(); - + /** removes a column from the model + + <p>The column object will be disposed upon removal.</p> + + @param ColumnIndex + denotes the index of the column to remove + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if <code>ColumnIndex</code> does not denote a valid column index. */ + void removeColumn( [in] long ColumnIndex ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** Returns all columns of the model. @returns @@ -92,24 +122,20 @@ interface XGridColumnModel @returns the requested column. */ - XGridColumn getColumn( [in] long index); + XGridColumn getColumn( [in] long index) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** Fills the model with the given number of default columns + + <p>Existing columns will be removed before adding new columns. Listeners at the column model will + be notified one <member scope="com::sun::star::container">XContainerListener::elementRemoved</member> event + for each removed column, and one <member scope="com::sun::star::container">XContainerListener::elementInserted</member> + event for each insertion.</p> - /** Sets default columns to the column model. @param elements the number of default columns that should be set. */ void setDefaultColumns([in] long elements); - - /**Creates new XGridColumn with the settings of other column. To be used if the columns which are added to - the column model have the same settings. - @param column - the column, which is already created - */ - XGridColumn copyColumn( [in] XGridColumn column ); - - /* - long getTotalColumnWidth(); - */ }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridControl.idl b/offapi/com/sun/star/awt/grid/XGridControl.idl index 0ea37504a..d9a1509b2 100644 --- a/offapi/com/sun/star/awt/grid/XGridControl.idl +++ b/offapi/com/sun/star/awt/grid/XGridControl.idl @@ -28,9 +28,6 @@ #define __com_sun_star_awt_grid_XGridControl_idl__ #include <com/sun/star/awt/grid/XGridSelection.idl> -#include <com/sun/star/awt/grid/XGridColumnModel.idl> -#include <com/sun/star/awt/grid/XGridDataModel.idl> -#include <com/sun/star/awt/XMouseListener.idl> //============================================================================= @@ -44,23 +41,43 @@ module com { module sun { module star { module awt { module grid { @since OOo 3.3.0 */ -interface XGridControl: XGridSelection +interface XGridControl : XGridSelection { - /** Converting + /** retrieves the column which a given point belongs to + + @param X + the ordinate of the point, in pixel coordinates. + @param Y + the abscissa of the point, in pixel coordinates. + @return + the index of the column which the point lies in, or -1 if no column is under the given point. */ + long getColumnAtPoint( [in] long X, [in] long Y ); - long getItemIndexAtPoint( [in] long x, [in] long y); + /** retrieves the row which a given point belongs to - /** Sets tooltip for row - @param textForTooltip - text, which will be shown as tooltip. - If only cell content should be displayed, leave sequence empty. - @param columnsForTooltip - column numbers, which define the cell content that should be shown in the tooltip. - If only text should be shown, leave this sequence empty. + @param X + the ordinate of the point, in pixel coordinates. + @param Y + the abscissa of the point, in pixel coordinates. + @return + the index of the row which the point lies in, or -1 if no row is under the given point. */ - void setToolTip( [in] sequence< string > textForTooltip, [in] sequence< long > columnsForTooltip); - + long getRowAtPoint( [in] long X, [in] long Y ); + + /** returns the column index of the currently active cell + + <p>If the grid control's does not contain any cells (which happens if the grid column model does not contain any + columns, or if grid data model does not contain any rows), then <code>-1</code> is returned.</p> + */ + long getCurrentColumn(); + + /** returns the row index of the currently active cell + + <p>If the grid control's does not contain any cells (which happens if the grid column model does not contain any + columns, or if grid data model does not contain any rows), then <code>-1</code> is returned.</p> + */ + long getCurrentRow(); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridControlListener.idl b/offapi/com/sun/star/awt/grid/XGridControlListener.idl deleted file mode 100644 index 4e7876cbe..000000000 --- a/offapi/com/sun/star/awt/grid/XGridControlListener.idl +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_awt_grid_XGridControlListener_idl__ -#define __com_sun_star_awt_grid_XGridControlListener_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -interface XGridControlListener -{ - -}; - -//============================================================================= - -}; }; }; }; }; - -#endif diff --git a/offapi/com/sun/star/awt/grid/XGridDataListener.idl b/offapi/com/sun/star/awt/grid/XGridDataListener.idl index 534c3d788..a03a60c27 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataListener.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataListener.idl @@ -52,20 +52,21 @@ module com { module sun { module star { module awt { module grid { interface XGridDataListener: com::sun::star::lang::XEventListener { - /** - Invoked after a row was added to the data model. + /** is called when one or more rows of data have been inserted into a grid control's data model. */ - void rowAdded( [in] GridDataEvent Event ); + void rowsInserted( [in] GridDataEvent Event ); - /** - Invoked after a row was added to the data model. + /** is called when one or more rows of data have been removed from a grid control's data model. */ - void rowRemoved( [in] GridDataEvent Event ); + void rowsRemoved( [in] GridDataEvent Event ); - /** - Invoked after a row was added to the data model. + /** is called when existing data in a grid control's data model has been modified. */ void dataChanged( [in] GridDataEvent Event ); + + /** is called when the title of one or more rows changed. + */ + void rowHeadingChanged( [in] GridDataEvent Event ); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridDataModel.idl b/offapi/com/sun/star/awt/grid/XGridDataModel.idl index 7489e4960..9b9ec840d 100644 --- a/offapi/com/sun/star/awt/grid/XGridDataModel.idl +++ b/offapi/com/sun/star/awt/grid/XGridDataModel.idl @@ -30,8 +30,9 @@ #include <com/sun/star/lang/XComponent.idl> +#include <com/sun/star/util/XCloneable.idl> #include <com/sun/star/awt/grid/XGridDataListener.idl> - +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> //============================================================================= @@ -45,86 +46,57 @@ module com { module sun { module star { module awt { module grid { @since OOo 3.3.0 */ -interface XGridDataModel: ::com::sun::star::lang::XComponent +interface XGridDataModel { - /** Specifies the height of each row. + /** implements life time control for the component */ - [attribute] long RowHeight; + interface ::com::sun::star::lang::XComponent; - /** Contains the row header. + /** allows cloning the complete column model */ - [attribute] sequence< string > RowHeaders; + interface ::com::sun::star::util::XCloneable; - /** Returns the content of each row. + /** denotes the number of rows for which the model can provide data */ - [attribute,readonly] sequence< sequence< any > > Data; + [attribute, readonly] long RowCount; - /**Specifies the width of row header. + /** denotes the number of columns for which the model can provide data */ - [attribute] long RowHeaderWidth; + [attribute, readonly] long ColumnCount; + + /** retrieves the data for a given cell - /** Returns the number of rows in in the model. - @returns - the number of rows. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the column or row index do not denote a valid cell position. */ - long getRowCount(); + any getCellData( [in] long Column, [in] long Row ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - /** Adds a row to the model. + /** retrieves the tool tip to be displayed when the mouse hovers over a given cell - @param headername - specifies the name of the row. - @param data - the content of the row. - */ - void addRow( [in] string headername, [in] sequence< any > data ); + <p>At the moment, only string tool tips are supported.</p> - /** Removes a row from the model. + <p>If <VOID/> is returned here, the cell's content will be displayed as tip, but only if it does + not fit into the cell.</p> - @param index - the index of the row that should be removed. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the column or row index do not denote a valid cell position. */ - void removeRow( [in] long index); + any getCellToolTip( [in] long Column, [in] long Row ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); - /** Removes all rows from the model. - */ - void removeAll(); - - /**Updates the content of a given cell. - @param row - the row index - @param column - the column index - @param value - the new value of the cell. - */ - void updateCell([in] long row, [in] long column, [in] any value ); - - /**Updates the content of a given row. - @param row - the row index - @param columns - column indexes of the cells, which should be updated - @param value - the new values of the cells. - */ - void updateRow([in] long row, [in] sequence< long > columns, [in] sequence< any > values); + /** retrieves the heading of a given row - //------------------------------------------------------------------------- + <p>A grid control will usually paint a row's title in the header column of the respective row.</p> - /** Adds a listener for the <type>GridDataEvent</type> posted after the grid changes. - @param Listener - the listener to add. - */ - [oneway] void addDataListener( [in] XGridDataListener listener); - - //------------------------------------------------------------------------- - - /** Removes a listener previously added with <method>addDataListener()</method>. - @param Listener - the listener to remove. - */ - [oneway] void removeDataListener( [in] XGridDataListener listener); - + <p>At the moment, only strings are supported as row headings.</p> + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the given index does not denote a valid row. + */ + any + getRowHeading( [in] long RowIndex ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); }; //============================================================================= diff --git a/offapi/com/sun/star/awt/grid/XGridSelection.idl b/offapi/com/sun/star/awt/grid/XGridSelection.idl index a94c06ba7..def1b79e6 100644 --- a/offapi/com/sun/star/awt/grid/XGridSelection.idl +++ b/offapi/com/sun/star/awt/grid/XGridSelection.idl @@ -41,37 +41,27 @@ module com { module sun { module star { module awt { module grid { */ interface XGridSelection { - /** Returns the lowest index of the selection. - @returns - the lowest index. - */ - long getMinSelectionIndex(); - - /** Returns the highest index of the selection. - @returns - the highest index. - */ - long getMaxSelectionIndex(); - /** Selects all rows. */ - [oneway] void selectAllRows(); + void selectAllRows(); + + /** selects a given row - /** Selects multiple rows. Previous selections will be removed. - @param rangeOfRows - array of rows indexes, which will be selected. + @param RowIndex + denotes the index of the row to select */ - [oneway] void selectRows( [in] sequence< long > rangeOfRows); + void selectRow( [in] long RowIndex ); /** Deselects all selected rows. */ - [oneway] void deselectAllRows(); + void deselectAllRows(); - /** Deselects selected rows. Selected rows, which aren't in the range remain selected. - @param rangeOfRows - array of rows indexes, which will be deselected. + /** removes the selection for a given row + + @param RowIndex + denotes the index of the row to deselect */ - [oneway] void deselectRows( [in] sequence< long > rangeOfRows); + void deselectRow( [in] long RowIndex ); /** Returns the indicies of all selected rows. @returns @@ -93,21 +83,11 @@ interface XGridSelection */ boolean isSelectedIndex( [in] long index); - /** Marks a row as selected. - @param index - the index of a row. - */ - [oneway] void selectRow( [in] long index); - - /* - [oneway] void selectColumn( [in] long x); - */ - /** Adds a listener for the <type>GridSelectionEvent</type> posted after the grid changes. @param listener the listener to add. */ - [oneway] void addSelectionListener( [in] XGridSelectionListener listener); + void addSelectionListener( [in] XGridSelectionListener listener); //------------------------------------------------------------------------- @@ -115,7 +95,7 @@ interface XGridSelection @param listener the listener to remove. */ - [oneway] void removeSelectionListener( [in] XGridSelectionListener listener); + void removeSelectionListener( [in] XGridSelectionListener listener); }; diff --git a/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl new file mode 100755 index 000000000..5e10820ff --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl @@ -0,0 +1,163 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XMutableGridDataModel_idl__ +#define __com_sun_star_awt_grid_XMutableGridDataModel_idl__ + +#include <com/sun/star/awt/grid/XGridDataModel.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** allows to modify the data represented by a <type>XGridDataModel</type> + */ +interface XMutableGridDataModel : XGridDataModel +{ + /** adds a row to the model. + + @param Heading + denotes the heading of the row. + @param Data + specifies the content of the row. + */ + void addRow( [in] any Heading, [in] sequence< any > Data ); + + /** adds multiple rows of data to the model. + @param Headings + denotes the headings of the to-be-added rows. + @param Data + specifies the data of the rows to be added. + @throws ::com::sun::star::lang::IllegalArgumentException + if <code>Titles</code> and <code>Data</code> are of different length. + */ + void addRows( [in] sequence< any > Headings, [in] sequence< sequence< any > > Data ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); + + /** removes a row of data from the model + + @param RowIndex + the index of the row that should be removed. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the given index is invalid + */ + void removeRow( [in] long RowIndex ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** Removes all rows from the model. + */ + void removeAllRows(); + + /** updates the content of the given cell + @param ColumnIndex + the column index of the to-be-updated cell + @param RowIndex + the row index of the to-be-updated cell + @param Value + the new value of the cell. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the row or column index is invalid + */ + void updateCellData( [in] long ColumnIndex, [in] long RowIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** updates the content of a given row. + + <p>The change in the data model will be notified to registered listeners via + <member">XGridDataListener::dataChanged</member>. The <member>GridDataEvent::FirstColumn</member> and + <member>GridDataEvent::LastColumn</member> will denote the smallest respectively largest column + index from <argColumnIndexes</arg>.</p> + + @param ColumnIndexes + contains the column indexes of the cells, which should be updated + @param RowIndex + contains the index of the row whose data is to be updated + @param Values + specifies the new values of the cells. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if one of the row indexes or the column index is invalid + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the lengths of the <code>ColumnIndexes</code> and <code>Values</code> sequences are not equal. + */ + void updateRowData( [in] sequence< long > ColumnIndexes, [in] long RowIndex, [in] sequence< any > Values ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException + , ::com::sun::star::lang::IllegalArgumentException); + + /** sets a new title for a given row. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the given index does not denote a valid row. + */ + void + updateRowHeading( [in] long RowIndex, [in] any Heading ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** updates the tooltip to be displayed for a given cell + + @see XGridDataModel::getCellToolTip + */ + void updateCellToolTip( [in] long ColumnIndex, [in] long RowIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** updates the tooltip for all cells of a given row + + <p>Effectively this method is a shortcut for calling <member>updateCellToolTip</member> multiple + times in a row, for all cells of a given row.</p> + + @see XGridDataModel::getCellToolTip + @see updateCellToolTip + */ + void updateRowToolTip( [in] long RowIndex, [in] any Value ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + //------------------------------------------------------------------------- + + /** registers listener to be notified of data changes in the model + @param Listener + specifies the listener to register + */ + void addGridDataListener( [in] XGridDataListener Listener ); + + //------------------------------------------------------------------------- + + /** revokes a listener which was previously registered via <member>addGridDataListener</member> + @param Listener + specifies the listener to revoke. + */ + void removeGridDataListener( [in] XGridDataListener Listener ); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/XSortableGridData.idl b/offapi/com/sun/star/awt/grid/XSortableGridData.idl new file mode 100755 index 000000000..dd40d2a46 --- /dev/null +++ b/offapi/com/sun/star/awt/grid/XSortableGridData.idl @@ -0,0 +1,77 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ +#define __com_sun_star_awt_grid_XSortableGridData_idl__ + +#include <com/sun/star/lang/IndexOutOfBoundsException.idl> +#include <com/sun/star/beans/Pair.idl> + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** allows to sort the data represented by a <type>XGridDataModel</type> + */ +interface XSortableGridData +{ + /** sorts the rows represented by the model by a given column's data. + + @param ColumnIndex + the index of the column whose data should be used as sort key + @param SortAscending + is <TRUE/> if the data should be sorted ascending, <FALSE/> otherwise. + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if <code>ColumnIndex</code> does not denote a valid column. + */ + void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** removes any possibly present sorting of the grid data + */ + void removeColumnSort(); + + /** returns the current sort order. + + @return + a structure describing the current sort order. <member scope="::com::sun::star::beans">Pair::First</member> + denotes the column by which the data is sorted, or -1 if the data is currently unsorted. + <member scope="::com::sun::star::beans">Pair::Second</member> is <TRUE/> if the data is sorted ascending, + <FALSE/> otherwise. + */ + ::com::sun::star::beans::Pair< long, boolean > + getCurrentSortOrder(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/ScrollBarMode.idl b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl index d0bf44ff8..a07dabbbb 100644..100755 --- a/offapi/com/sun/star/awt/grid/ScrollBarMode.idl +++ b/offapi/com/sun/star/awt/grid/XSortableMutableGridDataModel.idl @@ -1,7 +1,6 @@ /************************************************************************* - * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -24,47 +23,39 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_awt_grid_ScrollBarMode_idl__ -#define __com_sun_star_awt_grid_ScrollBarMode_idl__ - - -//============================================================================= - -module com { module sun { module star { module awt { module grid { - -//============================================================================= - -/** specifies the adjustment type. + +#ifndef __com_sun_star_awt_grid_XSortableMutableGridDataModel_idl__ +#define __com_sun_star_awt_grid_XSortableMutableGridDataModel_idl__ + +#include <com/sun/star/awt/grid/XMutableGridDataModel.idl> +#include <com/sun/star/awt/grid/XSortableGridData.idl> + +//================================================================================================================== + +module com { module sun { module star { module awt { module grid { + +//================================================================================================================== + +/** describes a grid control data model whose data can be modified and sorted. */ -enum ScrollBarMode -{ - //------------------------------------------------------------------------- - - /** adjustment is originated by a line jump. +interface XSortableMutableGridDataModel +{ + /** provides access to the basic functionality of a grid data model, plus functions to modify it. + */ + interface XMutableGridDataModel; - <p>A line jump can, for example, be caused by a click on - one of the pointer buttons.</p> - */ - AUTO, - - //------------------------------------------------------------------------- - - /** adjustment is originated by a page jump. - - <p>A page jump can, for example, be caused by a click in the - background area of the scrollbar (neither one of the pointer - buttons, nor the thumb).</p> - */ - ON, + /** provides means to sort the data represented by the model. - OFF + <p>If you set a new column sort order, the implementation will notify the registered <type>XGridDataListener</type>s + via a call to its <member>XGridDataListener::dataChanged</member> method.</p> + */ + interface XSortableGridData; +}; +//================================================================================================================== - -}; - -//============================================================================= - }; }; }; }; }; - -#endif + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/grid/makefile.mk b/offapi/com/sun/star/awt/grid/makefile.mk index 02c159f8f..8499dca27 100644 --- a/offapi/com/sun/star/awt/grid/makefile.mk +++ b/offapi/com/sun/star/awt/grid/makefile.mk @@ -39,27 +39,27 @@ PACKAGE=com$/sun$/star$/awt$/grid # ------------------------------------------------------------------------ IDLFILES=\ GridColumnEvent.idl\ - GridControlEvent.idl\ GridDataEvent.idl\ SelectionEventType.idl\ GridSelectionEvent.idl\ - XGridControlListener.idl\ XGridSelectionListener.idl\ XGridSelection.idl\ XGridColumn.idl\ XGridColumnListener.idl\ XGridDataListener.idl\ - XGridCell.idl\ - XGridCellRenderer.idl\ DefaultGridDataModel.idl\ XGridDataModel.idl\ + XMutableGridDataModel.idl\ XGridColumnModel.idl\ - ScrollBarMode.idl\ XGridControl.idl\ UnoControlGrid.idl\ UnoControlGridModel.idl\ GridInvalidDataException.idl\ - GridInvalidModelException.idl + GridInvalidModelException.idl\ + XSortableGridData.idl\ + SortableGridDataModel.idl\ + XSortableMutableGridDataModel.idl\ + # ------------------------------------------------------------------ .INCLUDE : target.mk diff --git a/offapi/com/sun/star/awt/tree/XTreeControl.idl b/offapi/com/sun/star/awt/tree/XTreeControl.idl index dafdedc1a..33713d470 100644 --- a/offapi/com/sun/star/awt/tree/XTreeControl.idl +++ b/offapi/com/sun/star/awt/tree/XTreeControl.idl @@ -154,7 +154,7 @@ interface XTreeControl @throws ::com::sun::star::lang::IllegalArgumentException if <var>Node</var> is not a valid node of the corresponding <type>XTreeDataModel</type>. - @raises ExpandVetoException + @throws ExpandVetoException if collapsing <var>Node</var> failed because at least one of the registered <type>XTreeExpansionListener</type> raised a <type>ExpandVetoException</type>. */ diff --git a/offapi/com/sun/star/sdb/XSubDocument.idl b/offapi/com/sun/star/sdb/XSubDocument.idl index c722259f2..92a09e586 100644 --- a/offapi/com/sun/star/sdb/XSubDocument.idl +++ b/offapi/com/sun/star/sdb/XSubDocument.idl @@ -52,7 +52,7 @@ interface XSubDocument or an <type scope="com::sun::star::frame">XController</type> if the sub document does not have an own model. - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during opening the document */ ::com::sun::star::lang::XComponent @@ -66,7 +66,7 @@ interface XSubDocument or an <type scope="com::sun::star::frame">XController</type> if the sub document does not have an own model. - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during opening the document */ ::com::sun::star::lang::XComponent @@ -75,7 +75,7 @@ interface XSubDocument /** stores the sub document, if it had previously been opened in either mode - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during storing the document */ void store() @@ -86,7 +86,7 @@ interface XSubDocument @return <TRUE/> if and only if the document could be closed, <FALSE/> otherwise, e.g. if the closing has been vetoed by the user. - @raises ::com::sun::star::lang::WrappedTargetException + @throws ::com::sun::star::lang::WrappedTargetException if an error occurs during closing the document */ boolean close() diff --git a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl index f8d0ac311..2e05e84ed 100644 --- a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl +++ b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl @@ -66,7 +66,7 @@ interface XMultiSelectionSupplier: XSelectionSupplier added to the current selection. For example, if the selection already contains objects that are forbidden to be selected together with <var>Selection</var> - @raises com::sun::star::lang::IllegalArgumentException + @throws com::sun::star::lang::IllegalArgumentException If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>. <p>Adding an object to the selection that is already part of the selection should not raise this exception</p> */ @@ -87,7 +87,7 @@ interface XMultiSelectionSupplier: XSelectionSupplier added to the current selection. For example, if the selection already contains objects that are forbidden to be selected together with <var>Selection</var>. - @raises com::sun::star::lang::IllegalArgumentException + @throws com::sun::star::lang::IllegalArgumentException If <var>Selection</var> is not a selectable object for this <type>XMultiSelectionSupplier</type>. <p>Removing an object from the selection that is not part of the selection should not raise this exception</p> */ diff --git a/offapi/com/sun/star/xml/sax/XFastAttributeList.idl b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl index 8a3d1180a..0b6b8f417 100644 --- a/offapi/com/sun/star/xml/sax/XFastAttributeList.idl +++ b/offapi/com/sun/star/xml/sax/XFastAttributeList.idl @@ -92,7 +92,7 @@ interface XFastAttributeList: com::sun::star::uno::XInterface @returns The integer token of the value from the attribute or <const>FastToken::Invalid</const> - @raises SAXEXception + @throws SAXEXception if the attribute is not available */ @@ -137,7 +137,7 @@ interface XFastAttributeList: com::sun::star::uno::XInterface @returns The string value from the attribute. - @raises SAXEXception + @throws SAXEXception if the attribute is not available */ diff --git a/offapi/type_reference/typelibrary_history.txt b/offapi/type_reference/typelibrary_history.txt index 7dcd438d5..16745ab9f 100644 --- a/offapi/type_reference/typelibrary_history.txt +++ b/offapi/type_reference/typelibrary_history.txt @@ -158,3 +158,7 @@ Update reference type library with the version of OOo 3.2.1. The new reference type library is taken from the release source tree OOO320 m19. +01/28/11 (JSC): TaskID=116682 + Update css.awt.UnoControlDialog to reflect the supported XDialog2 interface + additionally to XDialog + diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb Binary files differindex 6d9f76133..02cd79c9e 100644 --- a/offapi/type_reference/types.rdb +++ b/offapi/type_reference/types.rdb |