summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-09-20 12:04:37 +0200
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-10-05 00:38:06 +0200
commit10f32207a3eb6295dcea4f1d2cdf30bc4c4098e9 (patch)
treeeea156de26833a524b49f33a8bfa74b3cfdf099f
parent856ce2a5b64a6f7a1ea3a6ab0ee2bb5932743566 (diff)
MarkBase: Replace Modify with SwClientNotify
Change-Id: I15661c979c25d3d9fd47d9885183b972f0ae88ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103067 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
-rw-r--r--sw/source/core/crsr/bookmrk.cxx7
-rw-r--r--sw/source/core/inc/bookmrk.hxx2
2 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index c918ec28917e..fd339f583ee1 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -340,10 +340,11 @@ namespace sw::mark
}
}
- void MarkBase::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew )
+ void MarkBase::SwClientNotify(const SwModify&, const SfxHint& rHint)
{
- NotifyClients(pOld, pNew);
- if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
+ CallSwClientNotify(rHint);
+ auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
+ if(pLegacy && RES_REMOVE_UNO_OBJECT == pLegacy->GetWhich())
{ // invalidate cached uno object
SetXBookmark(uno::Reference<text::XTextContent>(nullptr));
}
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index c9dce3e0a328..766791f772e1 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -105,7 +105,7 @@ namespace sw::mark {
protected:
// SwClient
- virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override;
+ virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
MarkBase(const SwPaM& rPaM, const OUString& rName);
std::unique_ptr<SwPosition> m_pPos1;