sw/source/core/attr/cellatr.cxx | 10 ++-------- sw/source/core/undo/rolbck.cxx | 8 ++------ sw/source/core/undo/untbl.cxx | 4 +--- 3 files changed, 5 insertions(+), 17 deletions(-)
New commits: commit 8a3dc12a13a3b9e99dbd5000ca6a1d541cf472f7 Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Sat Mar 4 02:18:58 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Mar 14 10:25:01 2023 +0000 remove support for TBL_BOXNAME TBL_RELBOXNAME in ChangeState * PtrToBoxNm and ToRelBoxNm are both public -- use just them directly instead. Change-Id: I7b0e377a13f00a3e0ab90e1cd12325672a83d16f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148213 Tested-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 3fdfb0772c6a..4e4e9440463f 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -124,20 +124,14 @@ void SwTableBoxFormula::ChangeState( const SfxPoolItem* pItem ) // reset value flag ChgValid( false ); break; + case TBL_RELBOXNAME: case TBL_BOXNAME: - if( &pTableNd->GetTable() == pUpdateField->m_pTable ) - // use external rendering - PtrToBoxNm( pUpdateField->m_pTable ); + assert(false); // PtrToBoxNm and ToRelBoxNm are both public -- use just them directly break; case TBL_BOXPTR: // internal rendering BoxNmToPtr( &pTableNd->GetTable() ); break; - case TBL_RELBOXNAME: - if( &pTableNd->GetTable() == pUpdateField->m_pTable ) - // relative rendering - ToRelBoxNm( pUpdateField->m_pTable ); - break; case TBL_SPLITTBL: if( &pTableNd->GetTable() == pUpdateField->m_pTable ) diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 78547546fb08..642e2ed77d62 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -105,9 +105,7 @@ SwHistorySetFormat::SwHistorySetFormat( const SfxPoolItem* pFormatHt, SwNodeOffs auto pCpyTable = const_cast<SwTable*>(&pTableNode->GetTable()); pCpyTable->SwitchFormulasToExternalRepresentation(); rNew.ChgDefinedIn(rOld.GetDefinedIn()); - SwTableFormulaUpdate aMsgHint(pCpyTable); - aMsgHint.m_eFlags = TBL_RELBOXNAME; - rNew.ChangeState(&aMsgHint); + rNew.ToRelBoxNm(pCpyTable); } } } @@ -883,9 +881,7 @@ SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet, auto pCpyTable = const_cast<SwTable*>(&pTableNode->GetTable()); pCpyTable->SwitchFormulasToExternalRepresentation(); rNew.ChgDefinedIn(rOld.GetDefinedIn()); - SwTableFormulaUpdate aMsgHint(pCpyTable); - aMsgHint.m_eFlags = TBL_BOXNAME; - rNew.ChangeState(&aMsgHint); + rNew.PtrToBoxNm(pCpyTable); } } } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index ba3446f3c162..1d135cef7d28 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -919,9 +919,7 @@ sal_uInt16 SaveTable::AddFormat( SwFrameFormat* pFormat, bool bIsLine ) const_cast<SwTable*>(m_pSwTable)->SwitchFormulasToExternalRepresentation(); SwTableBoxFormula* pFormulaItem = const_cast<SwTableBoxFormula*>(pItem); pFormulaItem->ChgDefinedIn(pFormat); - SwTableFormulaUpdate aMsgHint(m_pSwTable); - aMsgHint.m_eFlags = TBL_RELBOXNAME; - pFormulaItem->ChangeState(&aMsgHint); + pFormulaItem->ToRelBoxNm(m_pSwTable); pFormulaItem->ChgDefinedIn(nullptr); } }