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_table_TableSortField_idl__
24#define __com_sun_star_table_TableSortField_idl__
25
26#ifndef __com_sun_star_lang_Locale_idl__
27#include <com/sun/star/lang/Locale.idl>
28#endif
29#ifndef __com_sun_star_table_TableSortFieldType_idl__
30#include <com/sun/star/table/TableSortFieldType.idl>
31#endif
32
33
34//=============================================================================
35
36module com {  module sun {  module star {  module table {
37
38//=============================================================================
39/** describes how to sort a single field (row/column) in a tables
40    sort descriptor.
41
42    @see com::sun::star::table::TableSortDescriptor2
43
44	@since OpenOffice 1.1.2
45 */
46published struct TableSortField
47{
48    //-------------------------------------------------------------------------
49    /** index of the row or column in the table to be sorted; 0-based.
50     */
51    long Field;
52
53    //-------------------------------------------------------------------------
54    /** <TRUE/> if data are sorted in ascending order,
55        <FALSE/> if in descending order.
56     */
57    boolean IsAscending;
58
59    //-------------------------------------------------------------------------
60    /** specifies if the case of letters is important when comparing entries.
61     */
62    boolean IsCaseSensitive;
63
64    //-------------------------------------------------------------------------
65    /** type of contents in the field.
66
67        <p>If the value is
68        <member scope="com::sun::star::table::TableSortFieldType">AUTOMATIC</member>
69        the algorithm used for sorting is application specific.
70        Especially it may or may not use the values given by
71        'CollatorLocale' and 'CollatorAlgorithm'.</p>
72     */
73    com::sun::star::table::TableSortFieldType FieldType;
74
75    //-------------------------------------------------------------------------
76    /** the locale used by the collator when comparing/sorting text.
77
78        <p>This property will not be used when the 'FieldType' is
79        <member scope="com::sun::star::table::TableSortFieldType">NUMERIC</member>
80        </p>
81
82        @ see   com::sun::star::i18n::XCollator
83	 */
84    com::sun::star::lang::Locale CollatorLocale;
85
86    //-------------------------------------------------------------------------
87    /** the algorithm used by the collator when comparing/sorting text.
88
89        <p>This property will not be used when the 'FieldType' is
90        <member scope="com::sun::star::table::TableSortFieldType">NUMERIC</member>
91        </p>
92
93        @ see   com::sun::star::i18n::XCollator
94     */
95    string CollatorAlgorithm;
96
97};
98
99//=============================================================================
100
101}; }; }; };
102
103#endif
104