xref: /aoo42x/main/offapi/com/sun/star/util/XSortable.idl (revision a893be29)
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#ifndef __com_sun_star_util_XSortable_idl__
24#define __com_sun_star_util_XSortable_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_beans_PropertyValue_idl__
31#include <com/sun/star/beans/PropertyValue.idl>
32#endif
33
34
35//=============================================================================
36
37module com {  module sun {  module star {  module util {
38
39//=============================================================================
40
41/** makes it possible to sort the contents of this object.
42
43    <p>The available properties describing the sort criteria are
44    defined in the sort descriptor implemented by the object that
45    implements this interface.</p>
46
47    <p>There are older deprecated sort descriptors:</p>
48    <ul>
49        <li>com::sun::star::util::SortDescriptor</li>
50        <li>com::sun::star::table::TableSortDescriptor</li>
51        <li>com::sun::star::text::TextSortDescriptor</li>
52    </ul>
53
54    <p>And a new set of sort descriptors:</p>
55    <ul>
56        <li>com::sun::star::util::SortDescriptor2</li>
57        <li>com::sun::star::table::TableSortDescriptor2</li>
58        <li>com::sun::star::text::TextSortDescriptor2</li>
59    </ul>
60
61    <p>Both types may be implemented by the same object.
62    When calling the sort method however properties from different
63    descriptors must not be mixed.</p>
64 */
65published interface XSortable: com::sun::star::uno::XInterface
66{
67	//-------------------------------------------------------------------------
68	/** @returns
69            a sequence of properties which allows to specify/modify the
70            sort criteria.
71
72            <p>The set of properties is specific to the type of object that
73            implements this interface. Therefore they can usually be used
74            only for objects of that same type.</p>
75
76        @see com::sun::star::util::SortDescriptor
77        @see com::sun::star::table::TableSortDescriptor
78        @see com::sun::star::text::TextSortDescriptor
79        @see com::sun::star::util::SortDescriptor2
80        @see com::sun::star::table::TableSortDescriptor2
81        @see com::sun::star::text::TextSortDescriptor2
82
83     */
84    sequence< com::sun::star::beans::PropertyValue > createSortDescriptor();
85
86	//-------------------------------------------------------------------------
87	/** sorts the contents of the object according to the specified
88        properties.
89
90        <p>The specified properties are usually the same or a subset of
91        those obtained by calling <member>createSortDescriptor</member>
92        on the same type of object.<p>
93
94        @see com::sun::star::util::SortDescriptor
95        @see com::sun::star::table::TableSortDescriptor
96        @see com::sun::star::text::TextSortDescriptor
97        @see com::sun::star::util::SortDescriptor2
98        @see com::sun::star::table::TableSortDescriptor2
99        @see com::sun::star::text::TextSortDescriptor2
100     */
101    void sort( [in] sequence< com::sun::star::beans::PropertyValue > xDescriptor );
102
103};
104
105//=============================================================================
106
107}; }; }; };
108
109#endif
110