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