1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include "cellsuno.hxx"
23 #include "dpglobal.hxx"
25 #include <svl/lstner.hxx>
26 #include <svl/itemprop.hxx>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/lang/XUnoTunnel.hpp>
30 #include <com/sun/star/beans/XPropertySet.hpp>
31 #include <com/sun/star/container/XEnumerationAccess.hpp>
32 #include <com/sun/star/container/XNameContainer.hpp>
33 #include <com/sun/star/util/XModifyBroadcaster.hpp>
35 #include <com/sun/star/sheet/DataPilotFieldGroupInfo.hpp>
36 #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
37 #include <com/sun/star/sheet/XDataPilotDataLayoutFieldSupplier.hpp>
38 #include <com/sun/star/sheet/XDataPilotDescriptor.hpp>
39 #include <com/sun/star/sheet/XDataPilotField.hpp>
40 #include <com/sun/star/sheet/XDataPilotFieldGrouping.hpp>
41 #include <com/sun/star/sheet/XDataPilotTable2.hpp>
42 #include <com/sun/star/sheet/XDataPilotTables.hpp>
44 #include <cppuhelper/implbase.hxx>
49 namespace com::sun::star::sheet
{ struct DataPilotFieldAutoShowInfo
; }
50 namespace com::sun::star::sheet
{ class XMembersAccess
; }
51 namespace com::sun::star::sheet
{ struct DataPilotFieldLayoutInfo
; }
52 namespace com::sun::star::sheet
{ struct DataPilotFieldReference
; }
53 namespace com::sun::star::sheet
{ struct DataPilotFieldSortInfo
; }
57 class ScDPSaveDimension
;
58 struct ScDPNumGroupInfo
;
60 class ScDataPilotTableObj
;
61 class ScDataPilotFieldObj
;
62 class ScDataPilotItemObj
;
63 enum class ScGeneralFunction
;
66 class ScDataPilotConversion
69 static ScGeneralFunction
FirstFunc( PivotFunc nBits
);
70 static PivotFunc
FunctionBit( sal_Int16 eFunc
);
72 static void FillGroupInfo(
73 css::sheet::DataPilotFieldGroupInfo
& rInfo
,
74 const ScDPNumGroupInfo
& rGroupInfo
);
77 /** DataPilotTables collection per sheet. */
78 class ScDataPilotTablesObj final
: public cppu::WeakImplHelper
<
79 css::sheet::XDataPilotTables
,
80 css::container::XEnumerationAccess
,
81 css::container::XIndexAccess
,
82 css::lang::XServiceInfo
>,
86 ScDocShell
* pDocShell
;
89 rtl::Reference
<ScDataPilotTableObj
> GetObjectByIndex_Impl( sal_Int32 nIndex
);
90 rtl::Reference
<ScDataPilotTableObj
> GetObjectByName_Impl(const OUString
& aName
);
93 ScDataPilotTablesObj(ScDocShell
* pDocSh
, SCTAB nT
);
94 virtual ~ScDataPilotTablesObj() override
;
96 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
99 virtual css::uno::Reference
< css::sheet::XDataPilotDescriptor
> SAL_CALL
100 createDataPilotDescriptor() override
;
101 virtual void SAL_CALL
insertNewByName( const OUString
& aName
,
102 const css::table::CellAddress
& aOutputAddress
,
103 const css::uno::Reference
< css::sheet::XDataPilotDescriptor
>& xDescriptor
) override
;
104 virtual void SAL_CALL
removeByName( const OUString
& aName
) override
;
107 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
108 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
109 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
112 virtual sal_Int32 SAL_CALL
getCount() override
;
113 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
115 // XEnumerationAccess
116 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
117 createEnumeration() override
;
120 virtual css::uno::Type SAL_CALL
getElementType() override
;
121 virtual sal_Bool SAL_CALL
hasElements() override
;
124 virtual OUString SAL_CALL
getImplementationName() override
;
125 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
126 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
129 // ScDataPilotDescriptorBase is never instantiated directly
130 class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase
:
131 public cppu::WeakImplHelper
<
132 css::sheet::XDataPilotDescriptor
,
133 css::beans::XPropertySet
,
134 css::sheet::XDataPilotDataLayoutFieldSupplier
,
135 css::lang::XServiceInfo
,
136 css::lang::XUnoTunnel
>,
140 SfxItemPropertySet maPropSet
;
141 ScDocShell
* pDocShell
;
144 ScDataPilotDescriptorBase(ScDocShell
* pDocSh
);
145 virtual ~ScDataPilotDescriptorBase() override
;
147 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
149 ScDocShell
* GetDocShell() const { return pDocShell
; }
151 // in the derivatives:
152 virtual ScDPObject
* GetDPObject() const = 0;
153 virtual void SetDPObject(ScDPObject
* pDPObj
) = 0;
155 // XDataPilotDescriptor
156 // getName, setName, getTag, setTag in derived classes
158 virtual css::table::CellRangeAddress SAL_CALL
getSourceRange() override
;
159 virtual void SAL_CALL
setSourceRange( const css::table::CellRangeAddress
& aSourceRange
) override
;
160 virtual css::uno::Reference
< css::sheet::XSheetFilterDescriptor
> SAL_CALL
161 getFilterDescriptor() override
;
162 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
163 getDataPilotFields() override
;
164 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
165 getColumnFields() override
;
166 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
167 getRowFields() override
;
168 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
169 getPageFields() override
;
170 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
171 getDataFields() override
;
172 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
173 getHiddenFields() override
;
176 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
177 SAL_CALL
getPropertySetInfo( ) override
;
178 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
179 const css::uno::Any
& aValue
) override
;
180 virtual css::uno::Any SAL_CALL
getPropertyValue(
181 const OUString
& PropertyName
) override
;
182 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
183 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
184 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
185 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
186 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
187 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
188 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
189 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
191 // XDataPilotDataLayoutFieldSupplier
192 virtual css::uno::Reference
< css::sheet::XDataPilotField
>
193 SAL_CALL
getDataLayoutField() override
;
196 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
<
197 sal_Int8
>& aIdentifier
) override
;
199 SC_DLLPUBLIC
static const css::uno::Sequence
<sal_Int8
>& getUnoTunnelId();
201 // XServiceInfo is in derived classes
204 class ScDataPilotDescriptor final
: public ScDataPilotDescriptorBase
207 std::unique_ptr
<ScDPObject
> mpDPObject
;
210 ScDataPilotDescriptor(ScDocShell
* pDocSh
);
211 virtual ~ScDataPilotDescriptor() override
;
213 virtual ScDPObject
* GetDPObject() const override
;
214 virtual void SetDPObject(ScDPObject
* pDPObj
) override
;
216 // rest of XDataPilotDescriptor (incl. XNamed)
217 virtual OUString SAL_CALL
getName() override
;
218 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
219 virtual OUString SAL_CALL
getTag() override
;
220 virtual void SAL_CALL
setTag( const OUString
& aTag
) override
;
223 virtual OUString SAL_CALL
getImplementationName() override
;
224 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
225 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
228 class ScDataPilotTableObj final
: public ScDataPilotDescriptorBase
,
229 public css::sheet::XDataPilotTable2
,
230 public css::util::XModifyBroadcaster
235 XModifyListenerArr_Impl aModifyListeners
;
237 void Refreshed_Impl();
240 ScDataPilotTableObj(ScDocShell
* pDocSh
, SCTAB nT
, const OUString
& rN
);
241 virtual ~ScDataPilotTableObj() override
;
243 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
244 virtual void SAL_CALL
acquire() noexcept override
;
245 virtual void SAL_CALL
release() noexcept override
;
247 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
249 virtual ScDPObject
* GetDPObject() const override
;
250 virtual void SetDPObject(ScDPObject
* pDPObj
) override
;
252 // rest of XDataPilotDescriptor (incl. XNamed)
253 virtual OUString SAL_CALL
getName() override
;
254 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
255 virtual OUString SAL_CALL
getTag() override
;
256 virtual void SAL_CALL
setTag( const OUString
& aTag
) override
;
259 virtual css::table::CellRangeAddress SAL_CALL
getOutputRange() override
;
260 virtual void SAL_CALL
refresh() override
;
263 virtual css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> >
264 SAL_CALL
getDrillDownData(const css::table::CellAddress
& aAddr
) override
;
266 virtual css::sheet::DataPilotTablePositionData
267 SAL_CALL
getPositionData(const css::table::CellAddress
& aAddr
) override
;
269 virtual void SAL_CALL
insertDrillDownSheet(const css::table::CellAddress
& aAddr
) override
;
271 virtual css::table::CellRangeAddress SAL_CALL
getOutputRangeByType( sal_Int32 nType
) override
;
273 // XModifyBroadcaster
274 virtual void SAL_CALL
addModifyListener( const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
275 virtual void SAL_CALL
removeModifyListener( const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
277 // XTypeProvider (override)
278 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes() override
;
279 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId() override
;
282 virtual OUString SAL_CALL
getImplementationName() override
;
283 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
284 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
287 struct ScFieldIdentifier
289 OUString maFieldName
; /// Source field name.
290 sal_Int32 mnFieldIdx
; /// Field index (if several fields with same name exist).
291 bool mbDataLayout
; /// True = data layout field collecting all data fields as items.
293 explicit ScFieldIdentifier() :
294 mnFieldIdx( 0 ), mbDataLayout( false ) {}
296 explicit ScFieldIdentifier( const OUString
& rFieldName
, bool bDataLayout
) :
297 maFieldName( rFieldName
), mnFieldIdx( 0 ), mbDataLayout( bDataLayout
) {}
300 /** Base class of all implementation objects based on a DataPilot descriptor
301 or DataPilot table object. Wraps acquiring and releasing the parent. */
302 class ScDataPilotChildObjBase
305 explicit ScDataPilotChildObjBase( ScDataPilotDescriptorBase
& rParent
);
306 explicit ScDataPilotChildObjBase( ScDataPilotDescriptorBase
& rParent
, const ScFieldIdentifier
& rFieldId
);
307 virtual ~ScDataPilotChildObjBase();
309 /** Returns the wrapped DataPilot object (calls GetDPObject() at parent). */
310 ScDPObject
* GetDPObject() const;
311 /** Sets the passed DataPilot object (calls SetDPObject() at parent). */
312 void SetDPObject( ScDPObject
* pDPObject
);
314 /** Returns the DataPilot dimension object related to the field described by maFieldId. */
315 ScDPSaveDimension
* GetDPDimension( ScDPObject
** ppDPObject
= nullptr ) const;
317 /** Returns the number of members for the field described by maFieldId. */
318 sal_Int32
GetMemberCount() const;
319 /** Returns the collection of members for the field described by maFieldId. */
320 css::uno::Reference
< css::sheet::XMembersAccess
> GetMembers() const;
322 ScDocShell
* GetDocShell() const;
324 rtl::Reference
<ScDataPilotDescriptorBase
> mxParent
;
325 ScFieldIdentifier maFieldId
;
328 ScDataPilotChildObjBase
& operator=( const ScDataPilotChildObjBase
& ) = delete;
331 typedef ::cppu::WeakImplHelper
333 css::container::XEnumerationAccess
,
334 css::container::XIndexAccess
,
335 css::container::XNameAccess
,
336 css::lang::XServiceInfo
338 ScDataPilotFieldsObjImpl
;
340 /** Collection of all DataPilot fields, or of all fields from a specific dimension. */
341 class ScDataPilotFieldsObj final
: public ScDataPilotChildObjBase
, public ScDataPilotFieldsObjImpl
344 explicit ScDataPilotFieldsObj(
345 ScDataPilotDescriptorBase
& rParent
);
347 explicit ScDataPilotFieldsObj(
348 ScDataPilotDescriptorBase
& rParent
,
349 css::sheet::DataPilotFieldOrientation eOrient
);
351 virtual ~ScDataPilotFieldsObj() override
;
354 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
355 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
356 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
359 virtual sal_Int32 SAL_CALL
getCount() override
;
360 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
362 // XEnumerationAccess
363 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
364 createEnumeration() override
;
367 virtual css::uno::Type SAL_CALL
getElementType() override
;
368 virtual sal_Bool SAL_CALL
hasElements() override
;
371 virtual OUString SAL_CALL
getImplementationName() override
;
372 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
373 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
376 rtl::Reference
<ScDataPilotFieldObj
> GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
377 rtl::Reference
<ScDataPilotFieldObj
> GetObjectByName_Impl( const OUString
& rName
) const;
380 css::uno::Any maOrient
; /// Field orientation, no value = all fields.
383 typedef ::cppu::WeakImplHelper
385 css::container::XNamed
,
386 css::beans::XPropertySet
,
387 css::sheet::XDataPilotField
,
388 css::sheet::XDataPilotFieldGrouping
,
389 css::lang::XServiceInfo
391 ScDataPilotFieldObjImpl
;
393 /** Implementation of a single DataPilot field. */
394 class ScDataPilotFieldObj final
: public ScDataPilotChildObjBase
, public ScDataPilotFieldObjImpl
398 ScDataPilotDescriptorBase
& rParent
,
399 const ScFieldIdentifier
& rIdent
);
402 ScDataPilotDescriptorBase
& rParent
,
403 const ScFieldIdentifier
& rIdent
,
404 const css::uno::Any
& rOrient
);
406 virtual ~ScDataPilotFieldObj() override
;
409 virtual OUString SAL_CALL
getName() override
;
410 virtual void SAL_CALL
setName(const OUString
& aName
) override
;
413 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
414 SAL_CALL
getPropertySetInfo( ) override
;
415 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
416 const css::uno::Any
& aValue
) override
;
417 virtual css::uno::Any SAL_CALL
getPropertyValue(const OUString
& PropertyName
) override
;
418 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
419 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
420 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
421 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
422 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
423 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
424 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
425 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
428 virtual css::uno::Reference
<css::container::XIndexAccess
> SAL_CALL
431 // only called from property-functions:
432 css::sheet::DataPilotFieldOrientation
getOrientation() const;
433 void setOrientation(css::sheet::DataPilotFieldOrientation Orientation
);
434 sal_Int16
getFunction() const;
435 void setFunction(ScGeneralFunction Function
);
436 css::uno::Sequence
< sal_Int16
> getSubtotals() const;
437 void setSubtotals(const std::vector
< ScGeneralFunction
>& rFunctions
);
438 void setCurrentPage(const OUString
& sPage
);
439 void setUseCurrentPage(bool bUse
);
440 const css::sheet::DataPilotFieldAutoShowInfo
* getAutoShowInfo() const;
441 void setAutoShowInfo(const css::sheet::DataPilotFieldAutoShowInfo
* pInfo
);
442 const css::sheet::DataPilotFieldLayoutInfo
* getLayoutInfo() const;
443 void setLayoutInfo(const css::sheet::DataPilotFieldLayoutInfo
* pInfo
);
444 const css::sheet::DataPilotFieldReference
* getReference() const;
445 void setReference(const css::sheet::DataPilotFieldReference
* pInfo
);
446 const css::sheet::DataPilotFieldSortInfo
* getSortInfo() const;
447 void setSortInfo(const css::sheet::DataPilotFieldSortInfo
* pInfo
);
448 bool getShowEmpty() const;
449 void setShowEmpty(bool bShow
);
450 bool getRepeatItemLabels() const;
451 void setRepeatItemLabels(bool bShow
);
453 bool hasGroupInfo() const;
454 css::sheet::DataPilotFieldGroupInfo
getGroupInfo();
455 void setGroupInfo(const css::sheet::DataPilotFieldGroupInfo
* pInfo
);
457 // XDataPilotFieldGrouping
458 virtual css::uno::Reference
< css::sheet::XDataPilotField
> SAL_CALL
459 createNameGroup(const css::uno::Sequence
< OUString
>& aItems
) override
;
460 virtual css::uno::Reference
< css::sheet::XDataPilotField
> SAL_CALL
461 createDateGroup(const css::sheet::DataPilotFieldGroupInfo
& rInfo
) override
;
464 virtual OUString SAL_CALL
getImplementationName() override
;
465 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
466 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
469 css::uno::Reference
< css::container::XIndexAccess
>
471 SfxItemPropertySet maPropSet
;
472 css::uno::Any maOrient
;
475 typedef ::std::vector
< OUString
> ScFieldGroupMembers
;
480 ScFieldGroupMembers maMembers
;
483 typedef ::std::vector
< ScFieldGroup
> ScFieldGroups
;
485 typedef ::cppu::WeakImplHelper
487 css::container::XNameContainer
,
488 css::container::XEnumerationAccess
,
489 css::container::XIndexAccess
,
490 css::lang::XServiceInfo
492 ScDataPilotFieldGroupsObjImpl
;
494 /** Implementation of all grouped items in a DataPilot field.
496 This is a stand-alone object without any connection to the base DataPilot
497 field. Grouping info has to be written back with the GroupInfo property of
498 the DataPilot field after modifying this object.
500 class ScDataPilotFieldGroupsObj final
: public ScDataPilotFieldGroupsObjImpl
503 explicit ScDataPilotFieldGroupsObj( ScFieldGroups
&& rGroups
);
504 virtual ~ScDataPilotFieldGroupsObj() override
;
507 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
508 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
509 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
512 virtual void SAL_CALL
replaceByName( const OUString
& aName
,
513 const css::uno::Any
& aElement
) override
;
516 virtual void SAL_CALL
insertByName( const OUString
& aName
,
517 const css::uno::Any
& aElement
) override
;
518 virtual void SAL_CALL
removeByName( const OUString
& Name
) override
;
521 virtual sal_Int32 SAL_CALL
getCount() override
;
522 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
524 // XEnumerationAccess
525 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
526 createEnumeration() override
;
529 virtual css::uno::Type SAL_CALL
getElementType() override
;
530 virtual sal_Bool SAL_CALL
hasElements() override
;
533 virtual OUString SAL_CALL
getImplementationName() override
;
534 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
535 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
538 /// @throws css::uno::RuntimeException
539 ScFieldGroup
& getFieldGroup( const OUString
& rName
);
540 /// @throws css::uno::RuntimeException
541 void renameFieldGroup( const OUString
& rOldName
, const OUString
& rNewName
);
544 ScFieldGroups::iterator
implFindByName( const OUString
& rName
);
547 ScFieldGroups maGroups
;
550 typedef ::cppu::WeakImplHelper
552 css::container::XNameContainer
,
553 css::container::XEnumerationAccess
,
554 css::container::XIndexAccess
,
555 css::container::XNamed
,
556 css::lang::XServiceInfo
558 ScDataPilotFieldGroupObjImpl
;
560 class ScDataPilotFieldGroupObj final
: public ScDataPilotFieldGroupObjImpl
563 explicit ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj
& rParent
, const OUString
& rGroupName
);
564 virtual ~ScDataPilotFieldGroupObj() override
;
567 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
568 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
569 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
572 virtual void SAL_CALL
replaceByName( const OUString
& aName
,
573 const css::uno::Any
& aElement
) override
;
576 virtual void SAL_CALL
insertByName( const OUString
& aName
,
577 const css::uno::Any
& aElement
) override
;
578 virtual void SAL_CALL
removeByName( const OUString
& Name
) override
;
581 virtual sal_Int32 SAL_CALL
getCount() override
;
582 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
584 // XEnumerationAccess
585 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
586 createEnumeration() override
;
589 virtual css::uno::Type SAL_CALL
getElementType() override
;
590 virtual sal_Bool SAL_CALL
hasElements() override
;
593 virtual OUString SAL_CALL
getName() override
;
594 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
597 virtual OUString SAL_CALL
getImplementationName() override
;
598 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
599 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
602 rtl::Reference
<ScDataPilotFieldGroupsObj
> mxParent
;
603 OUString maGroupName
;
606 typedef ::cppu::WeakImplHelper
608 css::container::XNamed
,
609 css::lang::XServiceInfo
611 ScDataPilotFieldGroupItemObjImpl
;
613 class ScDataPilotFieldGroupItemObj final
: public ScDataPilotFieldGroupItemObjImpl
616 explicit ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj
& rParent
, const OUString
& rName
);
617 virtual ~ScDataPilotFieldGroupItemObj() override
;
620 virtual OUString SAL_CALL
getName() override
;
621 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
624 virtual OUString SAL_CALL
getImplementationName() override
;
625 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
626 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
629 rtl::Reference
<ScDataPilotFieldGroupObj
> mxParent
;
633 typedef ::cppu::WeakImplHelper
635 css::container::XEnumerationAccess
,
636 css::container::XIndexAccess
,
637 css::container::XNameAccess
,
638 css::lang::XServiceInfo
640 ScDataPilotItemsObjImpl
;
642 class ScDataPilotItemsObj final
: public ScDataPilotChildObjBase
, public ScDataPilotItemsObjImpl
645 explicit ScDataPilotItemsObj( ScDataPilotDescriptorBase
& rParent
, const ScFieldIdentifier
& rFieldId
);
646 virtual ~ScDataPilotItemsObj() override
;
649 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
650 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
651 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
654 virtual sal_Int32 SAL_CALL
getCount() override
;
655 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
657 // XEnumerationAccess
658 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
659 createEnumeration() override
;
662 virtual css::uno::Type SAL_CALL
getElementType() override
;
663 virtual sal_Bool SAL_CALL
hasElements() override
;
666 virtual OUString SAL_CALL
getImplementationName() override
;
667 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
668 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
671 ScDataPilotItemObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
674 typedef ::cppu::WeakImplHelper
676 css::container::XNamed
,
677 css::beans::XPropertySet
,
678 css::lang::XServiceInfo
680 ScDataPilotItemObjImpl
;
682 class ScDataPilotItemObj final
: public ScDataPilotChildObjBase
, public ScDataPilotItemObjImpl
685 explicit ScDataPilotItemObj(
686 ScDataPilotDescriptorBase
& rParent
,
687 const ScFieldIdentifier
& rFieldId
,
690 virtual ~ScDataPilotItemObj() override
;
693 virtual OUString SAL_CALL
getName() override
;
694 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
697 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
698 SAL_CALL
getPropertySetInfo( ) override
;
699 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
700 const css::uno::Any
& aValue
) override
;
701 virtual css::uno::Any SAL_CALL
getPropertyValue(
702 const OUString
& PropertyName
) override
;
703 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
704 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
705 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
706 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
707 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
708 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
709 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
710 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
713 virtual OUString SAL_CALL
getImplementationName() override
;
714 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
715 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
718 SfxItemPropertySet maPropSet
;
722 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */