sw/inc/fmtrfmrk.hxx               |    3 +--
 sw/source/core/txtnode/atrref.cxx |   11 ++++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 49e364b2ca63c01853b3d88aa950e3ca081c10b2
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Sun Dec 6 04:18:17 2020 +0100
Commit:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
CommitDate: Sun Dec 6 11:43:16 2020 +0100

    SwFormatRefMark: Modify no more
    
    Change-Id: Ic27ae029740909d229a9a6ce03b0a9b8b88b55c6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107275
    Tested-by: Jenkins
    Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org>

diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index 0d037a669db6..698e084ab939 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -55,8 +55,7 @@ public:
     virtual SwFormatRefMark* Clone( SfxItemPool* pPool = nullptr ) const 
override;
 
     // SwClient
-    virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
-        override;
+    virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 
     void InvalidateRefMark();
 
diff --git a/sw/source/core/txtnode/atrref.cxx 
b/sw/source/core/txtnode/atrref.cxx
index c4be350c3445..fdea6ce5dad7 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -54,13 +54,14 @@ SwFormatRefMark* SwFormatRefMark::Clone( SfxItemPool* ) 
const
     return new SwFormatRefMark( *this );
 }
 
-void SwFormatRefMark::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
+void SwFormatRefMark::SwClientNotify(const SwModify&, const SfxHint& rHint)
 {
-    NotifyClients(pOld, pNew);
-    if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
-    {   // invalidate cached UNO object
+    auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
+    if(!pLegacy)
+        return;
+    CallSwClientNotify(rHint);
+    if(RES_REMOVE_UNO_OBJECT == pLegacy->GetWhich())
         SetXRefMark(css::uno::Reference<css::text::XTextContent>(nullptr));
-    }
 }
 
 void SwFormatRefMark::InvalidateRefMark()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to