svx/source/gallery2/galbrws1.cxx | 4 ++-- sw/source/core/frmedt/tblsel.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 1f4db830d183777f4d2d6a6f102945b84a9cff44 Author: Tejas Shukla <[email protected]> AuthorDate: Tue Dec 23 12:21:19 2025 +0530 Commit: Hossein <[email protected]> CommitDate: Fri Jan 2 18:00:43 2026 +0100 tdf#145538 Change some for loops to range based Change-Id: I283e8a07a7c31ae425a44ac8778920c2027673d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196146 Tested-by: Jenkins Reviewed-by: Hossein <[email protected]> diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 1f185ee7f420..1bd371b5a5d2 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -1577,8 +1577,8 @@ IMPL_LINK(GalleryBrowser, SearchHdl, weld::Entry&, searchEdit, void) } else { - for(std::set<OUString>::iterator foundIter = aFoundThemes.begin(); foundIter != aFoundThemes.end(); ++foundIter) - ImplInsertThemeEntry(mpGallery->GetThemeInfo(*foundIter)); + for (const auto& rThemeName : aFoundThemes) + ImplInsertThemeEntry(mpGallery->GetThemeInfo(rThemeName)); } mxThemes->select_text(curThemeName); SelectTheme(curThemeName); diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 0f1a7cb873f1..d92cb55bbb04 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2088,9 +2088,9 @@ static void FndBoxCopyCol( SwTableBox* pBox, FndPara* pFndPara ) pFndPara->pFndLine->GetBoxes().push_back( std::move(pFndBox) ); } -static void FndLineCopyCol( SwTableLine* pLine, FndPara* pFndPara ) +static void FndLineCopyCol( const SwTableLine* pLine, FndPara* pFndPara ) { - std::unique_ptr<FndLine_> pFndLine(new FndLine_(pLine, pFndPara->pFndBox)); + std::unique_ptr<FndLine_> pFndLine(new FndLine_(const_cast<SwTableLine*>(pLine), pFndPara->pFndBox)); FndPara aPara(*pFndPara, pFndLine.get()); for( auto& rpBox : pFndLine->GetLine()->GetTabBoxes() ) FndBoxCopyCol(rpBox, &aPara ); @@ -2102,8 +2102,8 @@ static void FndLineCopyCol( SwTableLine* pLine, FndPara* pFndPara ) void ForEach_FndLineCopyCol(SwTableLines& rLines, FndPara* pFndPara ) { - for( SwTableLines::iterator it = rLines.begin(); it != rLines.end(); ++it ) - FndLineCopyCol( *it, pFndPara ); + for(const auto& pLine: rLines) + FndLineCopyCol( pLine, pFndPara ); } void FndBox_::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
