summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-12-06 04:18:17 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-12-06 11:43:16 +0100
commit49e364b2ca63c01853b3d88aa950e3ca081c10b2 (patch)
tree4330bdb0d516668d986dc6d6ab5d523da1320379
parent32df28ba6c81a9ff29dfbeb39f2d83917dd69b33 (diff)
SwFormatRefMark: Modify no more
Change-Id: Ic27ae029740909d229a9a6ce03b0a9b8b88b55c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107275 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r--sw/inc/fmtrfmrk.hxx3
-rw-r--r--sw/source/core/txtnode/atrref.cxx11
2 files changed, 7 insertions, 7 deletions
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()