diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-13 13:44:40 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-14 02:23:43 +0100 |
commit | e2a38e6599247b90ed4ff903f8a9cc64b6a3af68 (patch) | |
tree | 8fd07fffb1276108962de8242095b392f8141110 | |
parent | 3fc8c700e5964690b637847294a0b38ac4fbbb02 (diff) |
inline trivial SwModify functions
Change-Id: I0dda2a53e49073a75b9ce14d7aa4b5088eeb2fd7
-rw-r--r-- | sw/inc/calbck.hxx | 12 | ||||
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 26 |
2 files changed, 9 insertions, 29 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index fd7785b3888f..6f95eed0aa93 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -141,10 +141,13 @@ class SW_DLLPUBLIC SwModify: public SwClient bool bInSwFntCache : 1; // mba: IMHO this method should be pure virtual - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE; + virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE + { NotifyClients( pOld, pNew ); }; public: - SwModify(); + SwModify() + : SwClient(nullptr), pRoot(nullptr), bModifyLocked(false), bLockClientList(false), bInDocDTOR(false), bInCache(false), bInSwFntCache(false) + {} // broadcasting: send notifications to all clients void NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ); @@ -158,7 +161,10 @@ public: void CallSwClientNotify( const SfxHint& rHint ) const; // single argument ctors shall be explicit. - explicit SwModify( SwModify *pToRegisterIn ); + explicit SwModify( SwModify* pToRegisterIn ) + : SwClient(pToRegisterIn), pRoot(nullptr), bModifyLocked(false), bLockClientList(false), bInDocDTOR(false), bInCache(false), bInSwFntCache(false) + {} + virtual ~SwModify(); void Add(SwClient *pDepend); diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 350030c376e8..6c32760a2b46 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -56,27 +56,6 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* ) } } - -SwModify::SwModify() - : SwClient(nullptr), pRoot(nullptr) -{ - bModifyLocked = false; - bLockClientList = false; - bInDocDTOR = false; - bInCache = false; - bInSwFntCache = false; -} - -SwModify::SwModify( SwModify* pToRegisterIn ) - : SwClient( pToRegisterIn ), pRoot( nullptr ) -{ - bModifyLocked = false; - bLockClientList = false; - bInDocDTOR = false; - bInCache = false; - bInSwFntCache = false; -} - SwModify::~SwModify() { OSL_ENSURE( !IsModifyLocked(), "Modify destroyed but locked." ); @@ -117,11 +96,6 @@ SwModify::~SwModify() } } -void SwModify::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) -{ - NotifyClients( pOldValue, pNewValue ); -} - void SwModify::NotifyClients( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) { if ( IsInCache() || IsInSwFntCache() ) |