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/beans/XPropertySet.hpp>
30#include <com/sun/star/container/XEnumerationAccess.hpp>
31#include <com/sun/star/container/XNameContainer.hpp>
32#include <com/sun/star/util/XModifyBroadcaster.hpp>
33
34#include <com/sun/star/sheet/DataPilotFieldGroupInfo.hpp>
35#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
36#include <com/sun/star/sheet/XDataPilotDataLayoutFieldSupplier.hpp>
37#include <com/sun/star/sheet/XDataPilotDescriptor.hpp>
38#include <com/sun/star/sheet/XDataPilotField.hpp>
39#include <com/sun/star/sheet/XDataPilotFieldGrouping.hpp>
40#include <com/sun/star/sheet/XDataPilotTable2.hpp>
41#include <com/sun/star/sheet/XDataPilotTables.hpp>
42
44
45#include <memory>
46#include <utility>
47#include <vector>
48
49namespace com::sun::star::sheet { struct DataPilotFieldAutoShowInfo; }
50namespace com::sun::star::sheet { class XMembersAccess; }
51namespace com::sun::star::sheet { struct DataPilotFieldLayoutInfo; }
52namespace com::sun::star::sheet { struct DataPilotFieldReference; }
53namespace com::sun::star::sheet { struct DataPilotFieldSortInfo; }
54
55
56class ScDocShell;
58struct ScDPNumGroupInfo;
59
63enum class ScGeneralFunction;
64class ScDPObject;
65
67{
68public:
70 static PivotFunc FunctionBit( sal_Int16 eFunc );
71
72 static void FillGroupInfo(
73 css::sheet::DataPilotFieldGroupInfo& rInfo,
74 const ScDPNumGroupInfo& rGroupInfo );
75};
76
78class ScDataPilotTablesObj final : public cppu::WeakImplHelper<
79 css::sheet::XDataPilotTables,
80 css::container::XEnumerationAccess,
81 css::container::XIndexAccess,
82 css::lang::XServiceInfo>,
83 public SfxListener
84{
85private:
88
91
92public:
94 virtual ~ScDataPilotTablesObj() override;
95
96 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
97
98 // XDataPilotTables
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;
105
106 // XNameAccess
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;
110
111 // XIndexAccess
112 virtual sal_Int32 SAL_CALL getCount() override;
113 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
114
115 // XEnumerationAccess
116 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
117 createEnumeration() override;
118
119 // XElementAccess
120 virtual css::uno::Type SAL_CALL getElementType() override;
121 virtual sal_Bool SAL_CALL hasElements() override;
122
123 // XServiceInfo
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;
127};
128
129// ScDataPilotDescriptorBase is never instantiated directly
130class SC_DLLPUBLIC ScDataPilotDescriptorBase : public cppu::WeakImplHelper<
131 css::sheet::XDataPilotDescriptor,
132 css::beans::XPropertySet,
133 css::sheet::XDataPilotDataLayoutFieldSupplier,
134 css::lang::XServiceInfo>,
135 public SfxListener
136{
137private:
140
141public:
143 virtual ~ScDataPilotDescriptorBase() override;
144
145 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
146
147 ScDocShell* GetDocShell() const { return pDocShell; }
148
149 // in the derivatives:
150 virtual ScDPObject* GetDPObject() const = 0;
151 virtual void SetDPObject(ScDPObject* pDPObj) = 0;
152
153 // XDataPilotDescriptor
154 // getName, setName, getTag, setTag in derived classes
155
156 virtual css::table::CellRangeAddress SAL_CALL getSourceRange() override;
157 virtual void SAL_CALL setSourceRange( const css::table::CellRangeAddress& aSourceRange ) override;
158 virtual css::uno::Reference< css::sheet::XSheetFilterDescriptor > SAL_CALL
159 getFilterDescriptor() override;
160 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL
161 getDataPilotFields() override;
162 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL
163 getColumnFields() override;
164 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL
165 getRowFields() override;
166 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL
167 getPageFields() override;
168 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL
169 getDataFields() override;
170 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL
171 getHiddenFields() override;
172
173 // XPropertySet
174 virtual css::uno::Reference< css::beans::XPropertySetInfo >
175 SAL_CALL getPropertySetInfo( ) override;
176 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
177 const css::uno::Any& aValue ) override;
178 virtual css::uno::Any SAL_CALL getPropertyValue(
179 const OUString& PropertyName ) override;
180 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
181 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
182 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
183 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
184 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
185 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
186 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
187 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
188
189 // XDataPilotDataLayoutFieldSupplier
190 virtual css::uno::Reference< css::sheet::XDataPilotField >
191 SAL_CALL getDataLayoutField() override;
192
193 // XServiceInfo is in derived classes
194};
195
197{
198private:
199 std::unique_ptr<ScDPObject> mpDPObject;
200
201public:
203 virtual ~ScDataPilotDescriptor() override;
204
205 virtual ScDPObject* GetDPObject() const override;
206 virtual void SetDPObject(ScDPObject* pDPObj) override;
207
208 // rest of XDataPilotDescriptor (incl. XNamed)
209 virtual OUString SAL_CALL getName() override;
210 virtual void SAL_CALL setName( const OUString& aName ) override;
211 virtual OUString SAL_CALL getTag() override;
212 virtual void SAL_CALL setTag( const OUString& aTag ) override;
213
214 // XServiceInfo
215 virtual OUString SAL_CALL getImplementationName() override;
216 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
217 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
218};
219
221 public css::sheet::XDataPilotTable2,
222 public css::util::XModifyBroadcaster
223{
224private:
226 OUString aName;
228
229 void Refreshed_Impl();
230
231public:
232 ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, OUString aN);
233 virtual ~ScDataPilotTableObj() override;
234
235 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
236 virtual void SAL_CALL acquire() noexcept override;
237 virtual void SAL_CALL release() noexcept override;
238
239 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
240
241 virtual ScDPObject* GetDPObject() const override;
242 virtual void SetDPObject(ScDPObject* pDPObj) override;
243
244 // rest of XDataPilotDescriptor (incl. XNamed)
245 virtual OUString SAL_CALL getName() override;
246 virtual void SAL_CALL setName( const OUString& aName ) override;
247 virtual OUString SAL_CALL getTag() override;
248 virtual void SAL_CALL setTag( const OUString& aTag ) override;
249
250 // XDataPilotTable
251 virtual css::table::CellRangeAddress SAL_CALL getOutputRange() override;
252 virtual void SAL_CALL refresh() override;
253
254 // XDataPilotTable2
255 virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > >
256 SAL_CALL getDrillDownData(const css::table::CellAddress& aAddr) override;
257
258 virtual css::sheet::DataPilotTablePositionData
259 SAL_CALL getPositionData(const css::table::CellAddress& aAddr) override;
260
261 virtual void SAL_CALL insertDrillDownSheet(const css::table::CellAddress& aAddr) override;
262
263 virtual css::table::CellRangeAddress SAL_CALL getOutputRangeByType( sal_Int32 nType ) override;
264
265 // XModifyBroadcaster
266 virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
267 virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
268
269 // XTypeProvider (override)
270 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
271 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
272
273 // XServiceInfo
274 virtual OUString SAL_CALL getImplementationName() override;
275 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
276 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
277};
278
280{
281 OUString maFieldName;
282 sal_Int32 mnFieldIdx;
284
285 explicit ScFieldIdentifier() :
286 mnFieldIdx( 0 ), mbDataLayout( false ) {}
287
288 explicit ScFieldIdentifier( OUString aFieldName, bool bDataLayout ) :
289 maFieldName(std::move( aFieldName )), mnFieldIdx( 0 ), mbDataLayout( bDataLayout ) {}
290};
291
295{
296protected:
299 virtual ~ScDataPilotChildObjBase();
300
302 ScDPObject* GetDPObject() const;
304 void SetDPObject( ScDPObject* pDPObject );
305
307 ScDPSaveDimension* GetDPDimension( ScDPObject** ppDPObject = nullptr ) const;
308
310 sal_Int32 GetMemberCount() const;
312 css::uno::Reference< css::sheet::XMembersAccess > GetMembers() const;
313
314 ScDocShell* GetDocShell() const;
315protected:
318
319private:
321};
322
323typedef ::cppu::WeakImplHelper
324<
325 css::container::XEnumerationAccess,
326 css::container::XIndexAccess,
327 css::container::XNameAccess,
328 css::lang::XServiceInfo
329>
331
334{
335public:
336 explicit ScDataPilotFieldsObj(
337 ScDataPilotDescriptorBase& rParent );
338
341 css::sheet::DataPilotFieldOrientation eOrient );
342
343 virtual ~ScDataPilotFieldsObj() override;
344
345 // XNameAccess
346 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
347 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
348 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
349
350 // XIndexAccess
351 virtual sal_Int32 SAL_CALL getCount() override;
352 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
353
354 // XEnumerationAccess
355 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
356 createEnumeration() override;
357
358 // XElementAccess
359 virtual css::uno::Type SAL_CALL getElementType() override;
360 virtual sal_Bool SAL_CALL hasElements() override;
361
362 // XServiceInfo
363 virtual OUString SAL_CALL getImplementationName() override;
364 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
365 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
366
367private:
368 rtl::Reference<ScDataPilotFieldObj> GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
369 rtl::Reference<ScDataPilotFieldObj> GetObjectByName_Impl( const OUString& rName ) const;
370
371private:
372 css::uno::Any maOrient;
373};
374
375typedef ::cppu::WeakImplHelper
376<
377 css::container::XNamed,
378 css::beans::XPropertySet,
379 css::sheet::XDataPilotField,
380 css::sheet::XDataPilotFieldGrouping,
381 css::lang::XServiceInfo
382>
384
387{
388public:
391 const ScFieldIdentifier& rIdent );
392
395 const ScFieldIdentifier& rIdent,
396 css::uno::Any aOrient );
397
398 virtual ~ScDataPilotFieldObj() override;
399
400 // XNamed
401 virtual OUString SAL_CALL getName() override;
402 virtual void SAL_CALL setName(const OUString& aName) override;
403
404 // XPropertySet
405 virtual css::uno::Reference< css::beans::XPropertySetInfo >
406 SAL_CALL getPropertySetInfo( ) override;
407 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
408 const css::uno::Any& aValue ) override;
409 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& PropertyName ) override;
410 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
411 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
412 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
413 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
414 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
415 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
416 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
417 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
418
419 // XDatePilotField
420 virtual css::uno::Reference<css::container::XIndexAccess> SAL_CALL
421 getItems() override;
422
423 // only called from property-functions:
424 css::sheet::DataPilotFieldOrientation getOrientation() const;
425 void setOrientation(css::sheet::DataPilotFieldOrientation Orientation);
426 sal_Int16 getFunction() const;
427 void setFunction(ScGeneralFunction Function);
428 css::uno::Sequence< sal_Int16 > getSubtotals() const;
429 void setSubtotals(const std::vector< ScGeneralFunction >& rFunctions);
430 void setCurrentPage(const OUString& sPage);
431 void setUseCurrentPage(bool bUse);
432 const css::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo() const;
433 void setAutoShowInfo(const css::sheet::DataPilotFieldAutoShowInfo* pInfo);
434 const css::sheet::DataPilotFieldLayoutInfo* getLayoutInfo() const;
435 void setLayoutInfo(const css::sheet::DataPilotFieldLayoutInfo* pInfo);
436 const css::sheet::DataPilotFieldReference* getReference() const;
437 void setReference(const css::sheet::DataPilotFieldReference* pInfo);
438 const css::sheet::DataPilotFieldSortInfo* getSortInfo() const;
439 void setSortInfo(const css::sheet::DataPilotFieldSortInfo* pInfo);
440 bool getShowEmpty() const;
441 void setShowEmpty(bool bShow);
442 bool getRepeatItemLabels() const;
443 void setRepeatItemLabels(bool bShow);
444
445 bool hasGroupInfo() const;
446 css::sheet::DataPilotFieldGroupInfo getGroupInfo();
447 void setGroupInfo(const css::sheet::DataPilotFieldGroupInfo* pInfo);
448
449 // XDataPilotFieldGrouping
450 virtual css::uno::Reference < css::sheet::XDataPilotField > SAL_CALL
451 createNameGroup(const css::uno::Sequence< OUString >& aItems) override;
452 virtual css::uno::Reference < css::sheet::XDataPilotField > SAL_CALL
453 createDateGroup(const css::sheet::DataPilotFieldGroupInfo& rInfo) override;
454
455 // XServiceInfo
456 virtual OUString SAL_CALL getImplementationName() override;
457 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
458 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
459
460private:
461 css::uno::Reference< css::container::XIndexAccess >
464 css::uno::Any maOrient;
465};
466
467typedef ::std::vector< OUString > ScFieldGroupMembers;
468
470{
471 OUString maName;
473};
474
475typedef ::std::vector< ScFieldGroup > ScFieldGroups;
476
477typedef ::cppu::WeakImplHelper
478<
479 css::container::XNameContainer,
480 css::container::XEnumerationAccess,
481 css::container::XIndexAccess,
482 css::lang::XServiceInfo
483>
485
493{
494public:
495 explicit ScDataPilotFieldGroupsObj( ScFieldGroups&& rGroups );
496 virtual ~ScDataPilotFieldGroupsObj() override;
497
498 // XNameAccess
499 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
500 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
501 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
502
503 // XNameReplace
504 virtual void SAL_CALL replaceByName( const OUString& aName,
505 const css::uno::Any& aElement ) override;
506
507 // XNameContainer
508 virtual void SAL_CALL insertByName( const OUString& aName,
509 const css::uno::Any& aElement ) override;
510 virtual void SAL_CALL removeByName( const OUString& Name ) override;
511
512 // XIndexAccess
513 virtual sal_Int32 SAL_CALL getCount() override;
514 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
515
516 // XEnumerationAccess
517 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
518 createEnumeration() override;
519
520 // XElementAccess
521 virtual css::uno::Type SAL_CALL getElementType() override;
522 virtual sal_Bool SAL_CALL hasElements() override;
523
524 // XServiceInfo
525 virtual OUString SAL_CALL getImplementationName() override;
526 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
527 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
528
529 // implementation
531 ScFieldGroup& getFieldGroup( const OUString& rName );
533 void renameFieldGroup( const OUString& rOldName, const OUString& rNewName );
534
535private:
536 ScFieldGroups::iterator implFindByName( const OUString& rName );
537
538private:
540};
541
542typedef ::cppu::WeakImplHelper
543<
544 css::container::XNameContainer,
545 css::container::XEnumerationAccess,
546 css::container::XIndexAccess,
547 css::container::XNamed,
548 css::lang::XServiceInfo
549>
551
553{
554public:
555 explicit ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& rParent, OUString aGroupName );
556 virtual ~ScDataPilotFieldGroupObj() override;
557
558 // XNameAccess
559 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
560 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
561 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
562
563 // XNameReplace
564 virtual void SAL_CALL replaceByName( const OUString& aName,
565 const css::uno::Any& aElement ) override;
566
567 // XNameContainer
568 virtual void SAL_CALL insertByName( const OUString& aName,
569 const css::uno::Any& aElement ) override;
570 virtual void SAL_CALL removeByName( const OUString& Name ) override;
571
572 // XIndexAccess
573 virtual sal_Int32 SAL_CALL getCount() override;
574 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
575
576 // XEnumerationAccess
577 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
578 createEnumeration() override;
579
580 // XElementAccess
581 virtual css::uno::Type SAL_CALL getElementType() override;
582 virtual sal_Bool SAL_CALL hasElements() override;
583
584 // XNamed
585 virtual OUString SAL_CALL getName() override;
586 virtual void SAL_CALL setName( const OUString& aName ) override;
587
588 // XServiceInfo
589 virtual OUString SAL_CALL getImplementationName() override;
590 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
591 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
592
593private:
595 OUString maGroupName;
596};
597
598typedef ::cppu::WeakImplHelper
599<
600 css::container::XNamed,
601 css::lang::XServiceInfo
602>
604
606{
607public:
608 explicit ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj& rParent, OUString aName );
609 virtual ~ScDataPilotFieldGroupItemObj() override;
610
611 // XNamed
612 virtual OUString SAL_CALL getName() override;
613 virtual void SAL_CALL setName( const OUString& aName ) override;
614
615 // XServiceInfo
616 virtual OUString SAL_CALL getImplementationName() override;
617 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
618 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
619
620private:
622 OUString maName;
623};
624
625typedef ::cppu::WeakImplHelper
626<
627 css::container::XEnumerationAccess,
628 css::container::XIndexAccess,
629 css::container::XNameAccess,
630 css::lang::XServiceInfo
631>
633
635{
636public:
637 explicit ScDataPilotItemsObj( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId );
638 virtual ~ScDataPilotItemsObj() override;
639
640 // XNameAccess
641 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
642 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
643 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
644
645 // XIndexAccess
646 virtual sal_Int32 SAL_CALL getCount() override;
647 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
648
649 // XEnumerationAccess
650 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
651 createEnumeration() override;
652
653 // XElementAccess
654 virtual css::uno::Type SAL_CALL getElementType() override;
655 virtual sal_Bool SAL_CALL hasElements() override;
656
657 // XServiceInfo
658 virtual OUString SAL_CALL getImplementationName() override;
659 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
660 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
661
662private:
663 ScDataPilotItemObj* GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
664};
665
666typedef ::cppu::WeakImplHelper
667<
668 css::container::XNamed,
669 css::beans::XPropertySet,
670 css::lang::XServiceInfo
671>
673
675{
676public:
677 explicit ScDataPilotItemObj(
679 const ScFieldIdentifier& rFieldId,
680 sal_Int32 nIndex );
681
682 virtual ~ScDataPilotItemObj() override;
683
684 // XNamed
685 virtual OUString SAL_CALL getName() override;
686 virtual void SAL_CALL setName( const OUString& aName ) override;
687
688 // XPropertySet
689 virtual css::uno::Reference< css::beans::XPropertySetInfo >
690 SAL_CALL getPropertySetInfo( ) override;
691 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
692 const css::uno::Any& aValue ) override;
693 virtual css::uno::Any SAL_CALL getPropertyValue(
694 const OUString& PropertyName ) override;
695 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
696 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
697 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
698 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
699 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
700 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
701 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
702 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
703
704 // XServiceInfo
705 virtual OUString SAL_CALL getImplementationName() override;
706 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
707 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
708
709private:
711 sal_Int32 mnIndex;
712};
713
714/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
std::vector< css::uno::Reference< css::util::XModifyListener > > XModifyListenerArr_Impl
Definition: cellsuno.hxx:129
Base class of all implementation objects based on a DataPilot descriptor or DataPilot table object.
Definition: dapiuno.hxx:295
rtl::Reference< ScDataPilotDescriptorBase > mxParent
Definition: dapiuno.hxx:316
ScFieldIdentifier maFieldId
Definition: dapiuno.hxx:317
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:147
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:139
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:138
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:1265
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getName() override
Definition: dapiuno.cxx:1281
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL setName(const OUString &aName) override
Definition: dapiuno.cxx:1287
virtual OUString SAL_CALL getTag() override
Definition: dapiuno.cxx:1293
virtual void SAL_CALL setTag(const OUString &aTag) override
Definition: dapiuno.cxx:1299
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SetDPObject(ScDPObject *pDPObj) override
Definition: dapiuno.cxx:1270
virtual ~ScDataPilotDescriptor() override
Definition: dapiuno.cxx:1261
ScDataPilotDescriptor(ScDocShell &rDocSh)
Definition: dapiuno.cxx:1246
std::unique_ptr< ScDPObject > mpDPObject
Definition: dapiuno.hxx:199
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:621
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
rtl::Reference< ScDataPilotFieldGroupsObj > mxParent
Definition: dapiuno.hxx:594
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Implementation of all grouped items in a DataPilot field.
Definition: dapiuno.hxx:493
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:539
Implementation of a single DataPilot field.
Definition: dapiuno.hxx:387
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
css::uno::Any maOrient
Definition: dapiuno.hxx:464
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:463
css::uno::Reference< css::container::XIndexAccess > mxItems
Definition: dapiuno.hxx:462
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:334
virtual OUString SAL_CALL getImplementationName() override
ScDataPilotFieldsObj(ScDataPilotDescriptorBase &rParent, css::sheet::DataPilotFieldOrientation eOrient)
css::uno::Any maOrient
Definition: dapiuno.hxx:372
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:710
sal_Int32 mnIndex
Definition: dapiuno.hxx:711
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:1176
virtual ScDPObject * GetDPObject() const override
Definition: dapiuno.cxx:1025
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
XModifyListenerArr_Impl aModifyListeners
Definition: dapiuno.hxx:227
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: dapiuno.cxx:1009
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL insertDrillDownSheet(const css::table::CellAddress &aAddr) override
Definition: dapiuno.cxx:1146
virtual css::sheet::DataPilotTablePositionData SAL_CALL getPositionData(const css::table::CellAddress &aAddr) override
Definition: dapiuno.cxx:1133
virtual css::table::CellRangeAddress SAL_CALL getOutputRangeByType(sal_Int32 nType) override
Definition: dapiuno.cxx:1162
virtual void SetDPObject(ScDPObject *pDPObj) override
Definition: dapiuno.cxx:1030
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: dapiuno.cxx:988
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: dapiuno.cxx:1020
virtual void SAL_CALL release() noexcept override
Definition: dapiuno.cxx:1004
virtual ~ScDataPilotTableObj() override
Definition: dapiuno.cxx:984
virtual void SAL_CALL setTag(const OUString &aTag) override
Definition: dapiuno.cxx:1077
virtual OUString SAL_CALL getTag() override
Definition: dapiuno.cxx:1068
virtual OUString SAL_CALL getName() override
Definition: dapiuno.cxx:1043
virtual void SAL_CALL setName(const OUString &aName) override
Definition: dapiuno.cxx:1052
virtual void SAL_CALL acquire() noexcept override
Definition: dapiuno.cxx:999
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL refresh() override
Definition: dapiuno.cxx:1109
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: dapiuno.cxx:1188
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDrillDownData(const css::table::CellAddress &aAddr) override
Definition: dapiuno.cxx:1120
virtual css::table::CellRangeAddress SAL_CALL getOutputRange() override
Definition: dapiuno.cxx:1092
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: dapiuno.cxx:1212
ScDataPilotTableObj(ScDocShell &rDocSh, SCTAB nT, OUString aN)
Definition: dapiuno.cxx:976
DataPilotTables collection per sheet.
Definition: dapiuno.hxx:84
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:86
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:475
::cppu::WeakImplHelper< css::container::XEnumerationAccess, css::container::XIndexAccess, css::container::XNameAccess, css::lang::XServiceInfo > ScDataPilotFieldsObjImpl
Definition: dapiuno.hxx:330
::cppu::WeakImplHelper< css::container::XNamed, css::beans::XPropertySet, css::sheet::XDataPilotField, css::sheet::XDataPilotFieldGrouping, css::lang::XServiceInfo > ScDataPilotFieldObjImpl
Definition: dapiuno.hxx:383
::cppu::WeakImplHelper< css::container::XEnumerationAccess, css::container::XIndexAccess, css::container::XNameAccess, css::lang::XServiceInfo > ScDataPilotItemsObjImpl
Definition: dapiuno.hxx:632
::cppu::WeakImplHelper< css::container::XNamed, css::beans::XPropertySet, css::lang::XServiceInfo > ScDataPilotItemObjImpl
Definition: dapiuno.hxx:672
::std::vector< OUString > ScFieldGroupMembers
Definition: dapiuno.hxx:467
::cppu::WeakImplHelper< css::container::XNameContainer, css::container::XEnumerationAccess, css::container::XIndexAccess, css::lang::XServiceInfo > ScDataPilotFieldGroupsObjImpl
Definition: dapiuno.hxx:484
::cppu::WeakImplHelper< css::container::XNamed, css::lang::XServiceInfo > ScDataPilotFieldGroupItemObjImpl
Definition: dapiuno.hxx:603
::cppu::WeakImplHelper< css::container::XNameContainer, css::container::XEnumerationAccess, css::container::XIndexAccess, css::container::XNamed, css::lang::XServiceInfo > ScDataPilotFieldGroupObjImpl
Definition: dapiuno.hxx:550
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:472
OUString maName
Definition: dapiuno.hxx:471
ScFieldIdentifier()
True = data layout field collecting all data fields as items.
Definition: dapiuno.hxx:285
bool mbDataLayout
Field index (if several fields with same name exist).
Definition: dapiuno.hxx:283
OUString maFieldName
Definition: dapiuno.hxx:281
ScFieldIdentifier(OUString aFieldName, bool bDataLayout)
Definition: dapiuno.hxx:288
sal_Int32 mnFieldIdx
Source field name.
Definition: dapiuno.hxx:282
OUString Name
unsigned char sal_Bool
signed char sal_Int8
sal_Int16 SCTAB
Definition: types.hxx:22