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_sheet_DataPilotFieldGroupInfo_idl__
25#define __com_sun_star_sheet_DataPilotFieldGroupInfo_idl__
26
27#ifndef __com_sun_star_sheet_XDataPilotField_idl__
28#include <com/sun/star/sheet/XDataPilotField.idl>
29#endif
30#ifndef __com_sun_star_container_XNameAccess_idl__
31#include <com/sun/star/container/XNameAccess.idl>
32#endif
33
34//=============================================================================
35
36module com {  module sun {  module star {  module sheet {
37
38//=============================================================================
39
40/** contains the grouping information of a <type>DataPilotField</type>.
41 */
42published struct DataPilotFieldGroupInfo
43{
44    //-------------------------------------------------------------------------
45
46    /** specifies whether the start value for the grouping is taken
47        automatically from the minimum of the item values.
48
49        <p><ul>
50        <li>If <FALSE/> is set, the value from <member>Start</member> will be
51        used as start value for the grouping.</li>
52        <li>If <TRUE/> is set, the start value for the grouping will be
53        calculated automatically from the minimum of all member values of the
54        DataPilot field.</li>
55        </ul></p>
56     */
57    boolean HasAutoStart;
58
59    //-------------------------------------------------------------------------
60
61    /** specifies whether the end value for the grouping is taken
62        automatically from the maximum of the item values.
63
64        <p><ul>
65        <li>If <FALSE/> is set, the value from <member>End</member> will be
66        used as end value for the grouping.</li>
67        <li>If <TRUE/> is set, the end value for the grouping will be
68        calculated automatically from the maximum of all member values of the
69        DataPilot field.</li>
70        </ul></p>
71     */
72    boolean HasAutoEnd;
73
74    //-------------------------------------------------------------------------
75
76    /** specifies whether date values are grouped by ranges of days.
77
78        <p><ul>
79        <li>If <FALSE/> is set, and <member>GroupBy</member> contains zero,
80        grouping is performed inplace on the item values.</li>
81        <li>If <FALSE/> is set, and <member>GroupBy</member> contains one or
82        more flags from <type>DataPilotFieldGroupBy</type>, grouping is
83        performed on date or time.</li>
84        <li>If <TRUE/> is set, <member>Step</member> contains a value greater
85        than or equal to 1, and <member>GroupBy</member> set to <const>
86        DataPilotFieldGroupBy::DAYS</const>, grouping is performed on ranges
87        of days (see descriptions for <member>
88        XDataPilotFieldGrouping::createDateGroup</member> for more details
89        about day grouping).</li>
90        </ul></p>
91     */
92    boolean HasDateValues;
93
94    //-------------------------------------------------------------------------
95
96    /** specifies the start value for the grouping if <member>HasAutoStart
97        </member> is set to <FALSE/>.
98     */
99    double Start;
100
101    //-------------------------------------------------------------------------
102
103    /** specifies the end value for the grouping if <member>HasAutoEnd
104        </member> is set to <FALSE/>.
105     */
106    double End;
107
108    //-------------------------------------------------------------------------
109
110    /** specifies the size of the ranges for numeric or day grouping.
111
112        <p>Example: With <member>HasAutoStart</member> set to <FALSE/>,
113        <member>Start</member> set to 2, and <member>Step</member> set to 3,
114        the first group will contain all values greater than or equal to 2 and
115        less than 5. The second group will contain all values greater than or
116        equal to 5 and less then 8, and so on.</p>
117     */
118    double Step;
119
120    //-------------------------------------------------------------------------
121
122    /** specifies the grouping of the date values.
123
124        @see DataPilotFieldGroupBy
125     */
126    long GroupBy;
127
128    //-------------------------------------------------------------------------
129
130    /** contains the source DataPilot field grouping is based on. Will be
131        <NULL/> if this field is not grouped or contains numeric grouping.
132
133        @see DataPilotField
134     */
135    XDataPilotField SourceField;
136
137    //-------------------------------------------------------------------------
138
139    /** specifies the named groups in this field if there are some.
140
141        <p>The returned object is an instance of <type>DataPilotFieldGroups
142        </type>. The collection of groups can be modified by inserting,
143        removing, replacing, or renaming single groups or item names in the
144        groups. When writing back this struct containing such a changed
145        collection of groups to the <member>DataPilotField::GroupInfo</member>
146        property, the modified grouping settings are applied at the DataPilot
147        field.</p>
148
149        @see DataPilotField
150        @see DataPilotFieldGroups
151     */
152    com::sun::star::container::XNameAccess Groups;
153};
154
155//=============================================================================
156
157}; }; }; };
158
159#endif
160
161