[Libreoffice-commits] core.git: sw/inc sw/source

Michael Stahl mstahl at redhat.com
Wed Jun 10 08:38:59 PDT 2015


 sw/inc/calbck.hxx              |   12 ++----------
 sw/source/core/attr/calbck.cxx |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 10 deletions(-)

New commits:
commit 2676ee8ededce1aab9888bb3be0b6146e4624dfb
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jun 10 17:20:50 2015 +0200

    sw: fix GCC undefined reference to `typeinfo for sw::LegacyModifyHint'
    
    Stop pointlessly inlining these virtual functions.
    
    Change-Id: I11d123bc704ec6cf54925a13d139fce70cc59566

diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index db28e0b..a19ee55 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 f3a4aa0..d836db2 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." );


More information about the Libreoffice-commits mailing list