sw/inc/fmtmeta.hxx | 3 +-- sw/source/core/txtnode/fmtatr2.cxx | 12 +++++++----- 2 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit 5ffcd52801b5986652b644c1ff6fb37906f30da6 Author: Bjoern Michaelsen <[email protected]> AuthorDate: Sat Dec 5 23:14:58 2020 +0100 Commit: Bjoern Michaelsen <[email protected]> CommitDate: Sun Dec 6 01:53:28 2020 +0100 Meta: Modify no more Change-Id: I14f53ca852042f8032fa18ac6b23fbe3ceea3e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107266 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <[email protected]> diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx index b495e2655b98..17a160bc53e6 100644 --- a/sw/inc/fmtmeta.hxx +++ b/sw/inc/fmtmeta.hxx @@ -152,8 +152,7 @@ protected: void SetXMeta(css::uno::Reference<css::rdf::XMetadatable> const& xMeta) { m_wXMeta = xMeta; } - /// SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; public: explicit Meta(SwFormatMeta * const i_pFormat); diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index d3725ea03bb5..2ce3928a1c71 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -598,7 +598,7 @@ void SwFormatMeta::NotifyChangeTextNode(SwTextNode *const pTextNode) // where the hint is not deleted! OSL_ENSURE(m_pMeta, "SwFormatMeta::NotifyChangeTextNode: no Meta?"); if (m_pMeta && (m_pMeta->GetFormatMeta() == this)) - { // do not call Modify, that would call SwXMeta::Modify! + { // do not call Modify, that would call SwXMeta::SwClientNotify m_pMeta->NotifyChangeTextNode(pTextNode); } } @@ -667,12 +667,14 @@ void Meta::NotifyChangeTextNode(SwTextNode *const pTextNode) } } -// SwClient -void Meta::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew ) +void Meta::SwClientNotify(const SwModify&, const SfxHint& rHint) { - NotifyClients(pOld, pNew); + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy) + return; + CallSwClientNotify(rHint); GetNotifier().Broadcast(SfxHint(SfxHintId::DataChanged)); - if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) + if(RES_REMOVE_UNO_OBJECT == pLegacy->GetWhich()) { // invalidate cached uno object SetXMeta(uno::Reference<rdf::XMetadatable>(nullptr)); GetNotifier().Broadcast(SfxHint(SfxHintId::Deinitializing)); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
