1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_awt_grid_XSortableGridData_idl__ 25#define __com_sun_star_awt_grid_XSortableGridData_idl__ 26 27#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 28#include <com/sun/star/beans/Pair.idl> 29 30//================================================================================================================== 31 32module com { module sun { module star { module awt { module grid { 33 34//================================================================================================================== 35 36/** allows to sort the data represented by a <type>XGridDataModel</type> 37 */ 38interface XSortableGridData 39{ 40 /** sorts the rows represented by the model by a given column's data. 41 42 @param ColumnIndex 43 the index of the column whose data should be used as sort key 44 @param SortAscending 45 is <TRUE/> if the data should be sorted ascending, <FALSE/> otherwise. 46 @throws ::com::sun::star::lang::IndexOutOfBoundsException 47 if <code>ColumnIndex</code> does not denote a valid column. 48 */ 49 void sortByColumn( [in] long ColumnIndex, [in] boolean SortAscending ) 50 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 51 52 /** removes any possibly present sorting of the grid data 53 */ 54 void removeColumnSort(); 55 56 /** returns the current sort order. 57 58 @return 59 a structure describing the current sort order. <member scope="::com::sun::star::beans">Pair::First</member> 60 denotes the column by which the data is sorted, or -1 if the data is currently unsorted. 61 <member scope="::com::sun::star::beans">Pair::Second</member> is <TRUE/> if the data is sorted ascending, 62 <FALSE/> otherwise. 63 */ 64 ::com::sun::star::beans::Pair< long, boolean > 65 getCurrentSortOrder(); 66}; 67 68//================================================================================================================== 69 70}; }; }; }; }; 71 72//================================================================================================================== 73 74#endif 75