1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_sheet_XDataPilotFieldGrouping_idl__ 25*b1cdbd2cSJim Jagielski#define __com_sun_star_sheet_XDataPilotFieldGrouping_idl__ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_uno_XInterface_idl__ 28*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl> 29*b1cdbd2cSJim Jagielski#endif 30*b1cdbd2cSJim Jagielski 31*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_sheet_DataPilotFieldGroupInfo_idl__ 32*b1cdbd2cSJim Jagielski#include <com/sun/star/sheet/DataPilotFieldGroupInfo.idl> 33*b1cdbd2cSJim Jagielski#endif 34*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 35*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl> 36*b1cdbd2cSJim Jagielski#endif 37*b1cdbd2cSJim Jagielski 38*b1cdbd2cSJim Jagielski//============================================================================= 39*b1cdbd2cSJim Jagielski 40*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module sheet { 41*b1cdbd2cSJim Jagielski 42*b1cdbd2cSJim Jagielski//============================================================================= 43*b1cdbd2cSJim Jagielski 44*b1cdbd2cSJim Jagielski/** Provides methods to create new DataPilot fields where some or all items of 45*b1cdbd2cSJim Jagielski this DataPilot field are grouped in some way. 46*b1cdbd2cSJim Jagielski 47*b1cdbd2cSJim Jagielski @see DataPilotField 48*b1cdbd2cSJim Jagielski */ 49*b1cdbd2cSJim Jagielskipublished interface XDataPilotFieldGrouping: com::sun::star::uno::XInterface 50*b1cdbd2cSJim Jagielski{ 51*b1cdbd2cSJim Jagielski //------------------------------------------------------------------------- 52*b1cdbd2cSJim Jagielski 53*b1cdbd2cSJim Jagielski /** Creates a new DataPilot field which contains a group containing the 54*b1cdbd2cSJim Jagielski given DataPilot field items (members). 55*b1cdbd2cSJim Jagielski 56*b1cdbd2cSJim Jagielski <p>It is possible to create multiple groups by calling this method 57*b1cdbd2cSJim Jagielski several times at the same DataPilot field. On subsequent calls, the 58*b1cdbd2cSJim Jagielski DataPilot field created at the first call is used to insert the new 59*b1cdbd2cSJim Jagielski groups.</p> 60*b1cdbd2cSJim Jagielski 61*b1cdbd2cSJim Jagielski <p>The collection of groups can be accessed via the 62*b1cdbd2cSJim Jagielski <member>DataPilotField::GroupInfo</member> property. The returned 63*b1cdbd2cSJim Jagielski struct contains the sequence of groups in its member 64*b1cdbd2cSJim Jagielski <member>DataPilotFieldGroupInfo::Groups</member>.</p> 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski @param aItems 67*b1cdbd2cSJim Jagielski a sequence containing the names of the items (members) which will 68*b1cdbd2cSJim Jagielski be part of the new group. Must be names of items contained in the 69*b1cdbd2cSJim Jagielski current field. 70*b1cdbd2cSJim Jagielski 71*b1cdbd2cSJim Jagielski @returns 72*b1cdbd2cSJim Jagielski the new created field if there is one created on the first call of 73*b1cdbd2cSJim Jagielski this method. <NULL/> is returned on subsequent calls. 74*b1cdbd2cSJim Jagielski 75*b1cdbd2cSJim Jagielski @see DataPilotField 76*b1cdbd2cSJim Jagielski @see DataPilotFieldGroupInfo 77*b1cdbd2cSJim Jagielski */ 78*b1cdbd2cSJim Jagielski XDataPilotField createNameGroup([in] sequence< string > aItems) 79*b1cdbd2cSJim Jagielski raises( com::sun::star::lang::IllegalArgumentException ); 80*b1cdbd2cSJim Jagielski 81*b1cdbd2cSJim Jagielski //------------------------------------------------------------------------- 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski /** Groups the members of this field by dates, according to the passed 84*b1cdbd2cSJim Jagielski settings. 85*b1cdbd2cSJim Jagielski 86*b1cdbd2cSJim Jagielski <p>If this field is already grouped by dates, a new DataPilot field 87*b1cdbd2cSJim Jagielski will be created and returned. If this field is not grouped at all, the 88*b1cdbd2cSJim Jagielski date grouping is perfomed inside of this field (no new field will be 89*b1cdbd2cSJim Jagielski created). There must not be any other grouping (by member names or by 90*b1cdbd2cSJim Jagielski numeric ranges), otherwise an exception is thrown.</p> 91*b1cdbd2cSJim Jagielski 92*b1cdbd2cSJim Jagielski @param aInfo 93*b1cdbd2cSJim Jagielski contains the information how to group the items of the field. The 94*b1cdbd2cSJim Jagielski members of this struct have to fulfill the following requirements: 95*b1cdbd2cSJim Jagielski 96*b1cdbd2cSJim Jagielski <ul> 97*b1cdbd2cSJim Jagielski <li>If the member <member>DataPilotFieldGroupInfo::HasAutoStart 98*b1cdbd2cSJim Jagielski </member> is set to <FALSE/>, then the value of <member> 99*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::Start</member> must be a floating-point 100*b1cdbd2cSJim Jagielski value representing a valid date/time value (if <member> 101*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::HasAutoStart</member> is set to <TRUE/>, 102*b1cdbd2cSJim Jagielski the value of <member>DataPilotFieldGroupInfo::Start</member> will 103*b1cdbd2cSJim Jagielski be ignored).</li> 104*b1cdbd2cSJim Jagielski 105*b1cdbd2cSJim Jagielski <li>If the member <member>DataPilotFieldGroupInfo::HasAutoEnd 106*b1cdbd2cSJim Jagielski </member> is set to <FALSE/>, then the value of <member> 107*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::End</member> must be a floating-point 108*b1cdbd2cSJim Jagielski value representing a valid date/time value( if <member> 109*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::HasAutoEnd</member> is set to <TRUE/>, 110*b1cdbd2cSJim Jagielski the value of <member>DataPilotFieldGroupInfo::End</member> will be 111*b1cdbd2cSJim Jagielski ignored).</li> 112*b1cdbd2cSJim Jagielski 113*b1cdbd2cSJim Jagielski <li>If the members <member>DataPilotFieldGroupInfo::HasAutoStart 114*b1cdbd2cSJim Jagielski </member> and <member>DataPilotFieldGroupInfo::HasAutoEnd</member> 115*b1cdbd2cSJim Jagielski are set to <FALSE/> both, then the value of <member> 116*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::Start</member> must be less than or equal 117*b1cdbd2cSJim Jagielski to the value of <member>DataPilotFieldGroupInfo::End</member>.</li> 118*b1cdbd2cSJim Jagielski 119*b1cdbd2cSJim Jagielski <li>The member <member>DataPilotFieldGroupInfo::HasDateValues</member> 120*b1cdbd2cSJim Jagielski must be set to <TRUE/>.</li> 121*b1cdbd2cSJim Jagielski 122*b1cdbd2cSJim Jagielski <li>The member <member>DataPilotFieldGroupInfo::Step</member> must 123*b1cdbd2cSJim Jagielski be zero, unless ranges of days have to be grouped (see the 124*b1cdbd2cSJim Jagielski description of the member GroupBy below), in that case the value 125*b1cdbd2cSJim Jagielski must be greater than or equal to 1 and less than or equal to 32767. 126*b1cdbd2cSJim Jagielski The fractional part of the value will be ignored.</li> 127*b1cdbd2cSJim Jagielski 128*b1cdbd2cSJim Jagielski <li>The member <member>DataPilotFieldGroupInfo::GroupBy</member> 129*b1cdbd2cSJim Jagielski must contain exactly one of the flags from <type>DataPilotFieldGroupBy</type>. 130*b1cdbd2cSJim Jagielski A combination of several flags will not be accepted. If 131*b1cdbd2cSJim Jagielski <const>DataPilotFieldGroupBy::DAYS</const> is specified, the 132*b1cdbd2cSJim Jagielski value of the member <member>DataPilotFieldGroupInfo::Step</member> 133*b1cdbd2cSJim Jagielski will specify the type of day grouping (see above). If that value 134*b1cdbd2cSJim Jagielski is zero, grouping is performed on all days of the year (e.g. the 135*b1cdbd2cSJim Jagielski members containing the 1st of January of any year are grouped 136*b1cdbd2cSJim Jagielski together). If that value is greater than zero, grouping is done on 137*b1cdbd2cSJim Jagielski ranges of days, and the value specifies the number of days grouped 138*b1cdbd2cSJim Jagielski into one range (e.g. a value of 7 groups the members of a week 139*b1cdbd2cSJim Jagielski into a range).</li> 140*b1cdbd2cSJim Jagielski 141*b1cdbd2cSJim Jagielski <li>The contents of the member <member> 142*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::SourceField</member> will be ignored.</li> 143*b1cdbd2cSJim Jagielski 144*b1cdbd2cSJim Jagielski <li>The contents of the member <member> 145*b1cdbd2cSJim Jagielski DataPilotFieldGroupInfo::Groups</member> will be ignored.</li> 146*b1cdbd2cSJim Jagielski </ul> 147*b1cdbd2cSJim Jagielski 148*b1cdbd2cSJim Jagielski @returns 149*b1cdbd2cSJim Jagielski the new created field if there is one created. <NULL/> is returned, 150*b1cdbd2cSJim Jagielski if date grouping is performed inside this field (i.e. this field 151*b1cdbd2cSJim Jagielski was not grouped by dates before). 152*b1cdbd2cSJim Jagielski 153*b1cdbd2cSJim Jagielski @throws com::sun::star::lang::IllegalArgumentException 154*b1cdbd2cSJim Jagielski if the passed struct does not contain valid settings as described, 155*b1cdbd2cSJim Jagielski or if this field is already grouped by member names or numeric 156*b1cdbd2cSJim Jagielski ranges. 157*b1cdbd2cSJim Jagielski 158*b1cdbd2cSJim Jagielski @see DataPilotField 159*b1cdbd2cSJim Jagielski */ 160*b1cdbd2cSJim Jagielski XDataPilotField createDateGroup([in] DataPilotFieldGroupInfo aInfo) 161*b1cdbd2cSJim Jagielski raises( com::sun::star::lang::IllegalArgumentException ); 162*b1cdbd2cSJim Jagielski 163*b1cdbd2cSJim Jagielski}; 164*b1cdbd2cSJim Jagielski 165*b1cdbd2cSJim Jagielski//============================================================================= 166*b1cdbd2cSJim Jagielski 167*b1cdbd2cSJim Jagielski}; }; }; }; 168*b1cdbd2cSJim Jagielski 169*b1cdbd2cSJim Jagielski#endif 170*b1cdbd2cSJim Jagielski 171