summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-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()