diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-13 14:30:10 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-14 02:23:44 +0100 |
commit | e755c1d446d719fe796ad7811405b7bf0680a190 (patch) | |
tree | 7dfe1d89716adf1554218b17836334a78942736d /sw | |
parent | 9bfd0481dc7d37da994eb215b238c12f2f68b485 (diff) |
inline broadcast iterations
Change-Id: If6f83887ad398161d9ccb1e2649ca6cdfd933ca5
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/calbck.hxx | 17 | ||||
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 13 |
2 files changed, 15 insertions, 15 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 3520416b1b7f..135b4fe8fe89 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -155,10 +155,10 @@ public: // the same, but without setting bModifyLocked or checking for any of the flags // mba: it would be interesting to know why this is necessary // also allows to limit callback to certain type (HACK) - void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType = TYPE(SwClient) ); + inline void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType = TYPE(SwClient) ); // a more universal broadcasting mechanism - void CallSwClientNotify( const SfxHint& rHint ) const; + inline void CallSwClientNotify( const SfxHint& rHint ) const; // single argument ctors shall be explicit. explicit SwModify( SwModify* pToRegisterIn ) @@ -333,6 +333,19 @@ SwClient::SwClient( SwModify* pToRegisterIn ) if(pToRegisterIn) pToRegisterIn->Add(this); } + +void SwModify::ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType) +{ + SwClientIter aIter(*this); + for(aIter.First(nType); aIter; aIter.Next()) + aIter->Modify( pOldValue, pNewValue ); +} + +void SwModify::CallSwClientNotify( const SfxHint& rHint ) const +{ + for(SwClientIter aIter(*this); aIter; ++aIter) + aIter->SwClientNotify( *this, rHint ); +} #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index a268b3de9939..7d317af38928 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -270,19 +270,6 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich ) } } -void SwModify::CallSwClientNotify( const SfxHint& rHint ) const -{ - for(SwClientIter aIter(*this); aIter; ++aIter) - aIter->SwClientNotify( *this, rHint ); -} - -void SwModify::ModifyBroadcast( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue, TypeId nType ) -{ - SwClientIter aIter(*this); - for(aIter.First(nType); aIter; aIter.Next()) - aIter->Modify( pOldValue, pNewValue ); -} - SwDepend::SwDepend( SwClient* pTellHim, SwModify* pDepend ) : SwClient( pDepend ) { |