12#include <com/sun/star/chart2/data/XDataProvider.hpp>
13#include <com/sun/star/chart2/data/XPivotTableDataProvider.hpp>
14#include <com/sun/star/chart2/data/PivotTableFieldEntry.hpp>
15#include <com/sun/star/lang/XServiceInfo.hpp>
16#include <com/sun/star/beans/XPropertySet.hpp>
17#include <com/sun/star/util/XModifyBroadcaster.hpp>
21#include <rtl/ustring.hxx>
25#include <unordered_map>
39typedef cppu::WeakImplHelper<css::chart2::data::XDataProvider,
40 css::chart2::data::XPivotTableDataProvider,
41 css::beans::XPropertySet,
42 css::lang::XServiceInfo,
43 css::util::XModifyBroadcaster>
58 virtual css::uno::Reference<css::chart2::data::XDataSource> SAL_CALL
61 virtual css::uno::Sequence<css::beans::PropertyValue> SAL_CALL
62 detectArguments(
const css::uno::Reference<css::chart2::data::XDataSource>& xDataSource)
override;
67 virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
70 virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
72 const OUString& aRoleQualifier)
override;
74 virtual css::uno::Reference<css::sheet::XRangeSelection> SAL_CALL
getRangeSelection()
override;
77 virtual css::uno::Sequence<css::chart2::data::PivotTableFieldEntry> SAL_CALL
79 virtual css::uno::Sequence<css::chart2::data::PivotTableFieldEntry> SAL_CALL
81 virtual css::uno::Sequence<css::chart2::data::PivotTableFieldEntry> SAL_CALL
83 virtual css::uno::Sequence<css::chart2::data::PivotTableFieldEntry> SAL_CALL
88 virtual void SAL_CALL
setPivotTableName(
const OUString& sPivotTableName)
override;
92 virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
94 virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
96 virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
102 virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL
getPropertySetInfo()
override;
104 virtual void SAL_CALL
105 setPropertyValue(
const OUString& rPropertyName,
const css::uno::Any& rValue)
override;
107 virtual css::uno::Any SAL_CALL
111 const OUString& rPropertyName,
112 const css::uno::Reference<css::beans::XPropertyChangeListener>& xListener)
override;
115 const OUString& rPropertyName,
116 const css::uno::Reference<css::beans::XPropertyChangeListener>& rListener)
override;
119 const OUString& rPropertyName,
120 const css::uno::Reference<css::beans::XVetoableChangeListener>& rListener)
override;
123 const OUString& rPropertyName,
124 const css::uno::Reference<css::beans::XVetoableChangeListener>& rListener)
override;
127 virtual void SAL_CALL
128 addModifyListener(
const css::uno::Reference<css::util::XModifyListener>& aListener)
override;
130 virtual void SAL_CALL
131 removeModifyListener(
const css::uno::Reference<css::util::XModifyListener>& aListener)
override;
142 css::uno::Reference<css::chart2::data::XDataSource>
145 css::uno::Reference<css::chart2::data::XDataSource>
SfxItemPropertySet m_aPropSet
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual css::uno::Reference< css::sheet::XRangeSelection > SAL_CALL getRangeSelection() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rListener) override
css::uno::Reference< css::chart2::data::XDataSequence > assignValuesToDataSequence(size_t nIndex)
virtual css::uno::Sequence< css::chart2::data::PivotTableFieldEntry > SAL_CALL getRowFields() override
virtual sal_Bool SAL_CALL hasPivotTable() override
css::uno::Reference< css::chart2::data::XLabeledDataSequence > newLabeledDataSequence()
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL createDataSequenceOfCategories() override
virtual css::uno::Sequence< css::chart2::data::PivotTableFieldEntry > SAL_CALL getDataFields() override
std::vector< css::chart2::data::PivotTableFieldEntry > m_aDataFields
std::unordered_map< sal_Int32, OUString > m_aFieldOutputDescriptionMap
bool m_bIncludeHiddenCells
virtual void SAL_CALL setPivotTableName(const OUString &sPivotTableName) override
virtual css::uno::Reference< css::chart2::data::XDataSource > SAL_CALL createDataSource(const css::uno::Sequence< css::beans::PropertyValue > &aArguments) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible(const OUString &aRangeRepresentation) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override
virtual OUString SAL_CALL getFieldOutputDescription(sal_Int32 nPageFieldIndex) override
std::vector< std::vector< ValueAndFormat > > m_aDataRowVector
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL createDataSequenceOfValuesByIndex(sal_Int32 nIndex) override
std::vector< std::vector< ValueAndFormat > > m_aLabels
virtual sal_Bool SAL_CALL createDataSourcePossible(const css::uno::Sequence< css::beans::PropertyValue > &aArguments) override
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL createDataSequenceOfLabelsByIndex(sal_Int32 nIndex) override
std::vector< css::chart2::data::PivotTableFieldEntry > m_aColumnFields
virtual ~PivotTableDataProvider() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation(const OUString &aRangeRepresentation) override
OUString m_sPivotTableName
css::uno::Reference< css::chart2::data::XDataSource > createValuesDataSource()
PivotTableDataProvider(ScDocument &rDoc)
virtual css::uno::Sequence< css::chart2::data::PivotTableFieldEntry > SAL_CALL getColumnFields() override
virtual OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::chart2::data::XDataSequence > assignLabelsToDataSequence(size_t nIndex)
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
std::vector< css::chart2::data::PivotTableFieldEntry > m_aRowFields
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override
void collectPivotTableData()
std::vector< css::uno::Reference< css::util::XModifyListener > > m_aValueListeners
std::vector< std::vector< ValueAndFormat > > m_aCategoriesRowOrientation
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Sequence< css::chart2::data::PivotTableFieldEntry > SAL_CALL getPageFields() override
std::vector< std::vector< ValueAndFormat > > m_aCategoriesColumnOrientation
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
css::uno::Reference< css::chart2::data::XDataSource > createCategoriesDataSource(bool bOrientationIsColumn)
virtual OUString SAL_CALL getPivotTableName() override
css::uno::Reference< css::chart2::data::XDataSequence > assignFirstCategoriesToDataSequence()
std::vector< css::chart2::data::PivotTableFieldEntry > m_aPageFields
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL createDataSequenceByValueArray(const OUString &aRole, const OUString &aRangeRepresentation, const OUString &aRoleQualifier) override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL detectArguments(const css::uno::Reference< css::chart2::data::XDataSource > &xDataSource) override
Sequence< PropertyValue > aArguments
CAUTION! The following defines must be in the same namespace as the respective type.
cppu::WeakImplHelper< css::chart2::data::XDataProvider, css::chart2::data::XPivotTableDataProvider, css::beans::XPropertySet, css::lang::XServiceInfo, css::util::XModifyBroadcaster > PivotTableDataProvider_Base