LibreOffice Module sc (master) 1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScChart2DataSequence Class Referencefinal

#include <chart2uno.hxx>

Inheritance diagram for ScChart2DataSequence:
[legend]
Collaboration diagram for ScChart2DataSequence:
[legend]

Classes

class  ExternalRefListener
 
class  HiddenRangeListener
 
struct  Item
 

Public Member Functions

 ScChart2DataSequence (ScDocument *pDoc, ::std::vector< ScTokenRef > &&rTokens, bool bIncludeHiddenCells)
 
virtual ~ScChart2DataSequence () override
 
 ScChart2DataSequence (ScDocument *pDoc, const ScChart2DataSequence &)
 called from Clone() More...
 
 ScChart2DataSequence (const ScChart2DataSequence &)=delete
 
ScChart2DataSequenceoperator= (const ScChart2DataSequence &)=delete
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getData () override
 
virtual OUString SAL_CALL getSourceRangeRepresentation () override
 
virtual css::uno::Sequence< OUString > SAL_CALL generateLabel (css::chart2::data::LabelOrigin nOrigin) 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 format key for the first non-empty entry. More...
 
virtual css::uno::Sequence< double > SAL_CALL getNumericalData () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getTextualData () override
 
virtual sal_Bool SAL_CALL switchToNext (sal_Bool bWrap) override
 
virtual sal_Bool SAL_CALL setToPointInTime (sal_Int32 nPoint) override
 
virtual void SAL_CALL setRange (sal_Int32 nStart, sal_Int32 nEnd) override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &rPropertyName, const css::uno::Any &rValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &rPropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener) override
 
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone () override
 
virtual void SAL_CALL addModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override
 
virtual void SAL_CALL removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
virtual bool IsSdrView () const
 

Private Member Functions

void setDataChangedHint (bool b)
 
void RefChanged ()
 
 DECL_LINK (ValueListenerHdl, const SfxHint &, void)
 
void BuildDataCache ()
 Build an internal data array to cache the data ranges, and other information such as hidden values. More...
 
void RebuildDataCache ()
 
sal_Int32 FillCacheFromExternalRef (const ScTokenRef &pToken)
 
void UpdateTokensFromRanges (const ScRangeList &rRanges)
 
ExternalRefListenerGetExtRefListener ()
 
void StopListeningToAllExternalRefs ()
 

Private Attributes

std::shared_ptr< std::vector< Item > > m_xDataArray
 This vector contains the cached data which was calculated with BuildDataCache(). More...
 
css::uno::Sequence< css::uno::Any > m_aMixedDataCache
 Cached data for getData. More...
 
css::uno::Sequence< sal_Int32 > m_aHiddenValues
 
css::chart2::data::DataSequenceRole m_aRole
 
bool m_bIncludeHiddenCells
 
sal_Int64 m_nObjectId
 
ScDocumentm_pDocument
 
std::vector< ScTokenRefm_aTokens
 
std::optional< std::vector< sal_uInt32 > > m_oRangeIndices
 
std::unique_ptr< ExternalRefListenerm_pExtRefListener
 
SfxItemPropertySet m_aPropSet
 
std::unique_ptr< HiddenRangeListenerm_pHiddenListener
 
std::unique_ptr< ScLinkListenerm_pValueListener
 
XModifyListenerArr_Impl m_aValueListeners
 
bool m_bGotDataChangedHint
 
bool m_bExtDataRebuildQueued
 
bool mbTimeBased
 
SCTAB mnTimeBasedStart
 
SCTAB mnTimeBasedEnd
 
SCTAB mnCurrentTab
 

Detailed Description

Definition at line 191 of file chart2uno.hxx.

Constructor & Destructor Documentation

◆ ScChart2DataSequence() [1/3]

ScChart2DataSequence::ScChart2DataSequence ( ScDocument pDoc,
::std::vector< ScTokenRef > &&  rTokens,
bool  bIncludeHiddenCells 
)
explicit

Referenced by createClone().

◆ ~ScChart2DataSequence()

ScChart2DataSequence::~ScChart2DataSequence ( )
overridevirtual

◆ ScChart2DataSequence() [2/3]

ScChart2DataSequence::ScChart2DataSequence ( ScDocument pDoc,
const ScChart2DataSequence r 
)

◆ ScChart2DataSequence() [3/3]

ScChart2DataSequence::ScChart2DataSequence ( const ScChart2DataSequence )
delete

Member Function Documentation

◆ addModifyListener()

void SAL_CALL ScChart2DataSequence::addModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  aListener)
overridevirtual

◆ addPropertyChangeListener()

void SAL_CALL ScChart2DataSequence::addPropertyChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 3414 of file chart2uno.cxx.

◆ addVetoableChangeListener()

void SAL_CALL ScChart2DataSequence::addVetoableChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  rListener 
)
overridevirtual

Definition at line 3430 of file chart2uno.cxx.

◆ BuildDataCache()

void ScChart2DataSequence::BuildDataCache ( )
private

◆ createClone()

uno::Reference< util::XCloneable > SAL_CALL ScChart2DataSequence::createClone ( )
overridevirtual

Definition at line 3254 of file chart2uno.cxx.

References m_pDocument, p, and ScChart2DataSequence().

◆ DECL_LINK()

ScChart2DataSequence::DECL_LINK ( ValueListenerHdl  ,
const SfxHint ,
void   
)
private

◆ FillCacheFromExternalRef()

sal_Int32 ScChart2DataSequence::FillCacheFromExternalRef ( const ScTokenRef pToken)
private

◆ generateLabel()

uno::Sequence< OUString > SAL_CALL ScChart2DataSequence::generateLabel ( css::chart2::data::LabelOrigin  nOrigin)
overridevirtual

Definition at line 3173 of file chart2uno.cxx.

References aSeq, m_aTokens, m_pDocument, and nCount.

◆ getData()

uno::Sequence< uno::Any > SAL_CALL ScChart2DataSequence::getData ( )
overridevirtual

◆ GetExtRefListener()

ScChart2DataSequence::ExternalRefListener * ScChart2DataSequence::GetExtRefListener ( )
private

Definition at line 2783 of file chart2uno.cxx.

References m_pDocument, and m_pExtRefListener.

Referenced by FillCacheFromExternalRef().

◆ getImplementationName()

virtual OUString SAL_CALL ScChart2DataSequence::getImplementationName ( )
overridevirtual

◆ getNumberFormatKeyByIndex()

sal_Int32 SAL_CALL ScChart2DataSequence::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 format key for the first non-empty entry.

Definition at line 3221 of file chart2uno.cxx.

References BuildDataCache(), ScRefCellValue::hasNumeric(), ScRefCellValue::isEmpty(), m_pDocument, m_xDataArray, o3tl::make_unsigned(), nIndex, and SAL_WARN.

◆ getNumericalData()

uno::Sequence< double > SAL_CALL ScChart2DataSequence::getNumericalData ( )
overridevirtual

Definition at line 3013 of file chart2uno.cxx.

References aSeq, BuildDataCache(), m_pDocument, m_xDataArray, and nCount.

◆ getPropertySetInfo()

uno::Reference< beans::XPropertySetInfo > SAL_CALL ScChart2DataSequence::getPropertySetInfo ( )
overridevirtual

Definition at line 3343 of file chart2uno.cxx.

References SfxItemPropertySet::getPropertyMap(), and m_aPropSet.

◆ getPropertyValue()

uno::Any SAL_CALL ScChart2DataSequence::getPropertyValue ( const OUString &  rPropertyName)
overridevirtual

◆ getSourceRangeRepresentation()

OUString SAL_CALL ScChart2DataSequence::getSourceRangeRepresentation ( )
overridevirtual

Definition at line 3066 of file chart2uno.cxx.

References aStr, m_aTokens, and m_pDocument.

◆ getSupportedServiceNames()

virtual css::uno::Sequence< OUString > SAL_CALL ScChart2DataSequence::getSupportedServiceNames ( )
overridevirtual

◆ getTextualData()

uno::Sequence< OUString > SAL_CALL ScChart2DataSequence::getTextualData ( )
overridevirtual

Definition at line 3035 of file chart2uno.cxx.

References aSeq, BuildDataCache(), m_aTokens, m_pDocument, m_xDataArray, nCount, and svString.

◆ Notify()

void ScChart2DataSequence::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overridevirtual

◆ operator=()

ScChart2DataSequence & ScChart2DataSequence::operator= ( const ScChart2DataSequence )
delete

◆ RebuildDataCache()

void ScChart2DataSequence::RebuildDataCache ( )
private

◆ RefChanged()

void ScChart2DataSequence::RefChanged ( )
private

◆ removeModifyListener()

void SAL_CALL ScChart2DataSequence::removeModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  aListener)
overridevirtual

◆ removePropertyChangeListener()

void SAL_CALL ScChart2DataSequence::removePropertyChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  rListener 
)
overridevirtual

Definition at line 3422 of file chart2uno.cxx.

◆ removeVetoableChangeListener()

void SAL_CALL ScChart2DataSequence::removeVetoableChangeListener ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  rListener 
)
overridevirtual

Definition at line 3438 of file chart2uno.cxx.

◆ setDataChangedHint()

void ScChart2DataSequence::setDataChangedHint ( bool  b)
private

Definition at line 3446 of file chart2uno.cxx.

References m_bGotDataChangedHint.

◆ setPropertyValue()

void SAL_CALL ScChart2DataSequence::setPropertyValue ( const OUString &  rPropertyName,
const css::uno::Any &  rValue 
)
overridevirtual

◆ setRange()

void ScChart2DataSequence::setRange ( sal_Int32  nStart,
sal_Int32  nEnd 
)
overridevirtual

Definition at line 3483 of file chart2uno.cxx.

References mnCurrentTab, mnTimeBasedEnd, and mnTimeBasedStart.

◆ setToPointInTime()

sal_Bool ScChart2DataSequence::setToPointInTime ( sal_Int32  nPoint)
overridevirtual

◆ StopListeningToAllExternalRefs()

void ScChart2DataSequence::StopListeningToAllExternalRefs ( )
private

◆ supportsService()

virtual sal_Bool SAL_CALL ScChart2DataSequence::supportsService ( const OUString &  rServiceName)
overridevirtual

◆ switchToNext()

sal_Bool ScChart2DataSequence::switchToNext ( sal_Bool  bWrap)
overridevirtual

◆ UpdateTokensFromRanges()

void ScChart2DataSequence::UpdateTokensFromRanges ( const ScRangeList rRanges)
private

Member Data Documentation

◆ m_aHiddenValues

css::uno::Sequence<sal_Int32> ScChart2DataSequence::m_aHiddenValues
private

Definition at line 364 of file chart2uno.hxx.

Referenced by BuildDataCache(), and getPropertyValue().

◆ m_aMixedDataCache

css::uno::Sequence< css::uno::Any > ScChart2DataSequence::m_aMixedDataCache
private

Cached data for getData.

We may also need to cache data for the numerical and textural data series if they turn out to be bottlenecks under certain scenarios.

Definition at line 362 of file chart2uno.hxx.

Referenced by BuildDataCache(), and getData().

◆ m_aPropSet

SfxItemPropertySet ScChart2DataSequence::m_aPropSet
private

Definition at line 378 of file chart2uno.hxx.

Referenced by getPropertySetInfo().

◆ m_aRole

css::chart2::data::DataSequenceRole ScChart2DataSequence::m_aRole
private

Definition at line 367 of file chart2uno.hxx.

Referenced by getPropertyValue(), and setPropertyValue().

◆ m_aTokens

std::vector<ScTokenRef> ScChart2DataSequence::m_aTokens
private

◆ m_aValueListeners

XModifyListenerArr_Impl ScChart2DataSequence::m_aValueListeners
private

◆ m_bExtDataRebuildQueued

bool ScChart2DataSequence::m_bExtDataRebuildQueued
private

Definition at line 386 of file chart2uno.hxx.

Referenced by BuildDataCache(), and RebuildDataCache().

◆ m_bGotDataChangedHint

bool ScChart2DataSequence::m_bGotDataChangedHint
private

◆ m_bIncludeHiddenCells

bool ScChart2DataSequence::m_bIncludeHiddenCells
private

Definition at line 368 of file chart2uno.hxx.

Referenced by BuildDataCache(), getPropertyValue(), and setPropertyValue().

◆ m_nObjectId

sal_Int64 ScChart2DataSequence::m_nObjectId
private

Definition at line 371 of file chart2uno.hxx.

Referenced by Notify(), and ScChart2DataSequence().

◆ m_oRangeIndices

std::optional<std::vector<sal_uInt32> > ScChart2DataSequence::m_oRangeIndices
private

Definition at line 375 of file chart2uno.hxx.

Referenced by Notify(), ScChart2DataSequence(), and UpdateTokensFromRanges().

◆ m_pDocument

ScDocument* ScChart2DataSequence::m_pDocument
private

◆ m_pExtRefListener

std::unique_ptr<ExternalRefListener> ScChart2DataSequence::m_pExtRefListener
private

◆ m_pHiddenListener

std::unique_ptr<HiddenRangeListener> ScChart2DataSequence::m_pHiddenListener
private

◆ m_pValueListener

std::unique_ptr<ScLinkListener> ScChart2DataSequence::m_pValueListener
private

◆ m_xDataArray

std::shared_ptr<std::vector<Item> > ScChart2DataSequence::m_xDataArray
private

This vector contains the cached data which was calculated with BuildDataCache().

We use a shared_ptr because chart likes to Clone this class, which is very expensive when we have lots of data.

Definition at line 355 of file chart2uno.hxx.

Referenced by BuildDataCache(), FillCacheFromExternalRef(), getData(), getNumberFormatKeyByIndex(), getNumericalData(), getTextualData(), Notify(), RebuildDataCache(), and setPropertyValue().

◆ mbTimeBased

bool ScChart2DataSequence::mbTimeBased
private

Definition at line 388 of file chart2uno.hxx.

Referenced by getPropertyValue(), setPropertyValue(), and switchToNext().

◆ mnCurrentTab

SCTAB ScChart2DataSequence::mnCurrentTab
private

Definition at line 391 of file chart2uno.hxx.

Referenced by setRange(), setToPointInTime(), and switchToNext().

◆ mnTimeBasedEnd

SCTAB ScChart2DataSequence::mnTimeBasedEnd
private

Definition at line 390 of file chart2uno.hxx.

Referenced by setRange(), setToPointInTime(), and switchToNext().

◆ mnTimeBasedStart

SCTAB ScChart2DataSequence::mnTimeBasedStart
private

Definition at line 389 of file chart2uno.hxx.

Referenced by setRange(), and setToPointInTime().


The documentation for this class was generated from the following files: