xref: /trunk/main/offapi/com/sun/star/util/XSortable.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_util_XSortable_idl__
24cdf0e10cSrcweir#define __com_sun_star_util_XSortable_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
31cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir
35cdf0e10cSrcweir//=============================================================================
36cdf0e10cSrcweir
37cdf0e10cSrcweirmodule com {  module sun {  module star {  module util {
38cdf0e10cSrcweir
39cdf0e10cSrcweir//=============================================================================
40cdf0e10cSrcweir
41cdf0e10cSrcweir/** makes it possible to sort the contents of this object.
42cdf0e10cSrcweir
43*a893be29SPedro Giffuni    <p>The available properties describing the sort criteria are
44cdf0e10cSrcweir    defined in the sort descriptor implemented by the object that
45cdf0e10cSrcweir    implements this interface.</p>
46cdf0e10cSrcweir
47cdf0e10cSrcweir    <p>There are older deprecated sort descriptors:</p>
48cdf0e10cSrcweir    <ul>
49cdf0e10cSrcweir        <li>com::sun::star::util::SortDescriptor</li>
50cdf0e10cSrcweir        <li>com::sun::star::table::TableSortDescriptor</li>
51cdf0e10cSrcweir        <li>com::sun::star::text::TextSortDescriptor</li>
52cdf0e10cSrcweir    </ul>
53cdf0e10cSrcweir
54cdf0e10cSrcweir    <p>And a new set of sort descriptors:</p>
55cdf0e10cSrcweir    <ul>
56cdf0e10cSrcweir        <li>com::sun::star::util::SortDescriptor2</li>
57cdf0e10cSrcweir        <li>com::sun::star::table::TableSortDescriptor2</li>
58cdf0e10cSrcweir        <li>com::sun::star::text::TextSortDescriptor2</li>
59cdf0e10cSrcweir    </ul>
60cdf0e10cSrcweir
61cdf0e10cSrcweir    <p>Both types may be implemented by the same object.
62cdf0e10cSrcweir    When calling the sort method however properties from different
63cdf0e10cSrcweir    descriptors must not be mixed.</p>
64cdf0e10cSrcweir */
65cdf0e10cSrcweirpublished interface XSortable: com::sun::star::uno::XInterface
66cdf0e10cSrcweir{
67cdf0e10cSrcweir    //-------------------------------------------------------------------------
68cdf0e10cSrcweir    /** @returns
69cdf0e10cSrcweir            a sequence of properties which allows to specify/modify the
70cdf0e10cSrcweir            sort criteria.
71cdf0e10cSrcweir
72cdf0e10cSrcweir            <p>The set of properties is specific to the type of object that
73cdf0e10cSrcweir            implements this interface. Therefore they can usually be used
74cdf0e10cSrcweir            only for objects of that same type.</p>
75cdf0e10cSrcweir
76cdf0e10cSrcweir        @see com::sun::star::util::SortDescriptor
77cdf0e10cSrcweir        @see com::sun::star::table::TableSortDescriptor
78cdf0e10cSrcweir        @see com::sun::star::text::TextSortDescriptor
79cdf0e10cSrcweir        @see com::sun::star::util::SortDescriptor2
80cdf0e10cSrcweir        @see com::sun::star::table::TableSortDescriptor2
81cdf0e10cSrcweir        @see com::sun::star::text::TextSortDescriptor2
82cdf0e10cSrcweir
83cdf0e10cSrcweir     */
84cdf0e10cSrcweir    sequence< com::sun::star::beans::PropertyValue > createSortDescriptor();
85cdf0e10cSrcweir
86cdf0e10cSrcweir    //-------------------------------------------------------------------------
87cdf0e10cSrcweir    /** sorts the contents of the object according to the specified
88cdf0e10cSrcweir        properties.
89cdf0e10cSrcweir
90cdf0e10cSrcweir        <p>The specified properties are usually the same or a subset of
91cdf0e10cSrcweir        those obtained by calling <member>createSortDescriptor</member>
92cdf0e10cSrcweir        on the same type of object.<p>
93cdf0e10cSrcweir
94cdf0e10cSrcweir        @see com::sun::star::util::SortDescriptor
95cdf0e10cSrcweir        @see com::sun::star::table::TableSortDescriptor
96cdf0e10cSrcweir        @see com::sun::star::text::TextSortDescriptor
97cdf0e10cSrcweir        @see com::sun::star::util::SortDescriptor2
98cdf0e10cSrcweir        @see com::sun::star::table::TableSortDescriptor2
99cdf0e10cSrcweir        @see com::sun::star::text::TextSortDescriptor2
100cdf0e10cSrcweir     */
101cdf0e10cSrcweir    void sort( [in] sequence< com::sun::star::beans::PropertyValue > xDescriptor );
102cdf0e10cSrcweir
103cdf0e10cSrcweir};
104cdf0e10cSrcweir
105cdf0e10cSrcweir//=============================================================================
106cdf0e10cSrcweir
107cdf0e10cSrcweir}; }; }; };
108cdf0e10cSrcweir
109cdf0e10cSrcweir#endif
110