sw/inc/swddetbl.hxx | 1 - sw/source/core/fields/ddetbl.cxx | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-)
New commits: commit 5337c4beb445d49b6dc3094d9f05d0c884bcab45 Author: Bjoern Michaelsen <[email protected]> AuthorDate: Sun Dec 6 00:00:53 2020 +0100 Commit: Bjoern Michaelsen <[email protected]> CommitDate: Sun Dec 6 01:55:29 2020 +0100 SwDDETable: Modify no more Change-Id: I6b9bd54835ba6abc4ab9184c49c684d9c387bda4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107268 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <[email protected]> diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx index 47cbb5a66cae..b21b1a5993f2 100644 --- a/sw/inc/swddetbl.hxx +++ b/sw/inc/swddetbl.hxx @@ -41,7 +41,6 @@ public: inline const SwDDEFieldType* GetDDEFieldType() const; private: - virtual void Modify(const SfxPoolItem*, const SfxPoolItem*) override; virtual void SwClientNotify(const SwModify&, const SfxHint&) override; }; diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx index 53f6c2c3f7e7..1be2200fae3b 100644 --- a/sw/source/core/fields/ddetbl.cxx +++ b/sw/source/core/fields/ddetbl.cxx @@ -82,18 +82,20 @@ SwDDETable::~SwDDETable() } } -void SwDDETable::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwDDETable::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { - if( pNew && RES_UPDATEDDETBL == pNew->Which() ) - ChangeContent(); - else - SwTable::Modify( pOld, pNew ); -} - -void SwDDETable::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) -{ - SwClient::SwClientNotify(rModify, rHint); - if(auto pFieldHint = dynamic_cast<const SwFieldHint*>(&rHint)) + if(auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) + { + switch(pLegacy->GetWhich()) + { + case RES_UPDATEDDETBL: + ChangeContent(); + break; + default: + SwTable::SwClientNotify(rModify, rHint); + } + } + else if(auto pFieldHint = dynamic_cast<const SwFieldHint*>(&rHint)) { pFieldHint->m_pPaM->DeleteMark(); // TODO: this is really hackish // replace DDETable by real table _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
