Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / awt / grid / SortableGridDataModel.idl
bloba44955043e9269fd851dc8a0365fcdd97138e4cf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_awt_grid_SortableGridDataModel_idl__
29 #define __com_sun_star_awt_grid_SortableGridDataModel_idl__
31 #include <com/sun/star/i18n/XCollator.idl>
32 #include <com/sun/star/lang/IllegalArgumentException.idl>
34 //==================================================================================================================
36 module com { module sun { module star { module awt { module grid {
38 interface XSortableMutableGridDataModel;
39 interface XMutableGridDataModel;
41 //==================================================================================================================
43 /** provides a default implementation of a <type>XSortableGridData</type>.
45 <p>This service must be created with a secondary grid data model, which all actual data requests are delegated to.
46 But before providing this data to the service's own clients, it is sorted, according to the sort order defined
47 via the <code>XSortableGridData</code> interface.</p>
49 <p>The service implementation is able to compare the default scalar types, plus strings.</p>
51 <p>For determining the data type of a column which the data should be sorted by, the first non-<VOID/> data encountered
52 in this column is taken into account. Further read requests to this column will assume that all non-<VOID/> data is of
53 the same type.</p>
55 <p>Consequently, you cannot use this service with data sets containing heterogenous data in a given column.</p>
57 <p>All requests made via the <type>XMutableGridDataModel</type> are delegated to the <code>XMutableGridDataModel</code>
58 instance passed in the service constructor.</p>
60 <p>Note that changing the data might result in the sort order being destroyed. If you want to ensure
61 that the data represented by the model is still sorted after your modifications, you should call
62 <member>XSortableGridData::sortByColumn</member>, again.</p>
64 service SortableGridDataModel : XSortableMutableGridDataModel
66 /** creates a new instance of the <code>SortableGridDataModel</code>
68 <p>For string comparison, a default <type scope="::com::sun::star::i18n">Collator</type>, based on the system's
69 locale, will be used.</p>
71 @param DelegatorModel
72 the data model to which read requests are delegated.
73 @throws ::com::sun::star::lang::IllegalArgumentException
74 if the given <code>DelegatorModel</code> is <NULL/>
76 create(
77 [in] XMutableGridDataModel DelegatorModel
79 raises ( ::com::sun::star::lang::IllegalArgumentException );
81 /** creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison.
83 @param DelegatorModel
84 is the data model to which read requests are delegated
85 @param Collator
86 is the collator to be used for string comparison
87 @throws ::com::sun::star::lang::IllegalArgumentException
88 if the given <code>DelegatorModel</code> is <NULL/>
90 createWithCollator(
91 [in] XMutableGridDataModel DelegatorModel,
92 [in] ::com::sun::star::i18n::XCollator Collator
94 raises ( ::com::sun::star::lang::IllegalArgumentException );
97 //==================================================================================================================
99 }; }; }; }; };
101 //==================================================================================================================
103 #endif
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */