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