1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir#ifndef __com_sun_star_sheet_XDataPilotFieldGrouping_idl__
29*cdf0e10cSrcweir#define __com_sun_star_sheet_XDataPilotFieldGrouping_idl__
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
32*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
33*cdf0e10cSrcweir#endif
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir#ifndef __com_sun_star_sheet_DataPilotFieldGroupInfo_idl__
36*cdf0e10cSrcweir#include <com/sun/star/sheet/DataPilotFieldGroupInfo.idl>
37*cdf0e10cSrcweir#endif
38*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir//=============================================================================
43*cdf0e10cSrcweir
44*cdf0e10cSrcweirmodule com {  module sun {  module star {  module sheet {
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir//=============================================================================
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir/** Provides methods to create new DataPilot fields where some or all items of
49*cdf0e10cSrcweir    this DataPilot field are grouped in some way.
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir    @see DataPilotField
52*cdf0e10cSrcweir */
53*cdf0e10cSrcweirpublished interface XDataPilotFieldGrouping: com::sun::star::uno::XInterface
54*cdf0e10cSrcweir{
55*cdf0e10cSrcweir    //-------------------------------------------------------------------------
56*cdf0e10cSrcweir
57*cdf0e10cSrcweir    /** Creates a new DataPilot field which contains a group containing the
58*cdf0e10cSrcweir        given DataPilot field items (members).
59*cdf0e10cSrcweir
60*cdf0e10cSrcweir        <p>It is possible to create multiple groups by calling this method
61*cdf0e10cSrcweir        several times at the same DataPilot field. On subsequent calls, the
62*cdf0e10cSrcweir        DataPilot field created at the first call is used to insert the new
63*cdf0e10cSrcweir        groups.</p>
64*cdf0e10cSrcweir
65*cdf0e10cSrcweir        <p>The collection of groups can be accessed via the
66*cdf0e10cSrcweir        <member>DataPilotField::GroupInfo</member> property. The returned
67*cdf0e10cSrcweir        struct contains the sequence of groups in its member
68*cdf0e10cSrcweir        <member>DataPilotFieldGroupInfo::Groups</member>.</p>
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir        @param aItems
71*cdf0e10cSrcweir            a sequence containing the names of the items (members) which will
72*cdf0e10cSrcweir            be part of the new group. Must be names of items contained in the
73*cdf0e10cSrcweir            current field.
74*cdf0e10cSrcweir
75*cdf0e10cSrcweir        @returns
76*cdf0e10cSrcweir            the new created field if there is one created on the first call of
77*cdf0e10cSrcweir            this method. <NULL/> is returned on subsequent calls.
78*cdf0e10cSrcweir
79*cdf0e10cSrcweir        @see DataPilotField
80*cdf0e10cSrcweir        @see DataPilotFieldGroupInfo
81*cdf0e10cSrcweir     */
82*cdf0e10cSrcweir    XDataPilotField createNameGroup([in] sequence< string > aItems)
83*cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException );
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir    //-------------------------------------------------------------------------
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir    /** Groups the members of this field by dates, according to the passed
88*cdf0e10cSrcweir        settings.
89*cdf0e10cSrcweir
90*cdf0e10cSrcweir        <p>If this field is already grouped by dates, a new DataPilot field
91*cdf0e10cSrcweir        will be created and returned. If this field is not grouped at all, the
92*cdf0e10cSrcweir        date grouping is perfomed inside of this field (no new field will be
93*cdf0e10cSrcweir        created). There must not be any other grouping (by member names or by
94*cdf0e10cSrcweir        numeric ranges), otherwise an exception is thrown.</p>
95*cdf0e10cSrcweir
96*cdf0e10cSrcweir        @param aInfo
97*cdf0e10cSrcweir            contains the information how to group the items of the field. The
98*cdf0e10cSrcweir            members of this struct have to fulfill the following requirements:
99*cdf0e10cSrcweir
100*cdf0e10cSrcweir            <ul>
101*cdf0e10cSrcweir            <li>If the member <member>DataPilotFieldGroupInfo::HasAutoStart
102*cdf0e10cSrcweir            </member> is set to <FALSE/>, then the value of <member>
103*cdf0e10cSrcweir            DataPilotFieldGroupInfo::Start</member> must be a floating-point
104*cdf0e10cSrcweir            value representing a valid date/time value (if <member>
105*cdf0e10cSrcweir            DataPilotFieldGroupInfo::HasAutoStart</member> is set to <TRUE/>,
106*cdf0e10cSrcweir            the value of <member>DataPilotFieldGroupInfo::Start</member> will
107*cdf0e10cSrcweir            be ignored).</li>
108*cdf0e10cSrcweir
109*cdf0e10cSrcweir            <li>If the member <member>DataPilotFieldGroupInfo::HasAutoEnd
110*cdf0e10cSrcweir            </member> is set to <FALSE/>, then the value of <member>
111*cdf0e10cSrcweir            DataPilotFieldGroupInfo::End</member> must be a floating-point
112*cdf0e10cSrcweir            value representing a valid date/time value( if <member>
113*cdf0e10cSrcweir            DataPilotFieldGroupInfo::HasAutoEnd</member> is set to <TRUE/>,
114*cdf0e10cSrcweir            the value of <member>DataPilotFieldGroupInfo::End</member> will be
115*cdf0e10cSrcweir            ignored).</li>
116*cdf0e10cSrcweir
117*cdf0e10cSrcweir            <li>If the members <member>DataPilotFieldGroupInfo::HasAutoStart
118*cdf0e10cSrcweir            </member> and <member>DataPilotFieldGroupInfo::HasAutoEnd</member>
119*cdf0e10cSrcweir            are set to <FALSE/> both, then the value of <member>
120*cdf0e10cSrcweir            DataPilotFieldGroupInfo::Start</member> must be less than or equal
121*cdf0e10cSrcweir            to the value of <member>DataPilotFieldGroupInfo::End</member>.</li>
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir            <li>The member <member>DataPilotFieldGroupInfo::HasDateValues</member>
124*cdf0e10cSrcweir            must be set to <TRUE/>.</li>
125*cdf0e10cSrcweir
126*cdf0e10cSrcweir            <li>The member <member>DataPilotFieldGroupInfo::Step</member> must
127*cdf0e10cSrcweir            be zero, unless ranges of days have to be grouped (see the
128*cdf0e10cSrcweir            description of the member GroupBy below), in that case the value
129*cdf0e10cSrcweir            must be greater than or equal to 1 and less than or equal to 32767.
130*cdf0e10cSrcweir            The fractional part of the value will be ignored.</li>
131*cdf0e10cSrcweir
132*cdf0e10cSrcweir            <li>The member <member>DataPilotFieldGroupInfo::GroupBy</member>
133*cdf0e10cSrcweir            must contain exactly one of the flags from <type>DataPilotFieldGroupBy</type>.
134*cdf0e10cSrcweir            A combination of several flags will not be accepted. If
135*cdf0e10cSrcweir            <const>DataPilotFieldGroupBy::DAYS</const> is specified, the
136*cdf0e10cSrcweir            value of the member <member>DataPilotFieldGroupInfo::Step</member>
137*cdf0e10cSrcweir            will specify the type of day grouping (see above). If that value
138*cdf0e10cSrcweir            is zero, grouping is performed on all days of the year (e.g. the
139*cdf0e10cSrcweir            members containing the 1st of January of any year are grouped
140*cdf0e10cSrcweir            together). If that value is greater than zero, grouping is done on
141*cdf0e10cSrcweir            ranges of days, and the value specifies the number of days grouped
142*cdf0e10cSrcweir            into one range (e.g. a value of 7 groups the members of a week
143*cdf0e10cSrcweir            into a range).</li>
144*cdf0e10cSrcweir
145*cdf0e10cSrcweir            <li>The contents of the member <member>
146*cdf0e10cSrcweir            DataPilotFieldGroupInfo::SourceField</member> will be ignored.</li>
147*cdf0e10cSrcweir
148*cdf0e10cSrcweir            <li>The contents of the member <member>
149*cdf0e10cSrcweir            DataPilotFieldGroupInfo::Groups</member> will be ignored.</li>
150*cdf0e10cSrcweir            </ul>
151*cdf0e10cSrcweir
152*cdf0e10cSrcweir        @returns
153*cdf0e10cSrcweir            the new created field if there is one created. <NULL/> is returned,
154*cdf0e10cSrcweir            if date grouping is performed inside this field (i.e. this field
155*cdf0e10cSrcweir            was not grouped by dates before).
156*cdf0e10cSrcweir
157*cdf0e10cSrcweir        @throws com::sun::star::lang::IllegalArgumentException
158*cdf0e10cSrcweir            if the passed struct does not contain valid settings as described,
159*cdf0e10cSrcweir            or if this field is already grouped by member names or numeric
160*cdf0e10cSrcweir            ranges.
161*cdf0e10cSrcweir
162*cdf0e10cSrcweir        @see DataPilotField
163*cdf0e10cSrcweir     */
164*cdf0e10cSrcweir    XDataPilotField createDateGroup([in] DataPilotFieldGroupInfo aInfo)
165*cdf0e10cSrcweir        raises( com::sun::star::lang::IllegalArgumentException );
166*cdf0e10cSrcweir
167*cdf0e10cSrcweir};
168*cdf0e10cSrcweir
169*cdf0e10cSrcweir//=============================================================================
170*cdf0e10cSrcweir
171*cdf0e10cSrcweir}; }; }; };
172*cdf0e10cSrcweir
173*cdf0e10cSrcweir#endif
174*cdf0e10cSrcweir
175