diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-13 14:51:53 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-14 02:23:44 +0100 |
commit | 0ec458926072457103cc9461cd908b8993d50402 (patch) | |
tree | 0dd2b3a01b2810e6ef21f01fcdd66b245b3c4c49 /sw | |
parent | e755c1d446d719fe796ad7811405b7bf0680a190 (diff) |
inline SwDepends trivials
Change-Id: I6fb306aec5fee5f97a7ef33862f74f6030136fc0
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/calbck.hxx | 21 | ||||
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 25 |
2 files changed, 17 insertions, 29 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 135b4fe8fe89..54d9b18df127 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -24,6 +24,8 @@ #include "swdllapi.h" #include <boost/noncopyable.hpp> #include <ring.hxx> +#include <hintids.hxx> +#include <hints.hxx> class SwModify; class SwClientIter; @@ -199,15 +201,26 @@ class SW_DLLPUBLIC SwDepend: public SwClient public: SwDepend() : pToTell(0) {} - SwDepend(SwClient *pTellHim, SwModify *pDepend); + SwDepend(SwClient *pTellHim, SwModify *pDepend) : SwClient(pDepend), pToTell(pTellHim) {} SwClient* GetToTell() { return pToTell; } /** get Client information */ - virtual bool GetInfo( SfxPoolItem & ) const SAL_OVERRIDE; + virtual bool GetInfo( SfxPoolItem& rInfo) const SAL_OVERRIDE + { return pToTell ? pToTell->GetInfo( rInfo ) : true; } protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue ) SAL_OVERRIDE; - virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) SAL_OVERRIDE; + virtual void Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue ) SAL_OVERRIDE + { + if( pNewValue && pNewValue->Which() == RES_OBJECTDYING ) + CheckRegistration(pOldValue,pNewValue); + else if( pToTell ) + pToTell->ModifyNotification(pOldValue, pNewValue); + } + virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) SAL_OVERRIDE + { + if ( pToTell ) + pToTell->SwClientNotifyCall( rModify, rHint ); + } }; class SwClientIter : public sw::Ring<SwClientIter> diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 7d317af38928..636ee94b7433 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -270,30 +270,5 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich ) } } -SwDepend::SwDepend( SwClient* pTellHim, SwModify* pDepend ) - : SwClient( pDepend ) -{ - pToTell = pTellHim; -} - -void SwDepend::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) -{ - if( pNewValue && pNewValue->Which() == RES_OBJECTDYING ) - CheckRegistration(pOldValue,pNewValue); - else if( pToTell ) - pToTell->ModifyNotification(pOldValue, pNewValue); -} - -void SwDepend::SwClientNotify( const SwModify& rMod, const SfxHint& rHint ) -{ - if ( pToTell ) - pToTell->SwClientNotifyCall( rMod, rHint ); -} - -bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const -{ - return pToTell ? pToTell->GetInfo( rInfo ) : true; -} - SwClientIter* SwClientIter::our_pClientIters = nullptr; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |