29#include <com/sun/star/chart2/data/XDataProvider.hpp>
30#include <com/sun/star/chart2/data/XSheetDataProvider.hpp>
31#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
32#include <com/sun/star/chart2/data/XDataSource.hpp>
33#include <com/sun/star/chart2/data/XDataSequence.hpp>
34#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
35#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
36#include <com/sun/star/chart2/data/DataSequenceRole.hpp>
37#include <com/sun/star/chart2/XTimeBased.hpp>
38#include <com/sun/star/lang/XServiceInfo.hpp>
39#include <com/sun/star/beans/XPropertySet.hpp>
40#include <com/sun/star/util/XCloneable.hpp>
41#include <com/sun/star/util/XModifyBroadcaster.hpp>
43#include <rtl/ustring.hxx>
48#include <unordered_set>
57 ::cppu::WeakImplHelper<
58 css::chart2::data::XDataProvider,
59 css::chart2::data::XSheetDataProvider,
60 css::chart2::data::XRangeXMLConversion,
61 css::beans::XPropertySet,
62 css::lang::XServiceInfo>,
72 virtual sal_Bool SAL_CALL createDataSourcePossible(
73 const css::uno::Sequence< css::beans::PropertyValue >&
aArguments )
override;
75 virtual css::uno::Reference<
76 css::chart2::data::XDataSource > SAL_CALL createDataSource(
77 const css::uno::Sequence< css::beans::PropertyValue >&
aArguments )
override;
79 virtual css::uno::Sequence<
80 css::beans::PropertyValue > SAL_CALL detectArguments(
81 const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource )
override;
83 virtual sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible(
84 const OUString& aRangeRepresentation )
override;
86 virtual css::uno::Reference<
87 css::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation(
88 const OUString& aRangeRepresentation )
override;
90 virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
91 createDataSequenceByValueArray(
const OUString& aRole,
const OUString& aRangeRepresentation,
92 const OUString& aRoleQualifier )
override;
94 virtual css::uno::Reference< css::sheet::XRangeSelection > SAL_CALL getRangeSelection()
override;
97 virtual sal_Bool SAL_CALL createDataSequenceByFormulaTokensPossible(
98 const css::uno::Sequence< css::sheet::FormulaToken >& aTokens )
override;
100 virtual css::uno::Reference< css::chart2::data::XDataSequence >
101 SAL_CALL createDataSequenceByFormulaTokens(
102 const css::uno::Sequence< css::sheet::FormulaToken >& aTokens )
override;
105 virtual OUString SAL_CALL convertRangeToXML(
const OUString& sRangeRepresentation )
override;
107 virtual OUString SAL_CALL convertRangeFromXML(
const OUString& sXMLRange )
override;
110 virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL
111 getPropertySetInfo()
override;
114 const OUString& rPropertyName,
115 const css::uno::Any& rValue)
override;
118 const OUString& rPropertyName)
override;
120 virtual void SAL_CALL addPropertyChangeListener(
121 const OUString& rPropertyName,
122 const css::uno::Reference< css::beans::XPropertyChangeListener>& xListener)
override;
124 virtual void SAL_CALL removePropertyChangeListener(
125 const OUString& rPropertyName,
126 const css::uno::Reference< css::beans::XPropertyChangeListener>& rListener)
override;
128 virtual void SAL_CALL addVetoableChangeListener(
129 const OUString& rPropertyName,
130 const css::uno::Reference< css::beans::XVetoableChangeListener>& rListener)
override;
132 virtual void SAL_CALL removeVetoableChangeListener(
133 const OUString& rPropertyName,
134 const css::uno::Reference< css::beans::XVetoableChangeListener>& rListener)
override;
140 rServiceName)
override;
142 virtual css::uno::Sequence< OUString> SAL_CALL
154 ::cppu::WeakImplHelper<
155 css::chart2::data::XDataSource,
156 css::lang::XServiceInfo>,
166 virtual css::uno::Sequence< css::uno::Reference<
167 css::chart2::data::XLabeledDataSequence > > SAL_CALL
174 rServiceName)
override;
176 virtual css::uno::Sequence< OUString> SAL_CALL
181 void AddLabeledSequence(
const css::uno::Reference < css::chart2::data::XLabeledDataSequence >& xNew);
192 ::cppu::WeakImplHelper<
193 css::chart2::data::XDataSequence,
194 css::chart2::data::XTextualDataSequence,
195 css::chart2::data::XNumericalDataSequence,
196 css::chart2::XTimeBased,
197 css::util::XCloneable,
198 css::util::XModifyBroadcaster,
199 css::beans::XPropertySet,
200 css::lang::XServiceInfo>,
205 ::std::vector<ScTokenRef>&& rTokens,
bool bIncludeHiddenCells );
215 virtual css::uno::Sequence< css::uno::Any >
218 virtual css::uno::Sequence< OUString >
219 SAL_CALL
generateLabel(css::chart2::data::LabelOrigin nOrigin)
override;
227 virtual css::uno::Sequence< double >
231 virtual css::uno::Sequence< OUString >
238 virtual void SAL_CALL
setRange(sal_Int32 nStart, sal_Int32 nEnd)
override;
241 virtual css::uno::Reference<
242 css::beans::XPropertySetInfo> SAL_CALL
246 const OUString& rPropertyName,
247 const css::uno::Any& rValue)
override;
250 const OUString& rPropertyName)
override;
253 const OUString& rPropertyName,
254 const css::uno::Reference< css::beans::XPropertyChangeListener>& xListener)
override;
257 const OUString& rPropertyName,
258 const css::uno::Reference< css::beans::XPropertyChangeListener>& rListener)
override;
261 const OUString& rPropertyName,
262 const css::uno::Reference< css::beans::XVetoableChangeListener>& rListener)
override;
265 const OUString& rPropertyName,
266 const css::uno::Reference< css::beans::XVetoableChangeListener>& rListener)
override;
269 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL
createClone()
override;
273 const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
275 const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
281 rServiceName)
override;
283 virtual css::uno::Sequence< OUString> SAL_CALL
346 virtual void notify()
override;
374 std::optional<std::vector<sal_uInt32>>
376 std::unique_ptr<ExternalRefListener>
std::vector< css::uno::Reference< css::util::XModifyListener > > XModifyListenerArr_Impl
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
SfxItemPropertySet m_aPropSet
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
bool m_bIncludeHiddenCells
ExternalRefListener & operator=(const ExternalRefListener &)=delete
ExternalRefListener(const ExternalRefListener &)=delete
const std::unordered_set< sal_uInt16 > & getAllFileIds() const
ExternalRefListener(ScChart2DataSequence &rParent, ScDocument *pDoc)
virtual void notify(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType) override
virtual ~ExternalRefListener() override
std::unordered_set< sal_uInt16 > maFileIds
void addFileId(sal_uInt16 nFileId)
ScChart2DataSequence & mrParent
HiddenRangeListener(ScChart2DataSequence &rParent)
virtual ~HiddenRangeListener() override
virtual void notify() override
ScChart2DataSequence & mrParent
css::chart2::data::DataSequenceRole m_aRole
void StopListeningToAllExternalRefs()
std::unique_ptr< HiddenRangeListener > m_pHiddenListener
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
XModifyListenerArr_Impl m_aValueListeners
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual OUString SAL_CALL getSourceRangeRepresentation() override
virtual OUString SAL_CALL getImplementationName() override
std::vector< ScTokenRef > m_aTokens
ScChart2DataSequence(ScDocument *pDoc, ::std::vector< ScTokenRef > &&rTokens, bool bIncludeHiddenCells)
virtual css::uno::Sequence< OUString > SAL_CALL generateLabel(css::chart2::data::LabelOrigin nOrigin) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
void setDataChangedHint(bool b)
ExternalRefListener * GetExtRefListener()
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
std::unique_ptr< ExternalRefListener > m_pExtRefListener
css::uno::Sequence< css::uno::Any > m_aMixedDataCache
Cached data for getData.
std::shared_ptr< std::vector< Item > > m_xDataArray
This vector contains the cached data which was calculated with BuildDataCache().
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rListener) override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual sal_Bool SAL_CALL switchToNext(sal_Bool bWrap) override
virtual css::uno::Sequence< OUString > SAL_CALL getTextualData() override
ScChart2DataSequence(const ScChart2DataSequence &)=delete
void UpdateTokensFromRanges(const ScRangeList &rRanges)
std::optional< std::vector< sal_uInt32 > > m_oRangeIndices
bool m_bExtDataRebuildQueued
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getData() override
virtual void SAL_CALL setRange(sal_Int32 nStart, sal_Int32 nEnd) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override
virtual sal_Bool SAL_CALL setToPointInTime(sal_Int32 nPoint) override
std::unique_ptr< ScLinkListener > m_pValueListener
SfxItemPropertySet m_aPropSet
DECL_LINK(ValueListenerHdl, const SfxHint &, void)
bool m_bGotDataChangedHint
ScChart2DataSequence & operator=(const ScChart2DataSequence &)=delete
sal_Int32 FillCacheFromExternalRef(const ScTokenRef &pToken)
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
bool m_bIncludeHiddenCells
void BuildDataCache()
Build an internal data array to cache the data ranges, and other information such as hidden values.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex(::sal_Int32 nIndex) override
Get the number format key for the n-th data entry If nIndex == -1, then you will get the number forma...
css::uno::Sequence< sal_Int32 > m_aHiddenValues
virtual ~ScChart2DataSequence() override
virtual css::uno::Sequence< double > SAL_CALL getNumericalData() override
std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > m_aLabeledSequences
ScChart2DataSource(ScDocument *pDoc)
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void AddLabeledSequence(const css::uno::Reference< css::chart2::data::XLabeledDataSequence > &xNew)
virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override
virtual ~ScChart2DataSource() override
virtual OUString SAL_CALL getImplementationName() override
Base class for objects that need to listen to link updates.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
Sequence< PropertyValue > aArguments
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)
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef