20#ifndef INCLUDED_SW_INC_CALBCK_HXX
21#define INCLUDED_SW_INC_CALBCK_HXX
68 class ClientIteratorBase;
74 sal_uInt16
GetWhich()
const {
return m_pOld ? m_pOld->Which() : m_pNew ? m_pNew->Which() : 0; };
106 friend class ::SwModify;
107 friend class ::sw::ClientIteratorBase;
117 : m_pLeft(nullptr), m_pRight(nullptr)
122 bool IsLast()
const {
return !m_pLeft && !m_pRight; }
137 template<
typename E,
typename S, sw::IteratorMode>
friend class SwIterator;
149 virtual void SwClientNotify(
const SwModify&,
const SfxHint& rHint)
override;
159 std::optional<
sw::ModifyChangedHint> CheckRegistration( const
SfxPoolItem* pOldValue );
162 void CheckRegistrationFormat(
SwFormat& rOld);
164 const
SwModify* GetRegisteredIn()
const {
return m_pRegisteredIn; }
166 void EndListeningAll();
167 void StartListeningToSameModifyAs(
const SwClient&);
182 template<
typename E,
typename S, sw::IteratorMode>
friend class SwIterator;
189 virtual void SwClientNotify(
const SwModify&,
const SfxHint& rHint)
override;
192 :
SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false)
196 virtual void CallSwClientNotify(
const SfxHint& rHint )
const;
213template<
typename TElementType,
typename TSource, sw::IteratorMode eMode>
class SwIterator;
226 virtual void CallSwClientNotify(
const SfxHint& rHint)
const override;
232 template<
typename E,
typename S, sw::IteratorMode>
friend class ::SwIterator;
249 other.EndListeningAll();
269 void EndListening(
SwModify* pDepend);
270 bool IsListeningTo(
const SwModify*
const pDepend)
const;
271 void EndListeningAll();
325 template<
typename CastDest>
328 return dynamic_cast<const CastDest *
>(pSource);
347template<
typename TElementType,
typename TSource,
352 static_assert(std::is_base_of<SwClient,TElementType>::value,
"TElementType needs to be derived from SwClient.");
353 static_assert(std::is_base_of<SwModify,TSource>::value,
"TSource needs to be derived from SwModify.");
375 pCurrent = pLE->m_pToTell;
378 if (sw::detail::internal_dyn_cast<TElementType>(pCurrent) ==
nullptr)
387 return static_cast<TElementType*
>(pCurrent);
394 static_assert(std::is_base_of<SwModify,TSource>::value,
"TSource needs to be derived from SwModify");
409 : m_pRegisteredIn( nullptr )
412 pToRegisterIn->
Add(
this);
SwCellFrame is one table cell in the document layout.
const SwModify * GetRegisteredIn() const
SwModify * m_pRegisteredIn
event source
virtual bool GetInfo(SfxPoolItem &) const
SwModify * GetRegisteredInNonConst() const
SwModify * GetRegisteredIn()
SwIterator(const TSource &rSrc)
SwIterator(const TSource &rSrc)
bool IsModifyLocked() const
void Add(SwClient *pDepend)
SwClient * Remove(SwClient *pDepend)
bool HasWriterListeners() const
SwModify(SwModify const &)=delete
bool HasOnlyOneListener() const
sw::WriterListener * m_pWriterListeners
SwRowFrame is one table row in the document layout.
SwTabFrame is one table in the document layout, containing rows (which contain cells).
SvtBroadcaster m_aNotifier
BroadcasterMixin(BroadcasterMixin const &)=default
SvtBroadcaster & GetNotifier()
BroadcasterMixin()=default
BroadcasterMixin & operator=(const BroadcasterMixin &)
WriterListener * GetLeftOfPos()
static SW_DLLPUBLIC ClientIteratorBase * s_pClientIters
WriterListener * GetRightOfPos()
WriterListener * m_pCurrent
~ClientIteratorBase() override
WriterListener * m_pPosition
ClientIteratorBase(const SwModify &rModify)
WriterListener * GoStart()
ListenerEntry & operator=(ListenerEntry const &)=delete
virtual void SwClientNotify(const SwModify &rModify, const SfxHint &rHint) override
ListenerEntry(ListenerEntry &&other) noexcept
ListenerEntry(ListenerEntry const &)=delete
ListenerEntry & operator=(ListenerEntry &&other) noexcept
virtual bool GetInfo(SfxPoolItem &rInfo) const override
get Client information
ListenerEntry(SwClient *const pTellHim, SwModify *const pDepend)
void MoveTo(::sw::ClientIteratorBase *pDestRing)
Removes this item from its current ring container and adds it to another ring container.
::sw::ClientIteratorBase * GetNextInRing()
refactoring out the same of the more sane SwClient functionality
WriterListener(WriterListener const &)=delete
virtual const SwCellFrame * DynCastCellFrame() const
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint)=0
virtual const SwRowFrame * DynCastRowFrame() const
WriterListener & operator=(WriterListener const &)=delete
virtual ~WriterListener() COVERITY_NOEXCEPT_FALSE
WriterListener * m_pRight
double-linked list of other clients
virtual const SwTabFrame * DynCastTabFrame() const
WriterMultiListener(WriterMultiListener const &)=delete
std::vector< ListenerEntry > m_vDepends
WriterMultiListener & operator=(WriterMultiListener const &)=delete
const CastDest * internal_dyn_cast(const sw::WriterListener *pSource)
Dialog to specify the properties of date form field.
void ClientNotifyAttrChg(SwModify &rModify, const SwAttrSet &aSet, SwAttrSet &aOld, SwAttrSet &aNew)
sal_uInt16 GetWhich() const
const SfxPoolItem * m_pOld
LegacyModifyHint(const SfxPoolItem *pOld, const SfxPoolItem *pNew)
const SfxPoolItem * m_pNew
ModifyChangedHint(const SwModify *pNew)