diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-06 00:00:53 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-06 01:55:29 +0100 |
commit | 5337c4beb445d49b6dc3094d9f05d0c884bcab45 (patch) | |
tree | 52631cdb776ba15247b6b5967dc30f394a0feedc /sw/source | |
parent | a0f97e40ce078b044893061933c329c103f91269 (diff) |
SwDDETable: Modify no more
Change-Id: I6b9bd54835ba6abc4ab9184c49c684d9c387bda4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107268
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/fields/ddetbl.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
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 |