[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 6 10:43:59 UTC 2020
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.michaelsen at libreoffice.org>
AuthorDate: Sun Dec 6 04:18:17 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at 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.michaelsen at 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()
More information about the Libreoffice-commits
mailing list