[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 6 10:44:24 UTC 2020
sw/inc/fmtftn.hxx | 4 +---
sw/source/core/txtnode/atrftn.cxx | 11 ++++++-----
2 files changed, 7 insertions(+), 8 deletions(-)
New commits:
commit 2e6a67f3dd1c349135c7842253673d8e1720023c
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sun Dec 6 04:11:23 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Sun Dec 6 11:43:38 2020 +0100
SwFormatFootname: Modify no more
Change-Id: I0617605a078aa10fc57bade9f6943138183bb591
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107274
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 2ce85ff0728b..d6f80da2ee66 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -61,9 +61,7 @@ public:
virtual bool operator==( const SfxPoolItem& ) const override;
virtual SwFormatFootnote* 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 InvalidateFootnote();
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 7f7e6e1dba4c..5ec1f6f93a01 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -151,13 +151,14 @@ SwFormatFootnote* SwFormatFootnote::Clone( SfxItemPool* ) const
return pNew;
}
-void SwFormatFootnote::Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
+void SwFormatFootnote::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())
SetXFootnote(css::uno::Reference<css::text::XFootnote>(nullptr));
- }
}
void SwFormatFootnote::InvalidateFootnote()
More information about the Libreoffice-commits
mailing list