diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-06 22:56:14 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-07 11:40:54 +0100 |
commit | 43d07ddf487fae1b966abf00a36612b109ed01fc (patch) | |
tree | a74ed8cc60623ecd6d85785215300cc54e420b81 /sw/source/core/fields | |
parent | 70110bf540449c7a71b6404d576479fededf7172 (diff) |
SwUserFieldType: Modify no more
Change-Id: I1194225011380bf63d854f8054d063e93a832744
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107322
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/fields')
-rw-r--r-- | sw/source/core/fields/usrfld.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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(); } } |