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