diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-06 04:11:23 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-06 11:43:38 +0100 |
commit | 2e6a67f3dd1c349135c7842253673d8e1720023c (patch) | |
tree | bedc19a29675c3fcacb214eef8936933e4b640bd | |
parent | 49e364b2ca63c01853b3d88aa950e3ca081c10b2 (diff) |
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@libreoffice.org>
-rw-r--r-- | sw/inc/fmtftn.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrftn.cxx | 11 |
2 files changed, 7 insertions, 8 deletions
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() |