[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 6 00:54:10 UTC 2020
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 <bjoern.michaelsen at libreoffice.org>
AuthorDate: Sat Dec 5 23:14:58 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
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 <bjoern.michaelsen at libreoffice.org>
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));
More information about the Libreoffice-commits
mailing list