LibreOffice Module svl (master) 1
|
#include <lstner.hxx>
Public Member Functions | |
SfxListener () | |
SfxListener (const SfxListener &rCopy) | |
virtual | ~SfxListener () COVERITY_NOEXCEPT_FALSE |
void | StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected) |
Registers a specific SfxBroadcaster. More... | |
void | EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false) |
void | EndListeningAll () |
bool | IsListening (SfxBroadcaster &rBroadcaster) const |
sal_uInt16 | GetBroadcasterCount () const |
SfxBroadcaster * | GetBroadcasterJOE (sal_uInt16 nNo) const |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
virtual bool | IsSdrView () const |
Used to avoid cost of dynamic_cast in SdrViewIter::ImpFindView. More... | |
Private Member Functions | |
const SfxListener & | operator= (const SfxListener &)=delete |
Private Attributes | |
std::vector< SfxBroadcaster * > | maBCs |
std::map< SfxBroadcaster *, std::unique_ptr< sal::BacktraceState > > | maCallStacks |
Definition at line 43 of file lstner.hxx.
|
inline |
Definition at line 56 of file lstner.hxx.
SfxListener::SfxListener | ( | const SfxListener & | rCopy | ) |
Definition at line 33 of file lstner.cxx.
References maBCs, maCallStacks, and n.
|
virtual |
Definition at line 47 of file lstner.cxx.
References maBCs, nPos, and SfxBroadcaster::RemoveListener().
void SfxListener::EndListening | ( | SfxBroadcaster & | rBroadcaster, |
bool | bRemoveAllDuplicates = false |
||
) |
Definition at line 105 of file lstner.cxx.
References maBCs, maCallStacks, and SfxBroadcaster::RemoveListener().
Referenced by SfxStyleSheet::SetParent().
void SfxListener::EndListeningAll | ( | ) |
Definition at line 127 of file lstner.cxx.
References maBCs, and maCallStacks.
sal_uInt16 SfxListener::GetBroadcasterCount | ( | ) | const |
Definition at line 144 of file lstner.cxx.
References maBCs.
SfxBroadcaster * SfxListener::GetBroadcasterJOE | ( | sal_uInt16 | nNo | ) | const |
Definition at line 149 of file lstner.cxx.
References maBCs.
bool SfxListener::IsListening | ( | SfxBroadcaster & | rBroadcaster | ) | const |
Definition at line 139 of file lstner.cxx.
References maBCs.
Referenced by Notify(), and StartListening().
|
inlinevirtual |
Used to avoid cost of dynamic_cast in SdrViewIter::ImpFindView.
Definition at line 73 of file lstner.hxx.
|
virtual |
Reimplemented in SfxStyleSheet.
Definition at line 157 of file lstner.cxx.
References IsListening().
Referenced by SfxBroadcaster::Broadcast(), and SfxBroadcaster::Forward().
|
privatedelete |
void SfxListener::RemoveBroadcaster_Impl | ( | SfxBroadcaster & | rBC | ) |
Definition at line 60 of file lstner.cxx.
References maBCs, and maCallStacks.
Referenced by SfxBroadcaster::~SfxBroadcaster().
void SfxListener::StartListening | ( | SfxBroadcaster & | rBroadcaster, |
DuplicateHandling | eDuplicateHanding = DuplicateHandling::Unexpected |
||
) |
Registers a specific SfxBroadcaster.
Some code uses duplicates as a kind of ref-counting thing i.e. they add and remove listeners on different code paths, and they only really stop listening when the last EndListening() is called.
Definition at line 79 of file lstner.cxx.
References SfxBroadcaster::AddListener(), IsListening(), maBCs, maCallStacks, Prevent, SAL_WARN, and Unexpected.
Referenced by SfxStyleSheet::SetParent(), and SfxBroadcaster::SfxBroadcaster().
|
private |
Definition at line 45 of file lstner.hxx.
Referenced by EndListening(), EndListeningAll(), GetBroadcasterCount(), GetBroadcasterJOE(), IsListening(), RemoveBroadcaster_Impl(), SfxListener(), StartListening(), and ~SfxListener().
|
private |
Definition at line 48 of file lstner.hxx.
Referenced by EndListening(), EndListeningAll(), RemoveBroadcaster_Impl(), SfxListener(), and StartListening().