sw/source/core/frmedt/fetab.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
New commits: commit 91e688980ce82ac3361a1efe44f0c3804b387ba4 Author: siddhi <[email protected]> AuthorDate: Tue Oct 14 21:51:52 2025 +0530 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Thu Oct 16 19:56:32 2025 +0200 tdf#145538 Use range based for loops in fetab.cxx Change-Id: I38d8c53763cee7c2313100c81b49b8073b3b2f3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192403 Reviewed-by: Ilmari Lauhakangas <[email protected]> Tested-by: Jenkins diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 10d872f83a96..17a23562bb6e 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -323,9 +323,8 @@ bool SwFEShell::DeleteCol() ? static_cast<SwTextFrame*>(pFrame)->GetTextNodeFirst()->FindTableNode() : static_cast<SwNoTextFrame*>(pFrame)->GetNode()->FindTableNode(); - for (size_t i = 0; i < aBoxes.size(); ++i) + for (SwTableBox *pBox : aBoxes) { - SwTableBox *pBox = aBoxes[i]; if ( pBox->GetSttNd() ) { SwNodeIndex aIdx( *pBox->GetSttNd(), 1 ); @@ -1370,9 +1369,8 @@ bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const aBoxes.insert( pBox ); } - for (size_t i = 0; i < aBoxes.size(); ++i) + for (SwTableBox *pBox : aBoxes) { - SwTableBox *pBox = aBoxes[i]; if ( pBox->GetSttNd() ) { SwNodeIndex aIdx( *pBox->GetSttNd(), 1 ); @@ -1469,9 +1467,8 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, else { const SwTableSortBoxes& rTBoxes = pTableNode->GetTable().GetTabSortBoxes(); - for (size_t n = 0; n < rTBoxes.size(); ++n) + for (SwTableBox* pBox : rTBoxes) { - SwTableBox* pBox = rTBoxes[ n ]; aBoxes.insert( pBox ); } } @@ -1508,9 +1505,8 @@ bool SwFEShell::GetTableAutoFormat( SwTableAutoFormat& rGet ) else { const SwTableSortBoxes& rTBoxes = pTableNd->GetTable().GetTabSortBoxes(); - for (size_t n = 0; n < rTBoxes.size(); ++n) + for (SwTableBox* pBox : rTBoxes) { - SwTableBox* pBox = rTBoxes[ n ]; aBoxes.insert( pBox ); } }
