summaryrefslogtreecommitdiff
path: root/sw/inc/calbck.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2019-01-02 12:19:29 +0100
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2019-01-02 14:11:45 +0100
commit49c61f660d05ab13140d4349a0b3f6efba742022 (patch)
tree1e34e2f70d5bf6543b37a77e30aba73585c6a4b6 /sw/inc/calbck.hxx
parent7f7d775544d13a300c0583b2d9e1c13faba879e3 (diff)
Remove SwModify/SwClient for UNO Bookmarks
- introduce sw::BroadcastingModify for migration * still receives .SwModify signals * broadcasts those to old SwClients and new SvtListeners * add tests - remove SwClient/SwModify for UNO bookmarks Change-Id: Icefca478472820b93f4bb59e670e59b60eddfe2b Reviewed-on: https://gerrit.libreoffice.org/65806 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/inc/calbck.hxx')
-rw-r--r--sw/inc/calbck.hxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 891664cdbddc..4d33243ed277 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -202,7 +202,7 @@ public:
{ CallSwClientNotify( sw::LegacyModifyHint{ pOldValue, pNewValue } ); };
// a more universal broadcasting mechanism
- inline void CallSwClientNotify( const SfxHint& rHint ) const;
+ virtual void CallSwClientNotify( const SfxHint& rHint ) const;
virtual ~SwModify() override;
@@ -230,6 +230,15 @@ template<typename TElementType, typename TSource, sw::IteratorMode eMode> class
namespace sw
{
+ // this class is part of the migration: it still forwards the "old"
+ // SwModify events and announces them both to the old SwClients still
+ // registered and also to the new SvtListeners.
+ // Still: in the long run the SwClient/SwModify interface should not be
+ // used anymore, in which case a BroadcasterMixin should be enough instead
+ // then.
+ class SW_DLLPUBLIC BroadcastingModify : public SwModify, public BroadcasterMixin {
+ virtual void CallSwClientNotify(const SfxHint& rHint) const override;
+ };
// this should be hidden but sadly SwIterator template needs it...
class ListenerEntry final : public SwClient
{
@@ -438,12 +447,6 @@ SwClient::SwClient( SwModify* pToRegisterIn )
pToRegisterIn->Add(this);
}
-void SwModify::CallSwClientNotify( const SfxHint& rHint ) const
-{
- SwIterator<SwClient,SwModify> aIter(*this);
- for(SwClient* pClient = aIter.First(); pClient; pClient = aIter.Next())
- pClient->SwClientNotify( *this, rHint );
-}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */