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 .
20 #ifndef INCLUDED_SC_INC_DAPIUNO_HXX
21 #define INCLUDED_SC_INC_DAPIUNO_HXX
23 #include "cellsuno.hxx"
24 #include "dpglobal.hxx"
26 #include <svl/lstner.hxx>
27 #include <svl/itemprop.hxx>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/lang/XUnoTunnel.hpp>
31 #include <com/sun/star/beans/XPropertySet.hpp>
32 #include <com/sun/star/container/XEnumerationAccess.hpp>
33 #include <com/sun/star/container/XNameContainer.hpp>
34 #include <com/sun/star/util/XModifyBroadcaster.hpp>
36 #include <com/sun/star/sheet/DataPilotFieldGroupInfo.hpp>
37 #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
38 #include <com/sun/star/sheet/XDataPilotDataLayoutFieldSupplier.hpp>
39 #include <com/sun/star/sheet/XDataPilotDescriptor.hpp>
40 #include <com/sun/star/sheet/XDataPilotField.hpp>
41 #include <com/sun/star/sheet/XDataPilotFieldGrouping.hpp>
42 #include <com/sun/star/sheet/XDataPilotTable2.hpp>
43 #include <com/sun/star/sheet/XDataPilotTables.hpp>
45 #include <cppuhelper/implbase.hxx>
50 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{ struct DataPilotFieldAutoShowInfo
; } } } }
51 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{ class XMembersAccess
; } } } }
52 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{ struct DataPilotFieldLayoutInfo
; } } } }
53 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{ struct DataPilotFieldReference
; } } } }
54 namespace com
{ namespace sun
{ namespace star
{ namespace sheet
{ struct DataPilotFieldSortInfo
; } } } }
58 class ScDPSaveDimension
;
59 struct ScDPNumGroupInfo
;
61 class ScDataPilotTableObj
;
62 class ScDataPilotFieldObj
;
63 class ScDataPilotItemObj
;
64 enum class ScGeneralFunction
;
67 class ScDataPilotConversion
70 static ScGeneralFunction
FirstFunc( PivotFunc nBits
);
71 static PivotFunc
FunctionBit( sal_Int16 eFunc
);
73 static void FillGroupInfo(
74 css::sheet::DataPilotFieldGroupInfo
& rInfo
,
75 const ScDPNumGroupInfo
& rGroupInfo
);
78 /** DataPilotTables collection per sheet. */
79 class ScDataPilotTablesObj final
: public cppu::WeakImplHelper
<
80 css::sheet::XDataPilotTables
,
81 css::container::XEnumerationAccess
,
82 css::container::XIndexAccess
,
83 css::lang::XServiceInfo
>,
87 ScDocShell
* pDocShell
;
90 ScDataPilotTableObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
);
91 ScDataPilotTableObj
* GetObjectByName_Impl(const OUString
& aName
);
94 ScDataPilotTablesObj(ScDocShell
* pDocSh
, SCTAB nT
);
95 virtual ~ScDataPilotTablesObj() override
;
97 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
100 virtual css::uno::Reference
< css::sheet::XDataPilotDescriptor
> SAL_CALL
101 createDataPilotDescriptor() override
;
102 virtual void SAL_CALL
insertNewByName( const OUString
& aName
,
103 const css::table::CellAddress
& aOutputAddress
,
104 const css::uno::Reference
< css::sheet::XDataPilotDescriptor
>& xDescriptor
) override
;
105 virtual void SAL_CALL
removeByName( const OUString
& aName
) override
;
108 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
109 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
110 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
113 virtual sal_Int32 SAL_CALL
getCount() override
;
114 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
116 // XEnumerationAccess
117 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
118 createEnumeration() override
;
121 virtual css::uno::Type SAL_CALL
getElementType() override
;
122 virtual sal_Bool SAL_CALL
hasElements() override
;
125 virtual OUString SAL_CALL
getImplementationName() override
;
126 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
127 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
130 // ScDataPilotDescriptorBase is never instantiated directly
131 class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase
:
132 public cppu::WeakImplHelper
<
133 css::sheet::XDataPilotDescriptor
,
134 css::beans::XPropertySet
,
135 css::sheet::XDataPilotDataLayoutFieldSupplier
,
136 css::lang::XServiceInfo
,
137 css::lang::XUnoTunnel
>,
141 SfxItemPropertySet
const maPropSet
;
142 ScDocShell
* pDocShell
;
145 ScDataPilotDescriptorBase(ScDocShell
* pDocSh
);
146 virtual ~ScDataPilotDescriptorBase() override
;
148 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
150 ScDocShell
* GetDocShell() const { return pDocShell
; }
152 // in the derivatives:
153 virtual ScDPObject
* GetDPObject() const = 0;
154 virtual void SetDPObject(ScDPObject
* pDPObj
) = 0;
156 // XDataPilotDescriptor
157 // getName, setName, getTag, setTag in derived classes
159 virtual css::table::CellRangeAddress SAL_CALL
getSourceRange() override
;
160 virtual void SAL_CALL
setSourceRange( const css::table::CellRangeAddress
& aSourceRange
) override
;
161 virtual css::uno::Reference
< css::sheet::XSheetFilterDescriptor
> SAL_CALL
162 getFilterDescriptor() override
;
163 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
164 getDataPilotFields() override
;
165 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
166 getColumnFields() override
;
167 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
168 getRowFields() override
;
169 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
170 getPageFields() override
;
171 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
172 getDataFields() override
;
173 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
174 getHiddenFields() override
;
177 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
178 SAL_CALL
getPropertySetInfo( ) override
;
179 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
180 const css::uno::Any
& aValue
) override
;
181 virtual css::uno::Any SAL_CALL
getPropertyValue(
182 const OUString
& PropertyName
) override
;
183 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
184 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
185 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
186 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
187 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
188 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
189 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
190 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
192 // XDataPilotDataLayoutFieldSupplier
193 virtual css::uno::Reference
< css::sheet::XDataPilotField
>
194 SAL_CALL
getDataLayoutField() override
;
197 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
<
198 sal_Int8
>& aIdentifier
) override
;
200 SC_DLLPUBLIC
static const css::uno::Sequence
<sal_Int8
>& getUnoTunnelId();
202 // XServiceInfo is in derived classes
205 class ScDataPilotDescriptor final
: public ScDataPilotDescriptorBase
208 std::unique_ptr
<ScDPObject
> mpDPObject
;
211 ScDataPilotDescriptor(ScDocShell
* pDocSh
);
212 virtual ~ScDataPilotDescriptor() override
;
214 virtual ScDPObject
* GetDPObject() const override
;
215 virtual void SetDPObject(ScDPObject
* pDPObj
) override
;
217 // rest of XDataPilotDescriptor (incl. XNamed)
218 virtual OUString SAL_CALL
getName() override
;
219 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
220 virtual OUString SAL_CALL
getTag() override
;
221 virtual void SAL_CALL
setTag( const OUString
& aTag
) override
;
224 virtual OUString SAL_CALL
getImplementationName() override
;
225 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
226 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
229 class ScDataPilotTableObj
: public ScDataPilotDescriptorBase
,
230 public css::sheet::XDataPilotTable2
,
231 public css::util::XModifyBroadcaster
236 XModifyListenerArr_Impl aModifyListeners
;
238 void Refreshed_Impl();
241 ScDataPilotTableObj(ScDocShell
* pDocSh
, SCTAB nT
, const OUString
& rN
);
242 virtual ~ScDataPilotTableObj() override
;
244 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
245 virtual void SAL_CALL
acquire() throw() override
;
246 virtual void SAL_CALL
release() throw() override
;
248 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
250 virtual ScDPObject
* GetDPObject() const override
;
251 virtual void SetDPObject(ScDPObject
* pDPObj
) override
;
253 // rest of XDataPilotDescriptor (incl. XNamed)
254 virtual OUString SAL_CALL
getName() override
;
255 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
256 virtual OUString SAL_CALL
getTag() override
;
257 virtual void SAL_CALL
setTag( const OUString
& aTag
) override
;
260 virtual css::table::CellRangeAddress SAL_CALL
getOutputRange() override
;
261 virtual void SAL_CALL
refresh() override
;
264 virtual css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> >
265 SAL_CALL
getDrillDownData(const css::table::CellAddress
& aAddr
) override
;
267 virtual css::sheet::DataPilotTablePositionData
268 SAL_CALL
getPositionData(const css::table::CellAddress
& aAddr
) override
;
270 virtual void SAL_CALL
insertDrillDownSheet(const css::table::CellAddress
& aAddr
) override
;
272 virtual css::table::CellRangeAddress SAL_CALL
getOutputRangeByType( sal_Int32 nType
) override
;
274 // XModifyBroadcaster
275 virtual void SAL_CALL
addModifyListener( const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
276 virtual void SAL_CALL
removeModifyListener( const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
278 // XTypeProvider (override)
279 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes() override
;
280 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId() override
;
283 virtual OUString SAL_CALL
getImplementationName() override
;
284 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
285 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
288 struct ScFieldIdentifier
290 OUString maFieldName
; /// Source field name.
291 sal_Int32 mnFieldIdx
; /// Field index (if several fields with same name exist).
292 bool mbDataLayout
; /// True = data layout field collecting all data fields as items.
294 explicit ScFieldIdentifier() :
295 mnFieldIdx( 0 ), mbDataLayout( false ) {}
297 explicit ScFieldIdentifier( const OUString
& rFieldName
, bool bDataLayout
) :
298 maFieldName( rFieldName
), mnFieldIdx( 0 ), mbDataLayout( bDataLayout
) {}
301 /** Base class of all implementation objects based on a DataPilot descriptor
302 or DataPilot table object. Wraps acquiring and releasing the parent. */
303 class ScDataPilotChildObjBase
306 explicit ScDataPilotChildObjBase( ScDataPilotDescriptorBase
& rParent
);
307 explicit ScDataPilotChildObjBase( ScDataPilotDescriptorBase
& rParent
, const ScFieldIdentifier
& rFieldId
);
308 virtual ~ScDataPilotChildObjBase();
310 /** Returns the wrapped DataPilot object (calls GetDPObject() at parent). */
311 ScDPObject
* GetDPObject() const;
312 /** Sets the passed DataPilot object (calls SetDPObject() at parent). */
313 void SetDPObject( ScDPObject
* pDPObject
);
315 /** Returns the DataPilot dimension object related to the field described by maFieldId. */
316 ScDPSaveDimension
* GetDPDimension( ScDPObject
** ppDPObject
= nullptr ) const;
318 /** Returns the number of members for the field described by maFieldId. */
319 sal_Int32
GetMemberCount() const;
320 /** Returns the collection of members for the field described by maFieldId. */
321 css::uno::Reference
< css::sheet::XMembersAccess
> GetMembers() const;
323 ScDocShell
* GetDocShell() const;
325 rtl::Reference
<ScDataPilotDescriptorBase
> mxParent
;
326 ScFieldIdentifier maFieldId
;
329 ScDataPilotChildObjBase
& operator=( const ScDataPilotChildObjBase
& ) = delete;
332 typedef ::cppu::WeakImplHelper
334 css::container::XEnumerationAccess
,
335 css::container::XIndexAccess
,
336 css::container::XNameAccess
,
337 css::lang::XServiceInfo
339 ScDataPilotFieldsObjImpl
;
341 /** Collection of all DataPilot fields, or of all fields from a specific dimension. */
342 class ScDataPilotFieldsObj final
: public ScDataPilotChildObjBase
, public ScDataPilotFieldsObjImpl
345 explicit ScDataPilotFieldsObj(
346 ScDataPilotDescriptorBase
& rParent
);
348 explicit ScDataPilotFieldsObj(
349 ScDataPilotDescriptorBase
& rParent
,
350 css::sheet::DataPilotFieldOrientation eOrient
);
352 virtual ~ScDataPilotFieldsObj() override
;
355 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
356 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
357 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
360 virtual sal_Int32 SAL_CALL
getCount() override
;
361 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
363 // XEnumerationAccess
364 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
365 createEnumeration() override
;
368 virtual css::uno::Type SAL_CALL
getElementType() override
;
369 virtual sal_Bool SAL_CALL
hasElements() override
;
372 virtual OUString SAL_CALL
getImplementationName() override
;
373 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
374 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
377 ScDataPilotFieldObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
378 ScDataPilotFieldObj
* GetObjectByName_Impl( const OUString
& rName
) const;
381 css::uno::Any
const maOrient
; /// Field orientation, no value = all fields.
384 typedef ::cppu::WeakImplHelper
386 css::container::XNamed
,
387 css::beans::XPropertySet
,
388 css::sheet::XDataPilotField
,
389 css::sheet::XDataPilotFieldGrouping
,
390 css::lang::XServiceInfo
392 ScDataPilotFieldObjImpl
;
394 /** Implementation of a single DataPilot field. */
395 class ScDataPilotFieldObj
: public ScDataPilotChildObjBase
, public ScDataPilotFieldObjImpl
399 ScDataPilotDescriptorBase
& rParent
,
400 const ScFieldIdentifier
& rIdent
);
403 ScDataPilotDescriptorBase
& rParent
,
404 const ScFieldIdentifier
& rIdent
,
405 const css::uno::Any
& rOrient
);
407 virtual ~ScDataPilotFieldObj() override
;
410 virtual OUString SAL_CALL
getName() override
;
411 virtual void SAL_CALL
setName(const OUString
& aName
) override
;
414 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
415 SAL_CALL
getPropertySetInfo( ) override
;
416 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
417 const css::uno::Any
& aValue
) override
;
418 virtual css::uno::Any SAL_CALL
getPropertyValue(const OUString
& PropertyName
) override
;
419 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
420 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
421 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
422 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
423 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
424 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
425 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
426 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
429 virtual css::uno::Reference
<css::container::XIndexAccess
> SAL_CALL
432 // only called from property-functions:
433 css::sheet::DataPilotFieldOrientation
getOrientation() const;
434 void setOrientation(css::sheet::DataPilotFieldOrientation Orientation
);
435 sal_Int16
getFunction() const;
436 void setFunction(ScGeneralFunction Function
);
437 css::uno::Sequence
< sal_Int16
> getSubtotals() const;
438 void setSubtotals(const std::vector
< ScGeneralFunction
>& rFunctions
);
439 void setCurrentPage(const OUString
& sPage
);
440 void setUseCurrentPage(bool bUse
);
441 const css::sheet::DataPilotFieldAutoShowInfo
* getAutoShowInfo() const;
442 void setAutoShowInfo(const css::sheet::DataPilotFieldAutoShowInfo
* pInfo
);
443 const css::sheet::DataPilotFieldLayoutInfo
* getLayoutInfo() const;
444 void setLayoutInfo(const css::sheet::DataPilotFieldLayoutInfo
* pInfo
);
445 const css::sheet::DataPilotFieldReference
* getReference() const;
446 void setReference(const css::sheet::DataPilotFieldReference
* pInfo
);
447 const css::sheet::DataPilotFieldSortInfo
* getSortInfo() const;
448 void setSortInfo(const css::sheet::DataPilotFieldSortInfo
* pInfo
);
449 bool getShowEmpty() const;
450 void setShowEmpty(bool bShow
);
451 bool getRepeatItemLabels() const;
452 void setRepeatItemLabels(bool bShow
);
454 bool hasGroupInfo() const;
455 css::sheet::DataPilotFieldGroupInfo
getGroupInfo();
456 void setGroupInfo(const css::sheet::DataPilotFieldGroupInfo
* pInfo
);
458 // XDataPilotFieldGrouping
459 virtual css::uno::Reference
< css::sheet::XDataPilotField
> SAL_CALL
460 createNameGroup(const css::uno::Sequence
< OUString
>& aItems
) override
;
461 virtual css::uno::Reference
< css::sheet::XDataPilotField
> SAL_CALL
462 createDateGroup(const css::sheet::DataPilotFieldGroupInfo
& rInfo
) override
;
465 virtual OUString SAL_CALL
getImplementationName() override
;
466 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
467 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
470 css::uno::Reference
< css::container::XIndexAccess
>
472 SfxItemPropertySet
const maPropSet
;
473 css::uno::Any maOrient
;
476 typedef ::std::vector
< OUString
> ScFieldGroupMembers
;
481 ScFieldGroupMembers maMembers
;
484 typedef ::std::vector
< ScFieldGroup
> ScFieldGroups
;
486 typedef ::cppu::WeakImplHelper
488 css::container::XNameContainer
,
489 css::container::XEnumerationAccess
,
490 css::container::XIndexAccess
,
491 css::lang::XServiceInfo
493 ScDataPilotFieldGroupsObjImpl
;
495 /** Implementation of all grouped items in a DataPilot field.
497 This is a stand-alone object without any connection to the base DataPilot
498 field. Grouping info has to be written back with the GroupInfo property of
499 the DataPilot field after modifying this object.
501 class ScDataPilotFieldGroupsObj final
: public ScDataPilotFieldGroupsObjImpl
504 explicit ScDataPilotFieldGroupsObj( const ScFieldGroups
& rGroups
);
505 virtual ~ScDataPilotFieldGroupsObj() override
;
508 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
509 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
510 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
513 virtual void SAL_CALL
replaceByName( const OUString
& aName
,
514 const css::uno::Any
& aElement
) override
;
517 virtual void SAL_CALL
insertByName( const OUString
& aName
,
518 const css::uno::Any
& aElement
) override
;
519 virtual void SAL_CALL
removeByName( const OUString
& Name
) override
;
522 virtual sal_Int32 SAL_CALL
getCount() override
;
523 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
525 // XEnumerationAccess
526 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
527 createEnumeration() override
;
530 virtual css::uno::Type SAL_CALL
getElementType() override
;
531 virtual sal_Bool SAL_CALL
hasElements() override
;
534 virtual OUString SAL_CALL
getImplementationName() override
;
535 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
536 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
539 /// @throws css::uno::RuntimeException
540 ScFieldGroup
& getFieldGroup( const OUString
& rName
);
541 /// @throws css::uno::RuntimeException
542 void renameFieldGroup( const OUString
& rOldName
, const OUString
& rNewName
);
545 ScFieldGroups::iterator
implFindByName( const OUString
& rName
);
548 ScFieldGroups maGroups
;
551 typedef ::cppu::WeakImplHelper
553 css::container::XNameContainer
,
554 css::container::XEnumerationAccess
,
555 css::container::XIndexAccess
,
556 css::container::XNamed
,
557 css::lang::XServiceInfo
559 ScDataPilotFieldGroupObjImpl
;
561 class ScDataPilotFieldGroupObj final
: public ScDataPilotFieldGroupObjImpl
564 explicit ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj
& rParent
, const OUString
& rGroupName
);
565 virtual ~ScDataPilotFieldGroupObj() override
;
568 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
569 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
570 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
573 virtual void SAL_CALL
replaceByName( const OUString
& aName
,
574 const css::uno::Any
& aElement
) override
;
577 virtual void SAL_CALL
insertByName( const OUString
& aName
,
578 const css::uno::Any
& aElement
) override
;
579 virtual void SAL_CALL
removeByName( const OUString
& Name
) override
;
582 virtual sal_Int32 SAL_CALL
getCount() override
;
583 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
585 // XEnumerationAccess
586 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
587 createEnumeration() override
;
590 virtual css::uno::Type SAL_CALL
getElementType() override
;
591 virtual sal_Bool SAL_CALL
hasElements() override
;
594 virtual OUString SAL_CALL
getName() override
;
595 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
598 virtual OUString SAL_CALL
getImplementationName() override
;
599 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
600 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
603 rtl::Reference
<ScDataPilotFieldGroupsObj
> mxParent
;
604 OUString maGroupName
;
607 typedef ::cppu::WeakImplHelper
609 css::container::XNamed
,
610 css::lang::XServiceInfo
612 ScDataPilotFieldGroupItemObjImpl
;
614 class ScDataPilotFieldGroupItemObj final
: public ScDataPilotFieldGroupItemObjImpl
617 explicit ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj
& rParent
, const OUString
& rName
);
618 virtual ~ScDataPilotFieldGroupItemObj() override
;
621 virtual OUString SAL_CALL
getName() override
;
622 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
625 virtual OUString SAL_CALL
getImplementationName() override
;
626 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
627 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
630 rtl::Reference
<ScDataPilotFieldGroupObj
> mxParent
;
634 typedef ::cppu::WeakImplHelper
636 css::container::XEnumerationAccess
,
637 css::container::XIndexAccess
,
638 css::container::XNameAccess
,
639 css::lang::XServiceInfo
641 ScDataPilotItemsObjImpl
;
643 class ScDataPilotItemsObj final
: public ScDataPilotChildObjBase
, public ScDataPilotItemsObjImpl
646 explicit ScDataPilotItemsObj( ScDataPilotDescriptorBase
& rParent
, const ScFieldIdentifier
& rFieldId
);
647 virtual ~ScDataPilotItemsObj() override
;
650 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
) override
;
651 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() override
;
652 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
) override
;
655 virtual sal_Int32 SAL_CALL
getCount() override
;
656 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
658 // XEnumerationAccess
659 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
660 createEnumeration() override
;
663 virtual css::uno::Type SAL_CALL
getElementType() override
;
664 virtual sal_Bool SAL_CALL
hasElements() override
;
667 virtual OUString SAL_CALL
getImplementationName() override
;
668 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
669 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
672 ScDataPilotItemObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
675 typedef ::cppu::WeakImplHelper
677 css::container::XNamed
,
678 css::beans::XPropertySet
,
679 css::lang::XServiceInfo
681 ScDataPilotItemObjImpl
;
683 class ScDataPilotItemObj
: public ScDataPilotChildObjBase
, public ScDataPilotItemObjImpl
686 explicit ScDataPilotItemObj(
687 ScDataPilotDescriptorBase
& rParent
,
688 const ScFieldIdentifier
& rFieldId
,
691 virtual ~ScDataPilotItemObj() override
;
694 virtual OUString SAL_CALL
getName() override
;
695 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
698 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
699 SAL_CALL
getPropertySetInfo( ) override
;
700 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
701 const css::uno::Any
& aValue
) override
;
702 virtual css::uno::Any SAL_CALL
getPropertyValue(
703 const OUString
& PropertyName
) override
;
704 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
705 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
706 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
707 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
708 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
709 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
710 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
711 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
714 virtual OUString SAL_CALL
getImplementationName() override
;
715 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
716 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
719 SfxItemPropertySet
const maPropSet
;
725 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */