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

#include <chartlis.hxx>

Collaboration diagram for ScChartListenerCollection:
[legend]

Public Types

typedef std::map< OUString, std::unique_ptr< ScChartListener > > ListenersType
 
typedef std::unordered_set< OUString > StringSetType
 

Public Member Functions

 ScChartListenerCollection (ScDocument &rDoc)
 
 ScChartListenerCollection (const ScChartListenerCollection &)
 
 ~ScChartListenerCollection ()
 
void StartAllListeners ()
 
bool insert (ScChartListener *pListener)
 
ScChartListenerfindByName (const OUString &rName)
 
const ScChartListenerfindByName (const OUString &rName) const
 
bool hasListeners () const
 
void removeByName (const OUString &rName)
 
const ListenersTypegetListeners () const
 
ListenersTypegetListeners ()
 
StringSetTypegetNonOleObjectNames ()
 
OUString getUniqueName (const OUString &rPrefix) const
 Create a unique name that's not taken by any existing chart listener objects. More...
 
void ChangeListening (const OUString &rName, const ScRangeListRef &rRangeListRef)
 
void FreeUnused ()
 
void FreeUno (const css::uno::Reference< css::chart::XChartDataChangeEventListener > &rListener, const css::uno::Reference< css::chart::XChartData > &rSource)
 
void StartTimer ()
 
void UpdateDirtyCharts ()
 
void SetDirty ()
 
void SetDiffDirty (const ScChartListenerCollection &, bool bSetChartRangeLists)
 
void SetRangeDirty (const ScRange &rRange)
 
void UpdateChartsContainingTab (SCTAB nTab)
 
bool operator== (const ScChartListenerCollection &r) const
 
void StartListeningHiddenRange (const ScRange &rRange, ScChartHiddenRangeListener *pListener)
 Start listening on hide/show change within specified cell range. More...
 
void EndListeningHiddenRange (ScChartHiddenRangeListener *pListener)
 Remove all ranges associated with passed listener instance from the list of hidden range listeners. More...
 

Private Types

enum  UpdateStatus {
  SC_CLCUPDATE_NONE,
  SC_CLCUPDATE_RUNNING,
  SC_CLCUPDATE_MODIFIED
}
 

Private Member Functions

 DECL_LINK (TimerHdl, Timer *, void)
 
ScChartListenerCollectionoperator= (const ScChartListenerCollection &)=delete
 
void Init ()
 

Private Attributes

ListenersType m_Listeners
 
enum ScChartListenerCollection::UpdateStatus meModifiedDuringUpdate
 
std::unordered_multimap< ScChartHiddenRangeListener *, ScRangemaHiddenListeners
 
StringSetType maNonOleObjectNames
 
Idle aIdle
 
ScDocumentrDoc
 

Detailed Description

Definition at line 122 of file chartlis.hxx.

Member Typedef Documentation

Definition at line 125 of file chartlis.hxx.

typedef std::unordered_set<OUString> ScChartListenerCollection::StringSetType

Definition at line 126 of file chartlis.hxx.

Member Enumeration Documentation

Enumerator
SC_CLCUPDATE_NONE 
SC_CLCUPDATE_RUNNING 
SC_CLCUPDATE_MODIFIED 

Definition at line 129 of file chartlis.hxx.

Constructor & Destructor Documentation

ScChartListenerCollection::ScChartListenerCollection ( ScDocument rDoc)

Definition at line 355 of file chartlis.cxx.

References Init().

ScChartListenerCollection::ScChartListenerCollection ( const ScChartListenerCollection rColl)

Definition at line 362 of file chartlis.cxx.

References Init().

ScChartListenerCollection::~ScChartListenerCollection ( )

Definition at line 370 of file chartlis.cxx.

References m_Listeners.

Member Function Documentation

void ScChartListenerCollection::ChangeListening ( const OUString &  rName,
const ScRangeListRef rRangeListRef 
)
ScChartListenerCollection::DECL_LINK ( TimerHdl  ,
Timer ,
void   
)
private
void ScChartListenerCollection::EndListeningHiddenRange ( ScChartHiddenRangeListener pListener)

Remove all ranges associated with passed listener instance from the list of hidden range listeners.

This does not delete the passed listener instance.

Definition at line 623 of file chartlis.cxx.

References maHiddenListeners.

Referenced by ScChart2DataSequence::RefChanged(), ScChart2DataSequence::removeModifyListener(), and ScChart2DataSequence::~ScChart2DataSequence().

ScChartListener * ScChartListenerCollection::findByName ( const OUString &  rName)
const ScChartListener * ScChartListenerCollection::findByName ( const OUString &  rName) const

Definition at line 408 of file chartlis.cxx.

References m_Listeners.

void ScChartListenerCollection::FreeUno ( const css::uno::Reference< css::chart::XChartDataChangeEventListener > &  rListener,
const css::uno::Reference< css::chart::XChartData > &  rSource 
)
void ScChartListenerCollection::FreeUnused ( )
const ListenersType& ScChartListenerCollection::getListeners ( ) const
inline

Definition at line 164 of file chartlis.hxx.

Referenced by ScCellRangesBase::ForceChartListener_Impl().

ListenersType& ScChartListenerCollection::getListeners ( )
inline

Definition at line 165 of file chartlis.hxx.

StringSetType& ScChartListenerCollection::getNonOleObjectNames ( )
inline

Definition at line 166 of file chartlis.hxx.

OUString ScChartListenerCollection::getUniqueName ( const OUString &  rPrefix) const

Create a unique name that's not taken by any existing chart listener objects.

The name consists of a prefix given followed by a number.

Definition at line 419 of file chartlis.cxx.

References m_Listeners.

Referenced by ScCellRangesBase::addChartDataChangeEventListener(), and ScMyOLEFixer::CreateChartListener().

bool ScChartListenerCollection::hasListeners ( ) const

Definition at line 414 of file chartlis.cxx.

References m_Listeners.

Referenced by ScDocShell::DoRecalc().

void ScChartListenerCollection::Init ( void  )
private
bool ScChartListenerCollection::insert ( ScChartListener pListener)
ScChartListenerCollection& ScChartListenerCollection::operator= ( const ScChartListenerCollection )
privatedelete
bool ScChartListenerCollection::operator== ( const ScChartListenerCollection r) const

Definition at line 605 of file chartlis.cxx.

References m_Listeners, and rDoc.

void ScChartListenerCollection::removeByName ( const OUString &  rName)
void ScChartListenerCollection::SetDiffDirty ( const ScChartListenerCollection rCmp,
bool  bSetChartRangeLists 
)
void ScChartListenerCollection::SetDirty ( )

Definition at line 527 of file chartlis.cxx.

References m_Listeners, and StartTimer().

void ScChartListenerCollection::SetRangeDirty ( const ScRange rRange)
void ScChartListenerCollection::StartAllListeners ( )

Definition at line 379 of file chartlis.cxx.

References m_Listeners.

void ScChartListenerCollection::StartListeningHiddenRange ( const ScRange rRange,
ScChartHiddenRangeListener pListener 
)

Start listening on hide/show change within specified cell range.

A single listener may listen on multiple ranges when the caller passes the same pointer multiple times with different ranges.

Note that the caller is responsible for managing the life-cycle of the listener instance.

Definition at line 618 of file chartlis.cxx.

References maHiddenListeners.

Referenced by ScChart2DataSequence::addModifyListener(), and ScChart2DataSequence::RefChanged().

void ScChartListenerCollection::StartTimer ( )
void ScChartListenerCollection::UpdateChartsContainingTab ( SCTAB  nTab)

Definition at line 596 of file chartlis.cxx.

References m_Listeners, ScDocument::MaxCol(), ScDocument::MaxRow(), and rDoc.

void ScChartListenerCollection::UpdateDirtyCharts ( )

Member Data Documentation

Idle ScChartListenerCollection::aIdle
private

Definition at line 140 of file chartlis.hxx.

Referenced by Init(), StartTimer(), and UpdateDirtyCharts().

ListenersType ScChartListenerCollection::m_Listeners
private
std::unordered_multimap<ScChartHiddenRangeListener*, ScRange> ScChartListenerCollection::maHiddenListeners
private

Definition at line 136 of file chartlis.hxx.

Referenced by EndListeningHiddenRange(), SetRangeDirty(), and StartListeningHiddenRange().

StringSetType ScChartListenerCollection::maNonOleObjectNames
private

Definition at line 138 of file chartlis.hxx.

enum ScChartListenerCollection::UpdateStatus ScChartListenerCollection::meModifiedDuringUpdate
private
ScDocument& ScChartListenerCollection::rDoc
private

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