20#ifndef INCLUDED_SW_INC_CALBCK_HXX
21#define INCLUDED_SW_INC_CALBCK_HXX
69 class ClientIteratorBase;
75 sal_uInt16
GetWhich()
const {
return m_pOld ? m_pOld->Which() : m_pNew ? m_pNew->Which() : 0; };
107 friend class ::SwModify;
108 friend class ::sw::ClientIteratorBase;
118 : m_pLeft(nullptr), m_pRight(nullptr)
123 bool IsLast()
const {
return !m_pLeft && !m_pRight; }
139 template<
typename E,
typename S, sw::IteratorMode>
friend class SwIterator;
151 virtual void SwClientNotify(
const SwModify&,
const SfxHint& rHint)
override;
161 std::optional<
sw::ModifyChangedHint> CheckRegistration( const
SfxPoolItem* pOldValue );
164 void CheckRegistrationFormat(
SwFormat& rOld);
166 const
SwModify* GetRegisteredIn()
const {
return m_pRegisteredIn; }
168 void EndListeningAll();
169 void StartListeningToSameModifyAs(
const SwClient&);
184 template<
typename E,
typename S, sw::IteratorMode>
friend class SwIterator;
191 virtual void SwClientNotify(
const SwModify&,
const SfxHint& rHint)
override;
194 :
SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false)
198 virtual void CallSwClientNotify(
const SfxHint& rHint )
const;
215template<
typename TElementType,
typename TSource, sw::IteratorMode eMode>
class SwIterator;
227 public SwModify,
public BroadcasterMixin
230 virtual void CallSwClientNotify(
const SfxHint& rHint)
const override;
236 template<
typename E,
typename S, sw::IteratorMode>
friend class ::SwIterator;
253 other.EndListeningAll();
273 void EndListening(
SwModify* pDepend);
274 bool IsListeningTo(
const SwModify*
const pDepend)
const;
275 void EndListeningAll();
295#if defined __GNUC__ && __GNUC__ >= 12 && !defined __clang__
296#pragma GCC diagnostic push
297#pragma GCC diagnostic ignored "-Wdangling-pointer"
300#if defined __GNUC__ && __GNUC__ >= 12 && !defined __clang__
301#pragma GCC diagnostic pop
336 template<
typename CastDest>
339 return dynamic_cast<const CastDest *
>(pSource);
363template<
typename TElementType,
typename TSource,
368 static_assert(std::is_base_of<SwClient,TElementType>::value,
"TElementType needs to be derived from SwClient.");
369 static_assert(std::is_base_of<SwModify,TSource>::value,
"TSource needs to be derived from SwModify.");
391 pCurrent = pLE->m_pToTell;
394 if (sw::detail::internal_dyn_cast<TElementType>(pCurrent) ==
nullptr)
403 return static_cast<TElementType*
>(pCurrent);
410 static_assert(std::is_base_of<SwModify,TSource>::value,
"TSource needs to be derived from SwModify");
425 : m_pRegisteredIn( nullptr )
428 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).
SwTable is one table in the document model, 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
virtual const SwTable * DynCastTable() const
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
class SAL_DLLPUBLIC_RTTI SAL_LOPLUGIN_ANNOTATE("crosscast") SwFlowFrame
Base class that provides the general functionalities for frames that are allowed at page breaks (flow...
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)