diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-06-10 17:20:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-06-10 17:32:50 +0200 |
commit | 2676ee8ededce1aab9888bb3be0b6146e4624dfb (patch) | |
tree | 3be5aa921ccd1320aac97e518d5296bdd2c32dde /sw | |
parent | f5ca824f4c7f6bea7f2caf51715aa865250d1288 (diff) |
sw: fix GCC undefined reference to `typeinfo for sw::LegacyModifyHint'
Stop pointlessly inlining these virtual functions.
Change-Id: I11d123bc704ec6cf54925a13d139fce70cc59566
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/calbck.hxx | 12 | ||||
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 14 |
2 files changed, 16 insertions, 10 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index db28e0bc5297..a19ee55cc09f 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -115,17 +115,9 @@ public: // should be called only from SwModify the client is registered in // mba: IMHO this method should be pure virtual // DO NOT USE IN NEW CODE! use SwClientNotify instead. - virtual void Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue ) - { CheckRegistration( pOldValue, pNewValue ); } + virtual void Modify(const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue); // when overriding this, you MUST call SwClient::SwClientModify() in the override! - virtual void SwClientNotify( const SwModify&, const SfxHint& rHint) SAL_OVERRIDE - { - if(typeid(rHint) == typeid(sw::LegacyModifyHint)) - { - auto pLegacyHint(static_cast<const sw::LegacyModifyHint*>(&rHint)); - Modify(pLegacyHint->m_pOld, pLegacyHint->m_pNew); - } - }; + virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) SAL_OVERRIDE; // in case an SwModify object is destroyed that itself is registered in another SwModify, // its SwClient objects can decide to get registered to the latter instead by calling this method diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index f3a4aa0a33b4..d836db25fa8d 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -57,6 +57,20 @@ void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem* ) } } +void SwClient::SwClientNotify(const SwModify&, const SfxHint& rHint) +{ + if (typeid(rHint) == typeid(sw::LegacyModifyHint)) + { + auto pLegacyHint(static_cast<const sw::LegacyModifyHint*>(&rHint)); + Modify(pLegacyHint->m_pOld, pLegacyHint->m_pNew); + } +}; + +void SwClient::Modify(SfxPoolItem const*const pOldValue, SfxPoolItem const*const pNewValue) +{ + CheckRegistration( pOldValue, pNewValue ); +} + SwModify::~SwModify() { OSL_ENSURE( !IsModifyLocked(), "Modify destroyed but locked." ); |