LibreOffice Module sc (master) 1
dapiuno.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "cellsuno.hxx"
23#include "dpglobal.hxx"
24
25#include <svl/lstner.hxx>
26#include <svl/itemprop.hxx>
27
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>
34
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>
43
45
46#include <memory>
47#include <utility>
48#include <vector>
49
50namespace com::sun::star::sheet { struct DataPilotFieldAutoShowInfo; }
51namespace com::sun::star::sheet { class XMembersAccess; }
52namespace com::sun::star::sheet { struct DataPilotFieldLayoutInfo; }
53namespace com::sun::star::sheet { struct DataPilotFieldReference; }
54namespace com::sun::star::sheet { struct DataPilotFieldSortInfo; }
55
56
57class ScDocShell;
59struct ScDPNumGroupInfo;
60
64enum class ScGeneralFunction;
65class ScDPObject;
66
68{
69public:
71 static PivotFunc FunctionBit( sal_Int16 eFunc );
72
73 static void FillGroupInfo(
74 css::sheet::DataPilotFieldGroupInfo& rInfo,
75 const ScDPNumGroupInfo& rGroupInfo );
76};
77
79class ScDataPilotTablesObj final : public cppu::WeakImplHelper<
80 css::sheet::XDataPilotTables,
81 css::container::XEnumerationAccess,
82 css::container::XIndexAccess,
83 css::lang::XServiceInfo>,
84 public SfxListener
85{
86private:
89
92
93public:
95 virtual ~ScDataPilotTablesObj() override;
96
97 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
98
99 // XDataPilotTables
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;
106
107 // XNameAccess
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;
111
112 // XIndexAccess
113 virtual sal_Int32 SAL_CALL getCount() override;
114 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
115
116 // XEnumerationAccess
117 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
118 createEnumeration() override;
119
120 // XElementAccess
121 virtual css::uno::Type SAL_CALL getElementType() override;
122 virtual sal_Bool SAL_CALL hasElements() override;
123
124 // XServiceInfo
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;
128};
129
130// ScDataPilotDescriptorBase is never instantiated directly
131class 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>,
138 public SfxListener
139{
140private:
143
144public:
146 virtual ~ScDataPilotDescriptorBase() override;
147
148 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
149
150 ScDocShell* GetDocShell() const { return pDocShell; }
151
152 // in the derivatives:
153 virtual ScDPObject* GetDPObject() const = 0;
154 virtual void SetDPObject(ScDPObject* pDPObj) = 0;
155
156 // XDataPilotDescriptor
157 // getName, setName, getTag, setTag in derived classes
158
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;
175
176 // XPropertySet
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;
191
192 // XDataPilotDataLayoutFieldSupplier
193 virtual css::uno::Reference< css::sheet::XDataPilotField >
194 SAL_CALL getDataLayoutField() override;
195
196 // XUnoTunnel
197 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<
198 sal_Int8 >& aIdentifier ) override;
199
200 SC_DLLPUBLIC static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
201
202 // XServiceInfo is in derived classes
203};
204
206{
207private:
208 std::unique_ptr<ScDPObject> mpDPObject;
209
210public:
212 virtual ~ScDataPilotDescriptor() override;
213
214 virtual ScDPObject* GetDPObject() const override;
215 virtual void SetDPObject(ScDPObject* pDPObj) override;
216
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;
222
223 // XServiceInfo
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;
227};
228
230 public css::sheet::XDataPilotTable2,
231 public css::util::XModifyBroadcaster
232{
233private:
235 OUString aName;
237
238 void Refreshed_Impl();
239
240public:
241 ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, OUString aN);
242 virtual ~ScDataPilotTableObj() override;
243
244 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
245 virtual void SAL_CALL acquire() noexcept override;
246 virtual void SAL_CALL release() noexcept override;
247
248 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
249
250 virtual ScDPObject* GetDPObject() const override;
251 virtual void SetDPObject(ScDPObject* pDPObj) override;
252
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;
258
259 // XDataPilotTable
260 virtual css::table::CellRangeAddress SAL_CALL getOutputRange() override;
261 virtual void SAL_CALL refresh() override;
262
263 // XDataPilotTable2
264 virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > >
265 SAL_CALL getDrillDownData(const css::table::CellAddress& aAddr) override;
266
267 virtual css::sheet::DataPilotTablePositionData
268 SAL_CALL getPositionData(const css::table::CellAddress& aAddr) override;
269
270 virtual void SAL_CALL insertDrillDownSheet(const css::table::CellAddress& aAddr) override;
271
272 virtual css::table::CellRangeAddress SAL_CALL getOutputRangeByType( sal_Int32 nType ) override;
273
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;
277
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;
281
282 // XServiceInfo
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;
286};
287
289{
290 OUString maFieldName;
291 sal_Int32 mnFieldIdx;
293
294 explicit ScFieldIdentifier() :
295 mnFieldIdx( 0 ), mbDataLayout( false ) {}
296
297 explicit ScFieldIdentifier( OUString aFieldName, bool bDataLayout ) :
298 maFieldName(std::move( aFieldName )), mnFieldIdx( 0 ), mbDataLayout( bDataLayout ) {}
299};
300
304{
305protected:
308 virtual ~ScDataPilotChildObjBase();
309
311 ScDPObject* GetDPObject() const;
313 void SetDPObject( ScDPObject* pDPObject );
314
316 ScDPSaveDimension* GetDPDimension( ScDPObject** ppDPObject = nullptr ) const;
317
319 sal_Int32 GetMemberCount() const;
321 css::uno::Reference< css::sheet::XMembersAccess > GetMembers() const;
322
323 ScDocShell* GetDocShell() const;
324protected:
327
328private:
330};
331
332typedef ::cppu::WeakImplHelper
333<
334 css::container::XEnumerationAccess,
335 css::container::XIndexAccess,
336 css::container::XNameAccess,
337 css::lang::XServiceInfo
338>
340
343{
344public:
345 explicit ScDataPilotFieldsObj(
346 ScDataPilotDescriptorBase& rParent );
347
350 css::sheet::DataPilotFieldOrientation eOrient );
351
352 virtual ~ScDataPilotFieldsObj() override;
353
354 // XNameAccess
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;
358
359 // XIndexAccess
360 virtual sal_Int32 SAL_CALL getCount() override;
361 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
362
363 // XEnumerationAccess
364 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
365 createEnumeration() override;
366
367 // XElementAccess
368 virtual css::uno::Type SAL_CALL getElementType() override;
369 virtual sal_Bool SAL_CALL hasElements() override;
370
371 // XServiceInfo
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;
375
376private:
377 rtl::Reference<ScDataPilotFieldObj> GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
378 rtl::Reference<ScDataPilotFieldObj> GetObjectByName_Impl( const OUString& rName ) const;
379
380private:
381 css::uno::Any maOrient;
382};
383
384typedef ::cppu::WeakImplHelper
385<
386 css::container::XNamed,
387 css::beans::XPropertySet,
388 css::sheet::XDataPilotField,
389 css::sheet::XDataPilotFieldGrouping,
390 css::lang::XServiceInfo
391>
393
396{
397public:
400 const ScFieldIdentifier& rIdent );
401
404 const ScFieldIdentifier& rIdent,
405 css::uno::Any aOrient );
406
407 virtual ~ScDataPilotFieldObj() override;
408
409 // XNamed
410 virtual OUString SAL_CALL getName() override;
411 virtual void SAL_CALL setName(const OUString& aName) override;
412
413 // XPropertySet
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;
427
428 // XDatePilotField
429 virtual css::uno::Reference<css::container::XIndexAccess> SAL_CALL
430 getItems() override;
431
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);
453
454 bool hasGroupInfo() const;
455 css::sheet::DataPilotFieldGroupInfo getGroupInfo();
456 void setGroupInfo(const css::sheet::DataPilotFieldGroupInfo* pInfo);
457
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;
463
464 // XServiceInfo
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;
468
469private:
470 css::uno::Reference< css::container::XIndexAccess >
473 css::uno::Any maOrient;
474};
475
476typedef ::std::vector< OUString > ScFieldGroupMembers;
477
479{
480 OUString maName;
482};
483
484typedef ::std::vector< ScFieldGroup > ScFieldGroups;
485
486typedef ::cppu::WeakImplHelper
487<
488 css::container::XNameContainer,
489 css::container::XEnumerationAccess,
490 css::container::XIndexAccess,
491 css::lang::XServiceInfo
492>
494
502{
503public:
504 explicit ScDataPilotFieldGroupsObj( ScFieldGroups&& rGroups );
505 virtual ~ScDataPilotFieldGroupsObj() override;
506
507 // XNameAccess
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;
511
512 // XNameReplace
513 virtual void SAL_CALL replaceByName( const OUString& aName,
514 const css::uno::Any& aElement ) override;
515
516 // XNameContainer
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;
520
521 // XIndexAccess
522 virtual sal_Int32 SAL_CALL getCount() override;
523 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
524
525 // XEnumerationAccess
526 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
527 createEnumeration() override;
528
529 // XElementAccess
530 virtual css::uno::Type SAL_CALL getElementType() override;
531 virtual sal_Bool SAL_CALL hasElements() override;
532
533 // XServiceInfo
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;
537
538 // implementation
540 ScFieldGroup& getFieldGroup( const OUString& rName );
542 void renameFieldGroup( const OUString& rOldName, const OUString& rNewName );
543
544private:
545 ScFieldGroups::iterator implFindByName( const OUString& rName );
546
547private:
549};
550
551typedef ::cppu::WeakImplHelper
552<
553 css::container::XNameContainer,
554 css::container::XEnumerationAccess,
555 css::container::XIndexAccess,
556 css::container::XNamed,
557 css::lang::XServiceInfo
558>
560
562{
563public:
564 explicit ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& rParent, OUString aGroupName );
565 virtual ~ScDataPilotFieldGroupObj() override;
566
567 // XNameAccess
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;
571
572 // XNameReplace
573 virtual void SAL_CALL replaceByName( const OUString& aName,
574 const css::uno::Any& aElement ) override;
575
576 // XNameContainer
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;
580
581 // XIndexAccess
582 virtual sal_Int32 SAL_CALL getCount() override;
583 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
584
585 // XEnumerationAccess
586 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
587 createEnumeration() override;
588
589 // XElementAccess
590 virtual css::uno::Type SAL_CALL getElementType() override;
591 virtual sal_Bool SAL_CALL hasElements() override;
592
593 // XNamed
594 virtual OUString SAL_CALL getName() override;
595 virtual void SAL_CALL setName( const OUString& aName ) override;
596
597 // XServiceInfo
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;
601
602private:
604 OUString maGroupName;
605};
606
607typedef ::cppu::WeakImplHelper
608<
609 css::container::XNamed,
610 css::lang::XServiceInfo
611>
613
615{
616public:
617 explicit ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj& rParent, OUString aName );
618 virtual ~ScDataPilotFieldGroupItemObj() override;
619
620 // XNamed
621 virtual OUString SAL_CALL getName() override;
622 virtual void SAL_CALL setName( const OUString& aName ) override;
623
624 // XServiceInfo
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;
628
629private:
631 OUString maName;
632};
633
634typedef ::cppu::WeakImplHelper
635<
636 css::container::XEnumerationAccess,
637 css::container::XIndexAccess,
638 css::container::XNameAccess,
639 css::lang::XServiceInfo
640>
642
644{
645public:
646 explicit ScDataPilotItemsObj( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
647 virtual ~ScDataPilotItemsObj() override;
648
649 // XNameAccess
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;
653
654 // XIndexAccess
655 virtual sal_Int32 SAL_CALL getCount() override;
656 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
657
658 // XEnumerationAccess
659 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
660 createEnumeration() override;
661
662 // XElementAccess
663 virtual css::uno::Type SAL_CALL getElementType() override;
664 virtual sal_Bool SAL_CALL hasElements() override;
665
666 // XServiceInfo
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;
670
671private:
672 ScDataPilotItemObj* GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
673};
674
675typedef ::cppu::WeakImplHelper
676<
677 css::container::XNamed,
678 css::beans::XPropertySet,
679 css::lang::XServiceInfo
680>
682
684{
685public:
686 explicit ScDataPilotItemObj(
688 const ScFieldIdentifier& rFieldId,
689 sal_Int32 nIndex );
690
691 virtual ~ScDataPilotItemObj() override;
692
693 // XNamed
694 virtual OUString SAL_CALL getName() override;
695 virtual void SAL_CALL setName( const OUString& aName ) override;
696
697 // XPropertySet
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;
712
713 // XServiceInfo
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;
717
718private:
720 sal_Int32 mnIndex;
721};
722
723/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
std::vector< css::uno::Reference< css::util::XModifyListener > > XModifyListenerArr_Impl
Definition: cellsuno.hxx:130
Base class of all implementation objects based on a DataPilot descriptor or DataPilot table object.
Definition: dapiuno.hxx:304
rtl::Reference< ScDataPilotDescriptorBase > mxParent
Definition: dapiuno.hxx:325
ScFieldIdentifier maFieldId
Definition: dapiuno.hxx:326
ScDataPilotChildObjBase & operator=(const ScDataPilotChildObjBase &)=delete
static PivotFunc FunctionBit(sal_Int16 eFunc)
Definition: dapiuno.cxx:211
static void FillGroupInfo(css::sheet::DataPilotFieldGroupInfo &rInfo, const ScDPNumGroupInfo &rGroupInfo)
Definition: dapiuno.cxx:237
static ScGeneralFunction FirstFunc(PivotFunc nBits)
Definition: dapiuno.cxx:193
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: dapiuno.cxx:947
virtual void SetDPObject(ScDPObject *pDPObj)=0
ScDocShell * GetDocShell() const
Definition: dapiuno.hxx:150
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: dapiuno.cxx:937
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: dapiuno.cxx:683
ScDocShell * pDocShell
Definition: dapiuno.hxx:142
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: dapiuno.cxx:832
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: dapiuno.cxx:942
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: dapiuno.cxx:691
SfxItemPropertySet maPropSet
Definition: dapiuno.hxx:141
virtual ScDPObject * GetDPObject() const =0
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: dapiuno.cxx:952
virtual ScDPObject * GetDPObject() const override
Definition: dapiuno.cxx:1279
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getName() override
Definition: dapiuno.cxx:1295
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL setName(const OUString &aName) override
Definition: dapiuno.cxx:1301
virtual OUString SAL_CALL getTag() override
Definition: dapiuno.cxx:1307
virtual void SAL_CALL setTag(const OUString &aTag) override
Definition: dapiuno.cxx:1313
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SetDPObject(ScDPObject *pDPObj) override
Definition: dapiuno.cxx:1284
virtual ~ScDataPilotDescriptor() override
Definition: dapiuno.cxx:1275
ScDataPilotDescriptor(ScDocShell &rDocSh)
Definition: dapiuno.cxx:1260
std::unique_ptr< ScDPObject > mpDPObject
Definition: dapiuno.hxx:208
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
rtl::Reference< ScDataPilotFieldGroupObj > mxParent
Definition: dapiuno.hxx:630
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
rtl::Reference< ScDataPilotFieldGroupsObj > mxParent
Definition: dapiuno.hxx:603
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Implementation of all grouped items in a DataPilot field.
Definition: dapiuno.hxx:502
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ScFieldGroups maGroups
Definition: dapiuno.hxx:548
Implementation of a single DataPilot field.
Definition: dapiuno.hxx:396
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
css::uno::Any maOrient
Definition: dapiuno.hxx:473
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
SfxItemPropertySet maPropSet
Definition: dapiuno.hxx:472
css::uno::Reference< css::container::XIndexAccess > mxItems
Definition: dapiuno.hxx:471
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
ScDataPilotFieldObj(ScDataPilotDescriptorBase &rParent, const ScFieldIdentifier &rIdent, css::uno::Any aOrient)
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Collection of all DataPilot fields, or of all fields from a specific dimension.
Definition: dapiuno.hxx:343
virtual OUString SAL_CALL getImplementationName() override
ScDataPilotFieldsObj(ScDataPilotDescriptorBase &rParent, css::sheet::DataPilotFieldOrientation eOrient)
css::uno::Any maOrient
Definition: dapiuno.hxx:381
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
SfxItemPropertySet maPropSet
Definition: dapiuno.hxx:719
sal_Int32 mnIndex
Definition: dapiuno.hxx:720
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: dapiuno.cxx:1190
virtual ScDPObject * GetDPObject() const override
Definition: dapiuno.cxx:1039
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
XModifyListenerArr_Impl aModifyListeners
Definition: dapiuno.hxx:236
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: dapiuno.cxx:1023
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL insertDrillDownSheet(const css::table::CellAddress &aAddr) override
Definition: dapiuno.cxx:1160
virtual css::sheet::DataPilotTablePositionData SAL_CALL getPositionData(const css::table::CellAddress &aAddr) override
Definition: dapiuno.cxx:1147
virtual css::table::CellRangeAddress SAL_CALL getOutputRangeByType(sal_Int32 nType) override
Definition: dapiuno.cxx:1176
virtual void SetDPObject(ScDPObject *pDPObj) override
Definition: dapiuno.cxx:1044
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: dapiuno.cxx:1002
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: dapiuno.cxx:1034
virtual void SAL_CALL release() noexcept override
Definition: dapiuno.cxx:1018
virtual ~ScDataPilotTableObj() override
Definition: dapiuno.cxx:998
virtual void SAL_CALL setTag(const OUString &aTag) override
Definition: dapiuno.cxx:1091
virtual OUString SAL_CALL getTag() override
Definition: dapiuno.cxx:1082
virtual OUString SAL_CALL getName() override
Definition: dapiuno.cxx:1057
virtual void SAL_CALL setName(const OUString &aName) override
Definition: dapiuno.cxx:1066
virtual void SAL_CALL acquire() noexcept override
Definition: dapiuno.cxx:1013
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL refresh() override
Definition: dapiuno.cxx:1123
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: dapiuno.cxx:1202
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDrillDownData(const css::table::CellAddress &aAddr) override
Definition: dapiuno.cxx:1134
virtual css::table::CellRangeAddress SAL_CALL getOutputRange() override
Definition: dapiuno.cxx:1106
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: dapiuno.cxx:1226
ScDataPilotTableObj(ScDocShell &rDocSh, SCTAB nT, OUString aN)
Definition: dapiuno.cxx:990
DataPilotTables collection per sheet.
Definition: dapiuno.hxx:85
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL insertNewByName(const OUString &aName, const css::table::CellAddress &aOutputAddress, const css::uno::Reference< css::sheet::XDataPilotDescriptor > &xDescriptor) override
Definition: dapiuno.cxx:404
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: dapiuno.cxx:512
rtl::Reference< ScDataPilotTableObj > GetObjectByName_Impl(const OUString &aName)
Definition: dapiuno.cxx:352
virtual ~ScDataPilotTablesObj() override
Definition: dapiuno.cxx:304
virtual void SAL_CALL removeByName(const OUString &aName) override
Definition: dapiuno.cxx:442
virtual css::uno::Type SAL_CALL getElementType() override
Definition: dapiuno.cxx:499
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: dapiuno.cxx:312
ScDataPilotTablesObj(ScDocShell &rDocSh, SCTAB nT)
Definition: dapiuno.cxx:297
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: dapiuno.cxx:558
virtual sal_Bool SAL_CALL hasElements() override
Definition: dapiuno.cxx:504
virtual css::uno::Reference< css::sheet::XDataPilotDescriptor > SAL_CALL createDataPilotDescriptor() override
Definition: dapiuno.cxx:359
rtl::Reference< ScDataPilotTableObj > GetObjectByIndex_Impl(sal_Int32 nIndex)
Definition: dapiuno.cxx:324
virtual sal_Int32 SAL_CALL getCount() override
Definition: dapiuno.cxx:464
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: dapiuno.cxx:521
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: dapiuno.cxx:456
ScDocShell * pDocShell
Definition: dapiuno.hxx:87
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: dapiuno.cxx:490
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
::std::vector< ScFieldGroup > ScFieldGroups
Definition: dapiuno.hxx:484
::cppu::WeakImplHelper< css::container::XEnumerationAccess, css::container::XIndexAccess, css::container::XNameAccess, css::lang::XServiceInfo > ScDataPilotFieldsObjImpl
Definition: dapiuno.hxx:339
::cppu::WeakImplHelper< css::container::XNamed, css::beans::XPropertySet, css::sheet::XDataPilotField, css::sheet::XDataPilotFieldGrouping, css::lang::XServiceInfo > ScDataPilotFieldObjImpl
Definition: dapiuno.hxx:392
::cppu::WeakImplHelper< css::container::XEnumerationAccess, css::container::XIndexAccess, css::container::XNameAccess, css::lang::XServiceInfo > ScDataPilotItemsObjImpl
Definition: dapiuno.hxx:641
::cppu::WeakImplHelper< css::container::XNamed, css::beans::XPropertySet, css::lang::XServiceInfo > ScDataPilotItemObjImpl
Definition: dapiuno.hxx:681
::std::vector< OUString > ScFieldGroupMembers
Definition: dapiuno.hxx:476
::cppu::WeakImplHelper< css::container::XNameContainer, css::container::XEnumerationAccess, css::container::XIndexAccess, css::lang::XServiceInfo > ScDataPilotFieldGroupsObjImpl
Definition: dapiuno.hxx:493
::cppu::WeakImplHelper< css::container::XNamed, css::lang::XServiceInfo > ScDataPilotFieldGroupItemObjImpl
Definition: dapiuno.hxx:612
::cppu::WeakImplHelper< css::container::XNameContainer, css::container::XEnumerationAccess, css::container::XIndexAccess, css::container::XNamed, css::lang::XServiceInfo > ScDataPilotFieldGroupObjImpl
Definition: dapiuno.hxx:559
PivotFunc
Definition: dpglobal.hxx:24
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2,...
sal_Int32 nIndex
B2VectorOrientation getOrientation(const B2DPolygon &rCandidate)
Type
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
Orientation
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
ScFieldGroupMembers maMembers
Definition: dapiuno.hxx:481
OUString maName
Definition: dapiuno.hxx:480
ScFieldIdentifier()
True = data layout field collecting all data fields as items.
Definition: dapiuno.hxx:294
bool mbDataLayout
Field index (if several fields with same name exist).
Definition: dapiuno.hxx:292
OUString maFieldName
Definition: dapiuno.hxx:290
ScFieldIdentifier(OUString aFieldName, bool bDataLayout)
Definition: dapiuno.hxx:297
sal_Int32 mnFieldIdx
Source field name.
Definition: dapiuno.hxx:291
OUString Name
unsigned char sal_Bool
signed char sal_Int8
sal_Int16 SCTAB
Definition: types.hxx:22