LibreOffice Module sc (master)
1
|
Collection of BroadcastAreas. More...
#include <bcaslot.hxx>
Public Member Functions | |
ScBroadcastAreaSlot (ScDocument *pDoc, ScBroadcastAreaSlotMachine *pBASM) | |
~ScBroadcastAreaSlot () | |
bool | StartListeningArea (const ScRange &rRange, bool bGroupListening, SvtListener *pListener, ScBroadcastArea *&rpArea) |
Only here new ScBroadcastArea objects are created, prevention of dupes. More... | |
void | InsertListeningArea (ScBroadcastArea *pArea) |
Insert a ScBroadcastArea obtained via StartListeningArea() to subsequent slots. More... | |
void | EndListeningArea (const ScRange &rRange, bool bGroupListening, SvtListener *pListener, ScBroadcastArea *&rpArea) |
bool | AreaBroadcast (const ScRange &rRange, SfxHintId nHint) |
bool | AreaBroadcast (const ScHint &rHint) |
void | DelBroadcastAreasInRange (const ScRange &rRange) |
void | UpdateRemove (UpdateRefMode eUpdateRefMode, const ScRange &rRange, SCCOL nDx, SCROW nDy, SCTAB nDz) |
void | UpdateRemoveArea (ScBroadcastArea *pArea) |
void | UpdateInsert (ScBroadcastArea *pArea) |
bool | IsInBroadcastIteration () const |
void | EraseArea (ScBroadcastAreas::iterator &rIter) |
Erase an area from set and delete it if last reference, or if mbInBroadcastIteration is set push it to the vector of to-be-erased areas instead. More... | |
void | GetAllListeners (const ScRange &rRange, std::vector< sc::AreaListener > &rListeners, sc::AreaOverlapType eType, sc::ListenerGroupType eGroup) |
Private Member Functions | |
ScBroadcastAreas::iterator | FindBroadcastArea (const ScRange &rRange, bool bGroupListening) |
ScDocument::HardRecalcState | CheckHardRecalcStateCondition () const |
More hypothetical (memory would probably be doomed anyway) check whether there would be an overflow when adding an area, setting the proper state if so. More... | |
void | FinallyEraseAreas () |
Finally erase all areas pushed as to-be-erased. More... | |
Static Private Member Functions | |
static bool | isMarkedErased (const ScBroadcastAreas::const_iterator &rIter) |
Private Attributes | |
ScBroadcastAreas | aBroadcastAreaTbl |
ScBroadcastArea | aTmpSeekBroadcastArea |
ScDocument * | pDoc |
ScBroadcastAreaSlotMachine * | pBASM |
bool | mbInBroadcastIteration |
bool | mbHasErasedArea |
If true, the slot has at least one area broadcaster marked for removal. More... | |
Collection of BroadcastAreas.
Definition at line 142 of file bcaslot.hxx.
ScBroadcastAreaSlot::ScBroadcastAreaSlot | ( | ScDocument * | pDoc, |
ScBroadcastAreaSlotMachine * | pBASM | ||
) |
Definition at line 68 of file bcaslot.cxx.
ScBroadcastAreaSlot::~ScBroadcastAreaSlot | ( | ) |
Definition at line 78 of file bcaslot.cxx.
References aBroadcastAreaTbl, and ScBroadcastArea::DecRef().
Definition at line 234 of file bcaslot.cxx.
References aBroadcastAreaTbl, FinallyEraseAreas(), ScBroadcastArea::GetBroadcaster(), ScBroadcastArea::GetRange(), ScBroadcastAreaSlotMachine::InsertBulkArea(), ScBroadcastAreaSlotMachine::InsertBulkGroupArea(), ScRange::Intersection(), ScBroadcastArea::IsGroupListening(), ScBroadcastAreaSlotMachine::IsInBulkBroadcast(), isMarkedErased(), ScRange::IsValid(), mbHasErasedArea, mbInBroadcastIteration, and pBASM.
Referenced by ScBroadcastAreaSlotMachine::AreaBroadcast().
bool ScBroadcastAreaSlot::AreaBroadcast | ( | const ScHint & | rHint | ) |
Definition at line 288 of file bcaslot.cxx.
References aBroadcastAreaTbl, SvtBroadcaster::Broadcast(), FinallyEraseAreas(), ScHint::GetAddress(), ScBroadcastArea::GetBroadcaster(), ScBroadcastArea::GetRange(), ScRange::In(), ScBroadcastAreaSlotMachine::InsertBulkArea(), ScBroadcastAreaSlotMachine::InsertBulkGroupArea(), ScBroadcastArea::IsGroupListening(), ScBroadcastAreaSlotMachine::IsInBulkBroadcast(), isMarkedErased(), mbHasErasedArea, mbInBroadcastIteration, and pBASM.
|
private |
More hypothetical (memory would probably be doomed anyway) check whether there would be an overflow when adding an area, setting the proper state if so.
Definition at line 94 of file bcaslot.cxx.
References aBroadcastAreaTbl, ScDocument::ETERNAL, ScDocument::GetDocumentShell(), ScDocument::GetHardRecalcState(), ScDocument::OFF, pDoc, SCWARN_CORE_HARD_RECALC, ScDocument::SetAutoCalc(), SfxObjectShell::SetError(), and ScDocument::SetHardRecalcState().
Referenced by InsertListeningArea(), and StartListeningArea().
Definition at line 340 of file bcaslot.cxx.
References aBroadcastAreaTbl, ScBroadcastArea::DecRef(), ScRange::In(), ScBroadcastAreaSlotMachine::IsInBulkBroadcast(), pBASM, and ScBroadcastAreaSlotMachine::RemoveBulkArea().
Referenced by ScBroadcastAreaSlotMachine::DelBroadcastAreasInRange().
void ScBroadcastAreaSlot::EndListeningArea | ( | const ScRange & | rRange, |
bool | bGroupListening, | ||
SvtListener * | pListener, | ||
ScBroadcastArea *& | rpArea | ||
) |
Definition at line 170 of file bcaslot.cxx.
References aBroadcastAreaTbl, SvtListener::EndListening(), EraseArea(), FindBroadcastArea(), ScBroadcastArea::GetBroadcaster(), ScBroadcastArea::GetRef(), SvtBroadcaster::HasListeners(), and isMarkedErased().
Referenced by ScBroadcastAreaSlotMachine::EndListeningArea().
void ScBroadcastAreaSlot::EraseArea | ( | ScBroadcastAreas::iterator & | rIter | ) |
Erase an area from set and delete it if last reference, or if mbInBroadcastIteration is set push it to the vector of to-be-erased areas instead.
Meant to be used internally and from ScBroadcastAreaSlotMachine only.
Definition at line 445 of file bcaslot.cxx.
References aBroadcastAreaTbl, ScBroadcastArea::DecRef(), ScBroadcastAreaSlotMachine::IsInBulkBroadcast(), mbHasErasedArea, mbInBroadcastIteration, pBASM, ScBroadcastAreaSlotMachine::PushAreaToBeErased(), and ScBroadcastAreaSlotMachine::RemoveBulkGroupArea().
Referenced by EndListeningArea(), and ScBroadcastAreaSlotMachine::FinallyEraseAreas().
|
private |
Finally erase all areas pushed as to-be-erased.
Definition at line 568 of file bcaslot.cxx.
References ScBroadcastAreaSlotMachine::FinallyEraseAreas(), and pBASM.
Referenced by AreaBroadcast().
|
private |
Definition at line 203 of file bcaslot.cxx.
References aBroadcastAreaTbl, aTmpSeekBroadcastArea, ScBroadcastArea::SetGroupListening(), and ScBroadcastArea::UpdateRange().
Referenced by EndListeningArea(), and StartListeningArea().
void ScBroadcastAreaSlot::GetAllListeners | ( | const ScRange & | rRange, |
std::vector< sc::AreaListener > & | rListeners, | ||
sc::AreaOverlapType | eType, | ||
sc::ListenerGroupType | eGroup | ||
) |
Definition at line 466 of file bcaslot.cxx.
References aBroadcastAreaTbl, ScRange::aEnd, ScRange::aStart, sc::Both, ScAddress::Col(), SvtBroadcaster::GetAllListeners(), ScBroadcastArea::GetBroadcaster(), ScBroadcastArea::GetRange(), sc::Group, ScRange::In(), sc::Inside, sc::InsideOrOverlap, ScRange::Intersects(), ScBroadcastArea::IsGroupListening(), isMarkedErased(), sc::AreaListener::maArea, sc::AreaListener::mbGroupListening, sc::AreaListener::mpListener, sc::OneColumnInside, sc::OneRowInside, and ScAddress::Row().
Referenced by ScBroadcastAreaSlotMachine::GetAllListeners().
void ScBroadcastAreaSlot::InsertListeningArea | ( | ScBroadcastArea * | pArea | ) |
Insert a ScBroadcastArea obtained via StartListeningArea() to subsequent slots.
Definition at line 159 of file bcaslot.cxx.
References aBroadcastAreaTbl, CheckHardRecalcStateCondition(), ScDocument::ETERNAL, and ScBroadcastArea::IncRef().
|
inline |
Definition at line 223 of file bcaslot.hxx.
References mbInBroadcastIteration.
Referenced by ScBroadcastAreaSlotMachine::FinallyEraseAreas().
|
inlinestaticprivate |
Definition at line 175 of file bcaslot.hxx.
Referenced by AreaBroadcast(), EndListeningArea(), and GetAllListeners().
bool ScBroadcastAreaSlot::StartListeningArea | ( | const ScRange & | rRange, |
bool | bGroupListening, | ||
SvtListener * | pListener, | ||
ScBroadcastArea *& | rpArea | ||
) |
Only here new ScBroadcastArea objects are created, prevention of dupes.
rpArea | If NULL, a new ScBroadcastArea is created and assigned ton the reference if a matching area wasn't found. If a matching area was found, that is assigned. In any case, the SvtListener is added to the broadcaster. |
If not NULL then no listeners are started, only the area is inserted and the reference count incremented. Effectively the same as InsertListeningArea(), so use that instead.
Definition at line 115 of file bcaslot.cxx.
References aBroadcastAreaTbl, assert(), CheckHardRecalcStateCondition(), ScDocument::ETERNAL, FindBroadcastArea(), ScBroadcastArea::GetBroadcaster(), ScBroadcastArea::IncRef(), ScDocument::IsDelayedFormulaGrouping(), pDoc, ScBroadcastArea::SetGroupListening(), and SvtListener::StartListening().
void ScBroadcastAreaSlot::UpdateInsert | ( | ScBroadcastArea * | pArea | ) |
Definition at line 422 of file bcaslot.cxx.
References aBroadcastAreaTbl, SvtBroadcaster::GetAllListeners(), ScBroadcastArea::GetBroadcaster(), ScBroadcastArea::IncRef(), rTarget, and SvtListener::StartListening().
void ScBroadcastAreaSlot::UpdateRemove | ( | UpdateRefMode | eUpdateRefMode, |
const ScRange & | rRange, | ||
SCCOL | nDx, | ||
SCROW | nDy, | ||
SCTAB | nDz | ||
) |
Definition at line 364 of file bcaslot.cxx.
References aBroadcastAreaTbl, ScBroadcastArea::DecRef(), ScBroadcastAreaSlotMachine::GetEOUpdateChain(), ScBroadcastArea::GetRange(), ScRange::GetVars(), ScBroadcastAreaSlotMachine::IsInBulkBroadcast(), ScBroadcastArea::IsInUpdateChain(), pBASM, pDoc, ScBroadcastAreaSlotMachine::RemoveBulkArea(), ScBroadcastAreaSlotMachine::SetEOUpdateChain(), ScBroadcastArea::SetInUpdateChain(), ScBroadcastAreaSlotMachine::SetUpdateChain(), ScBroadcastArea::SetUpdateChainNext(), and ScRefUpdate::Update().
Referenced by ScBroadcastAreaSlotMachine::UpdateBroadcastAreas().
void ScBroadcastAreaSlot::UpdateRemoveArea | ( | ScBroadcastArea * | pArea | ) |
Definition at line 408 of file bcaslot.cxx.
References aBroadcastAreaTbl, and ScBroadcastArea::DecRef().
Referenced by ScBroadcastAreaSlotMachine::UpdateBroadcastAreas().
|
private |
Definition at line 145 of file bcaslot.hxx.
Referenced by AreaBroadcast(), CheckHardRecalcStateCondition(), DelBroadcastAreasInRange(), EndListeningArea(), EraseArea(), FindBroadcastArea(), GetAllListeners(), InsertListeningArea(), StartListeningArea(), UpdateInsert(), UpdateRemove(), UpdateRemoveArea(), and ~ScBroadcastAreaSlot().
|
mutableprivate |
Definition at line 146 of file bcaslot.hxx.
Referenced by FindBroadcastArea().
|
private |
If true, the slot has at least one area broadcaster marked for removal.
This flag is used only during broadcast iteration, to speed up iteration. Using this flag is cheaper than dereferencing each iterator and checking its own flag inside especially when no areas are marked for removal.
Definition at line 158 of file bcaslot.hxx.
Referenced by AreaBroadcast(), and EraseArea().
|
private |
Definition at line 149 of file bcaslot.hxx.
Referenced by AreaBroadcast(), EraseArea(), and IsInBroadcastIteration().
|
private |
Definition at line 148 of file bcaslot.hxx.
Referenced by AreaBroadcast(), DelBroadcastAreasInRange(), EraseArea(), FinallyEraseAreas(), and UpdateRemove().
|
private |
Definition at line 147 of file bcaslot.hxx.
Referenced by CheckHardRecalcStateCondition(), StartListeningArea(), and UpdateRemove().