sw/inc/usrfld.hxx | 2 +- sw/source/core/fields/usrfld.cxx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 43d07ddf487fae1b966abf00a36612b109ed01fc Author: Bjoern Michaelsen <[email protected]> AuthorDate: Sun Dec 6 22:56:14 2020 +0100 Commit: Bjoern Michaelsen <[email protected]> CommitDate: Mon Dec 7 11:40:54 2020 +0100 SwUserFieldType: Modify no more Change-Id: I1194225011380bf63d854f8054d063e93a832744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107322 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <[email protected]> diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx index 589c379a5d1c..3592c6834380 100644 --- a/sw/inc/usrfld.hxx +++ b/sw/inc/usrfld.hxx @@ -73,7 +73,7 @@ public: void dumpAsXml(xmlTextWriterPtr pWriter) const override; private: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; }; inline bool SwUserFieldType::IsValid() const diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx index 07a75a42608f..431a3ba0675f 100644 --- a/sw/source/core/fields/usrfld.cxx +++ b/sw/source/core/fields/usrfld.cxx @@ -213,18 +213,18 @@ OUString SwUserFieldType::GetName() const return m_aName; } -void SwUserFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwUserFieldType::SwClientNotify(const SwModify&, const SfxHint& rHint) { - if( !pOld && !pNew ) + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy->m_pOld && !pLegacy->m_pNew) m_bValidValue = false; - NotifyClients( pOld, pNew ); - + CallSwClientNotify(rHint); // update input fields that might be connected to the user field - if ( !IsModifyLocked() ) + if (!IsModifyLocked()) { LockModify(); - GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Input )->UpdateFields(); + GetDoc()->getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::Input)->UpdateFields(); UnlockModify(); } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
