xref: /aoo41x/main/sc/inc/dapiuno.hxx (revision cdf0e10c)
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 SC_DAPIUNO_HXX
29*cdf0e10cSrcweir #define SC_DAPIUNO_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "global.hxx"
32*cdf0e10cSrcweir #include "dpobject.hxx"
33*cdf0e10cSrcweir #include "rangeutl.hxx"		// ScArea
34*cdf0e10cSrcweir #include "cellsuno.hxx"     // for XModifyListenerArr_Impl
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir #include <svl/lstner.hxx>
37*cdf0e10cSrcweir #include <svl/itemprop.hxx>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
40*cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp>
41*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
43*cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp>
44*cdf0e10cSrcweir #include <com/sun/star/util/XModifyBroadcaster.hpp>
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
47*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldGroupInfo.hpp>
48*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
49*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
50*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldReference.hpp>
51*cdf0e10cSrcweir #include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
52*cdf0e10cSrcweir #include <com/sun/star/sheet/GeneralFunction.hpp>
53*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotDataLayoutFieldSupplier.hpp>
54*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotDescriptor.hpp>
55*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotField.hpp>
56*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotFieldGrouping.hpp>
57*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotTable.hpp>
58*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotTable2.hpp>
59*cdf0e10cSrcweir #include <com/sun/star/sheet/XDataPilotTables.hpp>
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
62*cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
63*cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx>
64*cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx>
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir #include <memory>
67*cdf0e10cSrcweir #include <vector>
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace sheet {
70*cdf0e10cSrcweir     struct DataPilotFieldFilter;
71*cdf0e10cSrcweir     struct DataPilotTablePositionData;
72*cdf0e10cSrcweir }}}}
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir class ScDocShell;
75*cdf0e10cSrcweir class ScDPSaveDimension;
76*cdf0e10cSrcweir class ScDPSaveGroupDimension;
77*cdf0e10cSrcweir class ScDPSaveNumGroupDimension;
78*cdf0e10cSrcweir struct ScDPNumGroupInfo;
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir class ScDataPilotTableObj;
81*cdf0e10cSrcweir class ScDataPilotFieldObj;
82*cdf0e10cSrcweir class ScDataPilotItemObj;
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir class ScDataPilotConversion
86*cdf0e10cSrcweir {
87*cdf0e10cSrcweir public:
88*cdf0e10cSrcweir 	static com::sun::star::sheet::GeneralFunction	FirstFunc( sal_uInt16 nBits );
89*cdf0e10cSrcweir 	static sal_uInt16			FunctionBit( com::sun::star::sheet::GeneralFunction eFunc );
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir     static void         FillGroupInfo(
92*cdf0e10cSrcweir                             ::com::sun::star::sheet::DataPilotFieldGroupInfo& rInfo,
93*cdf0e10cSrcweir                             const ScDPNumGroupInfo& rGroupInfo );
94*cdf0e10cSrcweir };
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir // ============================================================================
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir /** DataPilotTables collection per sheet. */
99*cdf0e10cSrcweir class ScDataPilotTablesObj : public cppu::WeakImplHelper4<
100*cdf0e10cSrcweir 										com::sun::star::sheet::XDataPilotTables,
101*cdf0e10cSrcweir 										com::sun::star::container::XEnumerationAccess,
102*cdf0e10cSrcweir 										com::sun::star::container::XIndexAccess,
103*cdf0e10cSrcweir 										com::sun::star::lang::XServiceInfo>,
104*cdf0e10cSrcweir 									public SfxListener
105*cdf0e10cSrcweir {
106*cdf0e10cSrcweir private:
107*cdf0e10cSrcweir 	ScDocShell*				pDocShell;
108*cdf0e10cSrcweir 	SCTAB					nTab;
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir     ScDataPilotTableObj*    GetObjectByIndex_Impl( sal_Int32 nIndex );
111*cdf0e10cSrcweir 	ScDataPilotTableObj*	GetObjectByName_Impl(const ::rtl::OUString& aName);
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir public:
114*cdf0e10cSrcweir 							ScDataPilotTablesObj(ScDocShell* pDocSh, SCTAB nT);
115*cdf0e10cSrcweir 	virtual					~ScDataPilotTablesObj();
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 							// XDataPilotTables
120*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotDescriptor > SAL_CALL
121*cdf0e10cSrcweir 							createDataPilotDescriptor() throw(::com::sun::star::uno::RuntimeException);
122*cdf0e10cSrcweir 	virtual void SAL_CALL	insertNewByName( const ::rtl::OUString& aName,
123*cdf0e10cSrcweir 									const ::com::sun::star::table::CellAddress& aOutputAddress,
124*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
125*cdf0e10cSrcweir 										::com::sun::star::sheet::XDataPilotDescriptor >& xDescriptor )
126*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
127*cdf0e10cSrcweir 	virtual void SAL_CALL	removeByName( const ::rtl::OUString& aName )
128*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 							// XNameAccess
131*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
132*cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
133*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
134*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
135*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
136*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
137*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
138*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 							// XIndexAccess
141*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
142*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
143*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
144*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
145*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 							// XEnumerationAccess
148*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
149*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir 							// XElementAccess
152*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
153*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
154*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir 							// XServiceInfo
157*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
158*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
159*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
160*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
161*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
162*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
163*cdf0e10cSrcweir };
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir // ============================================================================
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir //	ScDataPilotDescriptorBase is never instantiated directly
168*cdf0e10cSrcweir class ScDataPilotDescriptorBase : public com::sun::star::sheet::XDataPilotDescriptor,
169*cdf0e10cSrcweir                                   public com::sun::star::beans::XPropertySet,
170*cdf0e10cSrcweir                                   public com::sun::star::sheet::XDataPilotDataLayoutFieldSupplier,
171*cdf0e10cSrcweir 								  public com::sun::star::lang::XServiceInfo,
172*cdf0e10cSrcweir 								  public com::sun::star::lang::XUnoTunnel,
173*cdf0e10cSrcweir 								  public com::sun::star::lang::XTypeProvider,
174*cdf0e10cSrcweir 								  public cppu::OWeakObject,
175*cdf0e10cSrcweir 								  public SfxListener
176*cdf0e10cSrcweir {
177*cdf0e10cSrcweir private:
178*cdf0e10cSrcweir     SfxItemPropertySet  maPropSet;
179*cdf0e10cSrcweir     ScDocShell*         pDocShell;
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir public:
182*cdf0e10cSrcweir 							ScDataPilotDescriptorBase(ScDocShell* pDocSh);
183*cdf0e10cSrcweir 	virtual					~ScDataPilotDescriptorBase();
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
186*cdf0e10cSrcweir 								const ::com::sun::star::uno::Type & rType )
187*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
188*cdf0e10cSrcweir 	virtual void SAL_CALL	acquire() throw();
189*cdf0e10cSrcweir 	virtual void SAL_CALL	release() throw();
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 	ScDocShell*				GetDocShell() const		{ return pDocShell; }
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 							// in den Ableitungen:
196*cdf0e10cSrcweir     virtual ScDPObject* GetDPObject() const = 0;
197*cdf0e10cSrcweir     virtual void SetDPObject(ScDPObject* pDPObj) = 0;
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 							// XDataPilotDescriptor
200*cdf0e10cSrcweir 							//	getName, setName, getTag, setTag in derived classes
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getSourceRange()
203*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
204*cdf0e10cSrcweir 	virtual void SAL_CALL setSourceRange( const ::com::sun::star::table::CellRangeAddress& aSourceRange )
205*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
206*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
207*cdf0e10cSrcweir 							getFilterDescriptor() throw(::com::sun::star::uno::RuntimeException);
208*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
209*cdf0e10cSrcweir 							getDataPilotFields() throw(::com::sun::star::uno::RuntimeException);
210*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
211*cdf0e10cSrcweir 							getColumnFields() throw(::com::sun::star::uno::RuntimeException);
212*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
213*cdf0e10cSrcweir 							getRowFields() throw(::com::sun::star::uno::RuntimeException);
214*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
215*cdf0e10cSrcweir 							getPageFields() throw(::com::sun::star::uno::RuntimeException);
216*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
217*cdf0e10cSrcweir 							getDataFields() throw(::com::sun::star::uno::RuntimeException);
218*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
219*cdf0e10cSrcweir 							getHiddenFields() throw(::com::sun::star::uno::RuntimeException);
220*cdf0e10cSrcweir 
221*cdf0e10cSrcweir 							// XPropertySet
222*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
223*cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo(  )
224*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
225*cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
226*cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
227*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
228*cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
229*cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
230*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
231*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
232*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
233*cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
234*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
235*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
236*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
237*cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
238*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
239*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
240*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
241*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
242*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
243*cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
244*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
245*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
246*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
247*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
248*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
249*cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
250*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
251*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
252*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
253*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
254*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
255*cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
256*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
257*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
258*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
259*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
260*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir                             // XDataPilotDataLayoutFieldSupplier
263*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotField >
264*cdf0e10cSrcweir                             SAL_CALL getDataLayoutField()
265*cdf0e10cSrcweir                                 throw(::com::sun::star::uno::RuntimeException);
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir 							// XUnoTunnel
268*cdf0e10cSrcweir 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
269*cdf0e10cSrcweir 									sal_Int8 >& aIdentifier )
270*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
273*cdf0e10cSrcweir 	static ScDataPilotDescriptorBase* getImplementation( const com::sun::star::uno::Reference<
274*cdf0e10cSrcweir 									com::sun::star::sheet::XDataPilotDescriptor> xObj );
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir 							// XTypeProvider (overloaded in ScDataPilotTableObj)
277*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
278*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
279*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
280*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir 							// XServiceInfo is in derived classes
283*cdf0e10cSrcweir };
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir // ============================================================================
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir class ScDataPilotDescriptor : public ScDataPilotDescriptorBase
288*cdf0e10cSrcweir {
289*cdf0e10cSrcweir private:
290*cdf0e10cSrcweir     ScDPObject*             mpDPObject;
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir public:
293*cdf0e10cSrcweir 							ScDataPilotDescriptor(ScDocShell* pDocSh);
294*cdf0e10cSrcweir 	virtual					~ScDataPilotDescriptor();
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir     virtual ScDPObject* GetDPObject() const;
297*cdf0e10cSrcweir     virtual void SetDPObject(ScDPObject* pDPObj);
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir 							// rest of XDataPilotDescriptor (incl. XNamed)
300*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
301*cdf0e10cSrcweir 	virtual void SAL_CALL	setName( const ::rtl::OUString& aName )
302*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
303*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getTag() throw(::com::sun::star::uno::RuntimeException);
304*cdf0e10cSrcweir 	virtual void SAL_CALL	setTag( const ::rtl::OUString& aTag )
305*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir 							// XServiceInfo
308*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
309*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
310*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
311*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
312*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
313*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
314*cdf0e10cSrcweir };
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir // ============================================================================
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir class ScDataPilotTableObj : public ScDataPilotDescriptorBase,
319*cdf0e10cSrcweir                             public com::sun::star::sheet::XDataPilotTable2,
320*cdf0e10cSrcweir                             public com::sun::star::util::XModifyBroadcaster
321*cdf0e10cSrcweir {
322*cdf0e10cSrcweir private:
323*cdf0e10cSrcweir 	SCTAB					nTab;
324*cdf0e10cSrcweir 	String					aName;
325*cdf0e10cSrcweir     XModifyListenerArr_Impl aModifyListeners;
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir     void                    Refreshed_Impl();
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir public:
330*cdf0e10cSrcweir 							ScDataPilotTableObj(ScDocShell* pDocSh, SCTAB nT, const String& rN);
331*cdf0e10cSrcweir 	virtual					~ScDataPilotTableObj();
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
334*cdf0e10cSrcweir 								const ::com::sun::star::uno::Type & rType )
335*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
336*cdf0e10cSrcweir 	virtual void SAL_CALL	acquire() throw();
337*cdf0e10cSrcweir 	virtual void SAL_CALL	release() throw();
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir     virtual ScDPObject* GetDPObject() const;
342*cdf0e10cSrcweir     virtual void SetDPObject(ScDPObject* pDPObj);
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir 							// rest of XDataPilotDescriptor (incl. XNamed)
345*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
346*cdf0e10cSrcweir 	virtual void SAL_CALL	setName( const ::rtl::OUString& aName )
347*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
348*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getTag() throw(::com::sun::star::uno::RuntimeException);
349*cdf0e10cSrcweir 	virtual void SAL_CALL	setTag( const ::rtl::OUString& aTag )
350*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir 							// XDataPilotTable
353*cdf0e10cSrcweir 	virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getOutputRange()
354*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
355*cdf0e10cSrcweir 	virtual void SAL_CALL	refresh() throw(::com::sun::star::uno::RuntimeException);
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir                             // XDataPilotTable2
358*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >
359*cdf0e10cSrcweir         SAL_CALL getDrillDownData(const ::com::sun::star::table::CellAddress& aAddr)
360*cdf0e10cSrcweir                                 throw(::com::sun::star::uno::RuntimeException);
361*cdf0e10cSrcweir 
362*cdf0e10cSrcweir     virtual ::com::sun::star::sheet::DataPilotTablePositionData
363*cdf0e10cSrcweir         SAL_CALL getPositionData(const ::com::sun::star::table::CellAddress& aAddr)
364*cdf0e10cSrcweir                                 throw(::com::sun::star::uno::RuntimeException);
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir     virtual void SAL_CALL insertDrillDownSheet(const ::com::sun::star::table::CellAddress& aAddr)
367*cdf0e10cSrcweir                                 throw(::com::sun::star::uno::RuntimeException);
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getOutputRangeByType( sal_Int32 nType )
370*cdf0e10cSrcweir                                 throw(::com::sun::star::lang::IllegalArgumentException,
371*cdf0e10cSrcweir                                       ::com::sun::star::uno::RuntimeException);
372*cdf0e10cSrcweir 
373*cdf0e10cSrcweir                             // XModifyBroadcaster
374*cdf0e10cSrcweir     virtual void SAL_CALL   addModifyListener( const ::com::sun::star::uno::Reference<
375*cdf0e10cSrcweir                                                 ::com::sun::star::util::XModifyListener >& aListener )
376*cdf0e10cSrcweir                                 throw (::com::sun::star::uno::RuntimeException);
377*cdf0e10cSrcweir     virtual void SAL_CALL   removeModifyListener( const ::com::sun::star::uno::Reference<
378*cdf0e10cSrcweir                                                 ::com::sun::star::util::XModifyListener >& aListener )
379*cdf0e10cSrcweir                                 throw (::com::sun::star::uno::RuntimeException);
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir 							// XTypeProvider (overloaded)
382*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
383*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
384*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
385*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir 							// XServiceInfo
388*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
389*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
390*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
391*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
392*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
393*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
394*cdf0e10cSrcweir };
395*cdf0e10cSrcweir 
396*cdf0e10cSrcweir // ============================================================================
397*cdf0e10cSrcweir 
398*cdf0e10cSrcweir struct ScFieldIdentifier
399*cdf0e10cSrcweir {
400*cdf0e10cSrcweir     ::rtl::OUString     maFieldName;    /// Source field name.
401*cdf0e10cSrcweir     sal_Int32           mnFieldIdx;     /// Field index (if several fields with same name exist).
402*cdf0e10cSrcweir     bool                mbDataLayout;   /// True = data layout field collecting all data fields as items.
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir     inline explicit     ScFieldIdentifier() :
405*cdf0e10cSrcweir                             mnFieldIdx( 0 ), mbDataLayout( false ) {}
406*cdf0e10cSrcweir 
407*cdf0e10cSrcweir     inline explicit     ScFieldIdentifier( const ::rtl::OUString& rFieldName, sal_Int32 nFieldIdx, bool bDataLayout ) :
408*cdf0e10cSrcweir                             maFieldName( rFieldName ), mnFieldIdx( nFieldIdx ), mbDataLayout( bDataLayout ) {}
409*cdf0e10cSrcweir };
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir // ============================================================================
412*cdf0e10cSrcweir 
413*cdf0e10cSrcweir /** Base class of all implementation objects based on a DataPilot descriptor
414*cdf0e10cSrcweir     or DataPilot table object. Wraps acquiring and releasing the parent. */
415*cdf0e10cSrcweir class ScDataPilotChildObjBase
416*cdf0e10cSrcweir {
417*cdf0e10cSrcweir protected:
418*cdf0e10cSrcweir     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent );
419*cdf0e10cSrcweir     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
420*cdf0e10cSrcweir     virtual             ~ScDataPilotChildObjBase();
421*cdf0e10cSrcweir 
422*cdf0e10cSrcweir     /** Returns the wrapped DataPilot object (calls GetDPObject() at parent). */
423*cdf0e10cSrcweir     ScDPObject*         GetDPObject() const;
424*cdf0e10cSrcweir     /** Sets the passed DataPilot object (calls SetDPObject() at parent). */
425*cdf0e10cSrcweir     void                SetDPObject( ScDPObject* pDPObject );
426*cdf0e10cSrcweir 
427*cdf0e10cSrcweir     /** Returns the DataPilot dimension object related to the field described by maFieldId. */
428*cdf0e10cSrcweir     ScDPSaveDimension*  GetDPDimension( ScDPObject** ppDPObject = 0 ) const;
429*cdf0e10cSrcweir 
430*cdf0e10cSrcweir     /** Returns the number of members for the field described by maFieldId. */
431*cdf0e10cSrcweir     sal_Int32           GetMemberCount() const;
432*cdf0e10cSrcweir     /** Returns the collection of members for the field described by maFieldId. */
433*cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
434*cdf0e10cSrcweir                         GetMembers() const;
435*cdf0e10cSrcweir 
436*cdf0e10cSrcweir protected:
437*cdf0e10cSrcweir     ScDataPilotDescriptorBase& mrParent;
438*cdf0e10cSrcweir     ScFieldIdentifier   maFieldId;
439*cdf0e10cSrcweir 
440*cdf0e10cSrcweir private:
441*cdf0e10cSrcweir     ScDataPilotChildObjBase& operator=( const ScDataPilotChildObjBase& );
442*cdf0e10cSrcweir };
443*cdf0e10cSrcweir 
444*cdf0e10cSrcweir // ============================================================================
445*cdf0e10cSrcweir 
446*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper4
447*cdf0e10cSrcweir <
448*cdf0e10cSrcweir     ::com::sun::star::container::XEnumerationAccess,
449*cdf0e10cSrcweir     ::com::sun::star::container::XIndexAccess,
450*cdf0e10cSrcweir     ::com::sun::star::container::XNameAccess,
451*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
452*cdf0e10cSrcweir >
453*cdf0e10cSrcweir ScDataPilotFieldsObjImpl;
454*cdf0e10cSrcweir 
455*cdf0e10cSrcweir /** Collection of all DataPilot fields, or of all fields from a specific dimension. */
456*cdf0e10cSrcweir class ScDataPilotFieldsObj : public ScDataPilotChildObjBase, public ScDataPilotFieldsObjImpl
457*cdf0e10cSrcweir {
458*cdf0e10cSrcweir public:
459*cdf0e10cSrcweir     explicit            ScDataPilotFieldsObj(
460*cdf0e10cSrcweir                             ScDataPilotDescriptorBase& rParent );
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir     explicit            ScDataPilotFieldsObj(
463*cdf0e10cSrcweir                             ScDataPilotDescriptorBase& rParent,
464*cdf0e10cSrcweir                             ::com::sun::star::sheet::DataPilotFieldOrientation eOrient );
465*cdf0e10cSrcweir 
466*cdf0e10cSrcweir     virtual             ~ScDataPilotFieldsObj();
467*cdf0e10cSrcweir 
468*cdf0e10cSrcweir 							// XNameAccess
469*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
470*cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
471*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
472*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
473*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
474*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
475*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
476*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
477*cdf0e10cSrcweir 
478*cdf0e10cSrcweir 							// XIndexAccess
479*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
480*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
481*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
482*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
483*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir 							// XEnumerationAccess
486*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
487*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
488*cdf0e10cSrcweir 
489*cdf0e10cSrcweir 							// XElementAccess
490*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
491*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
492*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
493*cdf0e10cSrcweir 
494*cdf0e10cSrcweir 							// XServiceInfo
495*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
496*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
497*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
498*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
499*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
500*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
501*cdf0e10cSrcweir 
502*cdf0e10cSrcweir private:
503*cdf0e10cSrcweir     ScDataPilotFieldObj*    GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
504*cdf0e10cSrcweir     ScDataPilotFieldObj*    GetObjectByName_Impl( const ::rtl::OUString& rName ) const;
505*cdf0e10cSrcweir 
506*cdf0e10cSrcweir private:
507*cdf0e10cSrcweir     ::com::sun::star::uno::Any maOrient;    /// Field orientation, no value = all fields.
508*cdf0e10cSrcweir };
509*cdf0e10cSrcweir 
510*cdf0e10cSrcweir // ============================================================================
511*cdf0e10cSrcweir 
512*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper5
513*cdf0e10cSrcweir <
514*cdf0e10cSrcweir     ::com::sun::star::container::XNamed,
515*cdf0e10cSrcweir     ::com::sun::star::beans::XPropertySet,
516*cdf0e10cSrcweir     ::com::sun::star::sheet::XDataPilotField,
517*cdf0e10cSrcweir     ::com::sun::star::sheet::XDataPilotFieldGrouping,
518*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
519*cdf0e10cSrcweir >
520*cdf0e10cSrcweir ScDataPilotFieldObjImpl;
521*cdf0e10cSrcweir 
522*cdf0e10cSrcweir /** Implementation of a single DataPilot field. */
523*cdf0e10cSrcweir class ScDataPilotFieldObj : public ScDataPilotChildObjBase, public ScDataPilotFieldObjImpl
524*cdf0e10cSrcweir {
525*cdf0e10cSrcweir public:
526*cdf0e10cSrcweir                         ScDataPilotFieldObj(
527*cdf0e10cSrcweir                             ScDataPilotDescriptorBase& rParent,
528*cdf0e10cSrcweir                             const ScFieldIdentifier& rIdent );
529*cdf0e10cSrcweir 
530*cdf0e10cSrcweir                         ScDataPilotFieldObj(
531*cdf0e10cSrcweir                             ScDataPilotDescriptorBase& rParent,
532*cdf0e10cSrcweir                             const ScFieldIdentifier& rIdent,
533*cdf0e10cSrcweir                             const ::com::sun::star::uno::Any& rOrient );
534*cdf0e10cSrcweir 
535*cdf0e10cSrcweir     virtual             ~ScDataPilotFieldObj();
536*cdf0e10cSrcweir 
537*cdf0e10cSrcweir 							// XNamed
538*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
539*cdf0e10cSrcweir 	virtual void SAL_CALL	setName( const ::rtl::OUString& aName )
540*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
541*cdf0e10cSrcweir 
542*cdf0e10cSrcweir 							// XPropertySet
543*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
544*cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo(  )
545*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
546*cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
547*cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
548*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
549*cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
550*cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
551*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
552*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
553*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
554*cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
555*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
556*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
557*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
558*cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
559*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
560*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
561*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
562*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
563*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
564*cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
565*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
566*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
567*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
568*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
569*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
570*cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
571*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
572*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
573*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
574*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
575*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
576*cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
577*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
578*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
579*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
580*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
581*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
582*cdf0e10cSrcweir 
583*cdf0e10cSrcweir                             // XDatePilotField
584*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> SAL_CALL
585*cdf0e10cSrcweir                                 getItems() throw (::com::sun::star::uno::RuntimeException);
586*cdf0e10cSrcweir 
587*cdf0e10cSrcweir 							// nur noch aus Property-Funktionen gerufen:
588*cdf0e10cSrcweir 	com::sun::star::sheet::DataPilotFieldOrientation getOrientation(void) const;
589*cdf0e10cSrcweir 	void setOrientation(com::sun::star::sheet::DataPilotFieldOrientation Orientation);
590*cdf0e10cSrcweir 	com::sun::star::sheet::GeneralFunction getFunction(void) const;
591*cdf0e10cSrcweir 	void setFunction(com::sun::star::sheet::GeneralFunction Function);
592*cdf0e10cSrcweir     com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction > getSubtotals() const;
593*cdf0e10cSrcweir     void setSubtotals(const com::sun::star::uno::Sequence< com::sun::star::sheet::GeneralFunction >& rFunctions);
594*cdf0e10cSrcweir     rtl::OUString getCurrentPage() const;
595*cdf0e10cSrcweir     void setCurrentPage(const rtl::OUString& sPage);
596*cdf0e10cSrcweir     sal_Bool getUseCurrentPage() const;
597*cdf0e10cSrcweir     void setUseCurrentPage(sal_Bool bUse);
598*cdf0e10cSrcweir     const com::sun::star::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo();
599*cdf0e10cSrcweir     void setAutoShowInfo(const com::sun::star::sheet::DataPilotFieldAutoShowInfo* pInfo);
600*cdf0e10cSrcweir     const com::sun::star::sheet::DataPilotFieldLayoutInfo* getLayoutInfo();
601*cdf0e10cSrcweir     void setLayoutInfo(const com::sun::star::sheet::DataPilotFieldLayoutInfo* pInfo);
602*cdf0e10cSrcweir     const com::sun::star::sheet::DataPilotFieldReference* getReference();
603*cdf0e10cSrcweir     void setReference(const com::sun::star::sheet::DataPilotFieldReference* pInfo);
604*cdf0e10cSrcweir     const com::sun::star::sheet::DataPilotFieldSortInfo* getSortInfo();
605*cdf0e10cSrcweir     void setSortInfo(const com::sun::star::sheet::DataPilotFieldSortInfo* pInfo);
606*cdf0e10cSrcweir     sal_Bool getShowEmpty() const;
607*cdf0e10cSrcweir     void setShowEmpty(sal_Bool bShow);
608*cdf0e10cSrcweir 
609*cdf0e10cSrcweir     sal_Bool hasGroupInfo();
610*cdf0e10cSrcweir     com::sun::star::sheet::DataPilotFieldGroupInfo getGroupInfo();
611*cdf0e10cSrcweir     void setGroupInfo(const com::sun::star::sheet::DataPilotFieldGroupInfo* pInfo);
612*cdf0e10cSrcweir 
613*cdf0e10cSrcweir                             // XDataPilotFieldGrouping
614*cdf0e10cSrcweir     sal_Bool HasString(const com::sun::star::uno::Sequence< ::rtl::OUString >& aItems, const ::rtl::OUString& aString);
615*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference < com::sun::star::sheet::XDataPilotField > SAL_CALL
616*cdf0e10cSrcweir         createNameGroup(const com::sun::star::uno::Sequence< ::rtl::OUString >& aItems)
617*cdf0e10cSrcweir              throw (::com::sun::star::uno::RuntimeException,
618*cdf0e10cSrcweir                     ::com::sun::star::lang::IllegalArgumentException);
619*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference < com::sun::star::sheet::XDataPilotField > SAL_CALL
620*cdf0e10cSrcweir         createDateGroup(const com::sun::star::sheet::DataPilotFieldGroupInfo& rInfo)
621*cdf0e10cSrcweir              throw (::com::sun::star::uno::RuntimeException,
622*cdf0e10cSrcweir                     ::com::sun::star::lang::IllegalArgumentException);
623*cdf0e10cSrcweir 
624*cdf0e10cSrcweir 							// XServiceInfo
625*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
626*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
627*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
628*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
629*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
630*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
631*cdf0e10cSrcweir 
632*cdf0e10cSrcweir private:
633*cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
634*cdf0e10cSrcweir                         mxItems;
635*cdf0e10cSrcweir     SfxItemPropertySet  maPropSet;
636*cdf0e10cSrcweir     ::com::sun::star::uno::Any maOrient;
637*cdf0e10cSrcweir };
638*cdf0e10cSrcweir 
639*cdf0e10cSrcweir // ============================================================================
640*cdf0e10cSrcweir 
641*cdf0e10cSrcweir typedef ::std::vector< ::rtl::OUString > ScFieldGroupMembers;
642*cdf0e10cSrcweir 
643*cdf0e10cSrcweir struct ScFieldGroup
644*cdf0e10cSrcweir {
645*cdf0e10cSrcweir     ::rtl::OUString     maName;
646*cdf0e10cSrcweir     ScFieldGroupMembers maMembers;
647*cdf0e10cSrcweir };
648*cdf0e10cSrcweir 
649*cdf0e10cSrcweir typedef ::std::vector< ScFieldGroup > ScFieldGroups;
650*cdf0e10cSrcweir 
651*cdf0e10cSrcweir // ============================================================================
652*cdf0e10cSrcweir 
653*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper4
654*cdf0e10cSrcweir <
655*cdf0e10cSrcweir     ::com::sun::star::container::XNameContainer,
656*cdf0e10cSrcweir     ::com::sun::star::container::XEnumerationAccess,
657*cdf0e10cSrcweir     ::com::sun::star::container::XIndexAccess,
658*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
659*cdf0e10cSrcweir >
660*cdf0e10cSrcweir ScDataPilotFieldGroupsObjImpl;
661*cdf0e10cSrcweir 
662*cdf0e10cSrcweir /** Implementation of all grouped items in a DataPilot field.
663*cdf0e10cSrcweir 
664*cdf0e10cSrcweir     This is a stand-alone object without any connection to the base DataPilot
665*cdf0e10cSrcweir     field. Grouping info has to be written back with the GroupInfo property of
666*cdf0e10cSrcweir     the DataPilot field after modifying this object.
667*cdf0e10cSrcweir  */
668*cdf0e10cSrcweir class ScDataPilotFieldGroupsObj : public ScDataPilotFieldGroupsObjImpl
669*cdf0e10cSrcweir {
670*cdf0e10cSrcweir public:
671*cdf0e10cSrcweir     explicit            ScDataPilotFieldGroupsObj( const ScFieldGroups& rGroups );
672*cdf0e10cSrcweir     virtual             ~ScDataPilotFieldGroupsObj();
673*cdf0e10cSrcweir 
674*cdf0e10cSrcweir 							// XNameAccess
675*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
676*cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
677*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
678*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
679*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
680*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
681*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
682*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
683*cdf0e10cSrcweir 
684*cdf0e10cSrcweir                                 // XNameReplace
685*cdf0e10cSrcweir     virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName,
686*cdf0e10cSrcweir                                 const ::com::sun::star::uno::Any& aElement )
687*cdf0e10cSrcweir                                 throw (::com::sun::star::lang::IllegalArgumentException,
688*cdf0e10cSrcweir                                     ::com::sun::star::container::NoSuchElementException,
689*cdf0e10cSrcweir                                     ::com::sun::star::lang::WrappedTargetException,
690*cdf0e10cSrcweir                                     ::com::sun::star::uno::RuntimeException);
691*cdf0e10cSrcweir 
692*cdf0e10cSrcweir                             // XNameContainer
693*cdf0e10cSrcweir     virtual void SAL_CALL insertByName( const ::rtl::OUString& aName,
694*cdf0e10cSrcweir                                 const ::com::sun::star::uno::Any& aElement )
695*cdf0e10cSrcweir                                 throw (::com::sun::star::lang::IllegalArgumentException,
696*cdf0e10cSrcweir                                     ::com::sun::star::container::ElementExistException,
697*cdf0e10cSrcweir                                     ::com::sun::star::lang::WrappedTargetException,
698*cdf0e10cSrcweir                                     ::com::sun::star::uno::RuntimeException);
699*cdf0e10cSrcweir     virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
700*cdf0e10cSrcweir                                 throw (::com::sun::star::container::NoSuchElementException,
701*cdf0e10cSrcweir                                     ::com::sun::star::lang::WrappedTargetException,
702*cdf0e10cSrcweir                                     ::com::sun::star::uno::RuntimeException);
703*cdf0e10cSrcweir 
704*cdf0e10cSrcweir                         // XIndexAccess
705*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
706*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
707*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
708*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
709*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
710*cdf0e10cSrcweir 
711*cdf0e10cSrcweir 							// XEnumerationAccess
712*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
713*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
714*cdf0e10cSrcweir 
715*cdf0e10cSrcweir 							// XElementAccess
716*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
717*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
718*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
719*cdf0e10cSrcweir 
720*cdf0e10cSrcweir 							// XServiceInfo
721*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
722*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
723*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
724*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
725*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
726*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
727*cdf0e10cSrcweir 
728*cdf0e10cSrcweir     // implementation
729*cdf0e10cSrcweir     ScFieldGroup&       getFieldGroup( const ::rtl::OUString& rName ) throw(::com::sun::star::uno::RuntimeException);
730*cdf0e10cSrcweir     void                renameFieldGroup( const ::rtl::OUString& rOldName, const ::rtl::OUString& rNewName ) throw(::com::sun::star::uno::RuntimeException);
731*cdf0e10cSrcweir 
732*cdf0e10cSrcweir private:
733*cdf0e10cSrcweir     ScFieldGroups::iterator implFindByName( const ::rtl::OUString& rName );
734*cdf0e10cSrcweir 
735*cdf0e10cSrcweir private:
736*cdf0e10cSrcweir     ScFieldGroups       maGroups;
737*cdf0e10cSrcweir };
738*cdf0e10cSrcweir 
739*cdf0e10cSrcweir // ============================================================================
740*cdf0e10cSrcweir 
741*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper5
742*cdf0e10cSrcweir <
743*cdf0e10cSrcweir     ::com::sun::star::container::XNameContainer,
744*cdf0e10cSrcweir     ::com::sun::star::container::XEnumerationAccess,
745*cdf0e10cSrcweir     ::com::sun::star::container::XIndexAccess,
746*cdf0e10cSrcweir     ::com::sun::star::container::XNamed,
747*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
748*cdf0e10cSrcweir >
749*cdf0e10cSrcweir ScDataPilotFieldGroupObjImpl;
750*cdf0e10cSrcweir 
751*cdf0e10cSrcweir class ScDataPilotFieldGroupObj : public ScDataPilotFieldGroupObjImpl
752*cdf0e10cSrcweir {
753*cdf0e10cSrcweir public:
754*cdf0e10cSrcweir     explicit            ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& rParent, const ::rtl::OUString& rGroupName );
755*cdf0e10cSrcweir     virtual             ~ScDataPilotFieldGroupObj();
756*cdf0e10cSrcweir 
757*cdf0e10cSrcweir                             // XNameAccess
758*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
759*cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
760*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
761*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
762*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
763*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
764*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
765*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
766*cdf0e10cSrcweir 
767*cdf0e10cSrcweir                                 // XNameReplace
768*cdf0e10cSrcweir     virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName,
769*cdf0e10cSrcweir                                 const ::com::sun::star::uno::Any& aElement )
770*cdf0e10cSrcweir                                 throw (::com::sun::star::lang::IllegalArgumentException,
771*cdf0e10cSrcweir                                     ::com::sun::star::container::NoSuchElementException,
772*cdf0e10cSrcweir                                     ::com::sun::star::lang::WrappedTargetException,
773*cdf0e10cSrcweir                                     ::com::sun::star::uno::RuntimeException);
774*cdf0e10cSrcweir 
775*cdf0e10cSrcweir                                 // XNameContainer
776*cdf0e10cSrcweir     virtual void SAL_CALL insertByName( const ::rtl::OUString& aName,
777*cdf0e10cSrcweir                                 const ::com::sun::star::uno::Any& aElement )
778*cdf0e10cSrcweir                                 throw (::com::sun::star::lang::IllegalArgumentException,
779*cdf0e10cSrcweir                                     ::com::sun::star::container::ElementExistException,
780*cdf0e10cSrcweir                                     ::com::sun::star::lang::WrappedTargetException,
781*cdf0e10cSrcweir                                     ::com::sun::star::uno::RuntimeException);
782*cdf0e10cSrcweir     virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
783*cdf0e10cSrcweir                                 throw (::com::sun::star::container::NoSuchElementException,
784*cdf0e10cSrcweir                                     ::com::sun::star::lang::WrappedTargetException,
785*cdf0e10cSrcweir                                     ::com::sun::star::uno::RuntimeException);
786*cdf0e10cSrcweir 
787*cdf0e10cSrcweir                     // XIndexAccess
788*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
789*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
790*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
791*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
792*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
793*cdf0e10cSrcweir 
794*cdf0e10cSrcweir 							// XEnumerationAccess
795*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
796*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
797*cdf0e10cSrcweir 
798*cdf0e10cSrcweir 							// XElementAccess
799*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
800*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
801*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
802*cdf0e10cSrcweir 
803*cdf0e10cSrcweir                             // XNamed
804*cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
805*cdf0e10cSrcweir     virtual void SAL_CALL   setName( const ::rtl::OUString& aName )
806*cdf0e10cSrcweir                                 throw(::com::sun::star::uno::RuntimeException);
807*cdf0e10cSrcweir 
808*cdf0e10cSrcweir 							// XServiceInfo
809*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
810*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
811*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
812*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
813*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
814*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
815*cdf0e10cSrcweir 
816*cdf0e10cSrcweir private:
817*cdf0e10cSrcweir     ScDataPilotFieldGroupsObj& mrParent;
818*cdf0e10cSrcweir     ::rtl::OUString     maGroupName;
819*cdf0e10cSrcweir };
820*cdf0e10cSrcweir 
821*cdf0e10cSrcweir // ============================================================================
822*cdf0e10cSrcweir 
823*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper2
824*cdf0e10cSrcweir <
825*cdf0e10cSrcweir     ::com::sun::star::container::XNamed,
826*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
827*cdf0e10cSrcweir >
828*cdf0e10cSrcweir ScDataPilotFieldGroupItemObjImpl;
829*cdf0e10cSrcweir 
830*cdf0e10cSrcweir class ScDataPilotFieldGroupItemObj : public ScDataPilotFieldGroupItemObjImpl
831*cdf0e10cSrcweir {
832*cdf0e10cSrcweir public:
833*cdf0e10cSrcweir     explicit            ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj& rParent, const ::rtl::OUString& rName );
834*cdf0e10cSrcweir     virtual             ~ScDataPilotFieldGroupItemObj();
835*cdf0e10cSrcweir 
836*cdf0e10cSrcweir 							// XNamed
837*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
838*cdf0e10cSrcweir 	virtual void SAL_CALL	setName( const ::rtl::OUString& aName )
839*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
840*cdf0e10cSrcweir 
841*cdf0e10cSrcweir 							// XServiceInfo
842*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
843*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
844*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
845*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
846*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
847*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
848*cdf0e10cSrcweir 
849*cdf0e10cSrcweir private:
850*cdf0e10cSrcweir     ScDataPilotFieldGroupObj& mrParent;
851*cdf0e10cSrcweir     ::rtl::OUString     maName;
852*cdf0e10cSrcweir };
853*cdf0e10cSrcweir 
854*cdf0e10cSrcweir // ============================================================================
855*cdf0e10cSrcweir 
856*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper4
857*cdf0e10cSrcweir <
858*cdf0e10cSrcweir     ::com::sun::star::container::XEnumerationAccess,
859*cdf0e10cSrcweir     ::com::sun::star::container::XIndexAccess,
860*cdf0e10cSrcweir     ::com::sun::star::container::XNameAccess,
861*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
862*cdf0e10cSrcweir >
863*cdf0e10cSrcweir ScDataPilotItemsObjImpl;
864*cdf0e10cSrcweir 
865*cdf0e10cSrcweir class ScDataPilotItemsObj : public ScDataPilotChildObjBase, public ScDataPilotItemsObjImpl
866*cdf0e10cSrcweir {
867*cdf0e10cSrcweir public:
868*cdf0e10cSrcweir     explicit            ScDataPilotItemsObj( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
869*cdf0e10cSrcweir     virtual             ~ScDataPilotItemsObj();
870*cdf0e10cSrcweir 
871*cdf0e10cSrcweir 							// XNameAccess
872*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
873*cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
874*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
875*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
876*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
877*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
878*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
879*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
880*cdf0e10cSrcweir 
881*cdf0e10cSrcweir                             // XIndexAccess
882*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
883*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
884*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
885*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
886*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
887*cdf0e10cSrcweir 
888*cdf0e10cSrcweir 							// XEnumerationAccess
889*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
890*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
891*cdf0e10cSrcweir 
892*cdf0e10cSrcweir 							// XElementAccess
893*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
894*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
895*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
896*cdf0e10cSrcweir 
897*cdf0e10cSrcweir 							// XServiceInfo
898*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
899*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
900*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
901*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
902*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
903*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
904*cdf0e10cSrcweir 
905*cdf0e10cSrcweir private:
906*cdf0e10cSrcweir     ScDataPilotItemObj* GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
907*cdf0e10cSrcweir };
908*cdf0e10cSrcweir 
909*cdf0e10cSrcweir // ============================================================================
910*cdf0e10cSrcweir 
911*cdf0e10cSrcweir typedef ::cppu::WeakImplHelper3
912*cdf0e10cSrcweir <
913*cdf0e10cSrcweir     ::com::sun::star::container::XNamed,
914*cdf0e10cSrcweir     ::com::sun::star::beans::XPropertySet,
915*cdf0e10cSrcweir     ::com::sun::star::lang::XServiceInfo
916*cdf0e10cSrcweir >
917*cdf0e10cSrcweir ScDataPilotItemObjImpl;
918*cdf0e10cSrcweir 
919*cdf0e10cSrcweir class ScDataPilotItemObj : public ScDataPilotChildObjBase, public ScDataPilotItemObjImpl
920*cdf0e10cSrcweir {
921*cdf0e10cSrcweir public:
922*cdf0e10cSrcweir     explicit            ScDataPilotItemObj(
923*cdf0e10cSrcweir                             ScDataPilotDescriptorBase& rParent,
924*cdf0e10cSrcweir                             const ScFieldIdentifier& rFieldId,
925*cdf0e10cSrcweir                             sal_Int32 nIndex );
926*cdf0e10cSrcweir 
927*cdf0e10cSrcweir     virtual             ~ScDataPilotItemObj();
928*cdf0e10cSrcweir 
929*cdf0e10cSrcweir 							// XNamed
930*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
931*cdf0e10cSrcweir 	virtual void SAL_CALL	setName( const ::rtl::OUString& aName )
932*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
933*cdf0e10cSrcweir 
934*cdf0e10cSrcweir 							// XPropertySet
935*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
936*cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo(  )
937*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
938*cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
939*cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
940*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
941*cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
942*cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
943*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
944*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
945*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
946*cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
947*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
948*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
949*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
950*cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
951*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
952*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
953*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
954*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
955*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
956*cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
957*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
958*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
959*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
960*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
961*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
962*cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
963*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
964*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
965*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
966*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
967*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
968*cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
969*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
970*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
971*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
972*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
973*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
974*cdf0e10cSrcweir 
975*cdf0e10cSrcweir 							// XServiceInfo
976*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
977*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
978*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
979*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
980*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
981*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
982*cdf0e10cSrcweir 
983*cdf0e10cSrcweir private:
984*cdf0e10cSrcweir     SfxItemPropertySet  maPropSet;
985*cdf0e10cSrcweir     sal_Int32           mnIndex;
986*cdf0e10cSrcweir };
987*cdf0e10cSrcweir 
988*cdf0e10cSrcweir // ============================================================================
989*cdf0e10cSrcweir 
990*cdf0e10cSrcweir #endif
991*cdf0e10cSrcweir 
992