sw/inc/hintids.hxx               |    1 -
 sw/source/core/fields/ddefld.cxx |    7 -------
 sw/source/core/fields/ddetbl.cxx |   10 +---------
 3 files changed, 1 insertion(+), 17 deletions(-)

New commits:
commit 383f70fa9ed0ec7acd6fbc4e921bb5b91fde4689
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Tue Mar 28 00:39:39 2023 +0200
Commit:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
CommitDate: Sat Apr 1 20:02:38 2023 +0200

    RES_UPDATEDDETBL no more
    
    - SwDDETable doesnt handle the hint anymore (it used to do a
      ChangeContent triggered by it)
    - SwDDEFieldType::UpdateDDE doesnt create the hint anymore -- it used
      to send it via UpdateTextNode, which would call
      SwTextNode::TriggerNodeUpdate for some types, but not for SwFieldIds::Dde
    - ... so the hint sent is never received by anyone who cares
    
    - SwDDEFieldType::UpdateDDE calls ChangeContent on all DDETables
      directly in UpdateDDE anyway, so the dead code is likely just
      obsolete.
    
    Change-Id: I85301ef89998508031833f35c4a2c93e7acb112e
    
    Change-Id: Iaef54e27869947fb7f57d1575e9e0f59f903befd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149656
    Tested-by: Jenkins
    Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org>

diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index a8418566f5ec..5e84921ec832 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -433,7 +433,6 @@ constexpr TypedWhichId<SwFormatChg> RES_FMT_CHG(168);
 constexpr TypedWhichId<SwAttrSetChg> RES_ATTRSET_CHG(169);
 constexpr TypedWhichId<SwUpdateAttr> RES_UPDATE_ATTR(170);
 constexpr TypedWhichId<SwPtrMsgPoolItem> RES_REFMARKFLD_UPDATE(171);
-constexpr TypedWhichId<SwMsgPoolItem> RES_UPDATEDDETBL(174);
 constexpr TypedWhichId<SwMsgPoolItem> RES_TBLHEADLINECHG(175);
 constexpr TypedWhichId<SwAutoFormatGetDocNode> RES_AUTOFMT_DOCNODE(176);
 constexpr TypedWhichId<SwMsgPoolItem> RES_HIDDENPARA_PRINT(178);
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index cf4c93c97122..46ac3d504955 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -315,13 +315,6 @@ void SwDDEFieldType::UpdateDDE(const bool bNotifyShells)
             pSh->StartAction();
     }
 
-    // DDE fields attribute in the text
-    SwMsgPoolItem aUpdateDDE(RES_UPDATEDDETBL);
-    for(auto pFormatField: vFields)
-    {
-        if(pFormatField->GetTextField())
-            pFormatField->UpdateTextNode(nullptr, &aUpdateDDE);
-    }
     // a DDE tables in the text
     for(auto pTable: vTables)
         pTable->ChangeContent();
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index 01bfa5209dd6..7324c24c5db9 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -87,15 +87,7 @@ void SwDDETable::SwClientNotify(const SwModify& rModify, 
const SfxHint& rHint)
 {
     if (rHint.GetId() == SfxHintId::SwLegacyModify)
     {
-        auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint);
-        switch(pLegacy->GetWhich())
-        {
-            case RES_UPDATEDDETBL:
-                ChangeContent();
-                break;
-            default:
-                SwTable::SwClientNotify(rModify, rHint);
-        }
+        SwTable::SwClientNotify(rModify, rHint);
     }
     else if (rHint.GetId() == SfxHintId::SwField)
     {

Reply via email to