sw/source/uibase/utlui/content.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 2e65401cf50ca25e16a0f3d4b624e2b48c97644c Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Thu Jan 18 21:52:37 2024 -0900 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Jan 21 13:17:35 2024 +0100 tdf#159147 followup Avoid unnecessary looping by immediate return from the function after bringing content to attention. Change-Id: I670dc5d0991d96e7ce2872d329e969f9c341d163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162291 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> (cherry picked from commit a08197e7c376c72685260ae923483ae99f929d35) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162280 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index f5af1e759738..bcc6aaebb383 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -5670,13 +5670,13 @@ void SwContentTree::BringEntryToAttention(const weld::TreeIter& rEntry) for (auto n = pFormats->size(); 1 < n;) { SwIterator<SwTextINetFormat, SwCharFormat> aIter(*(*pFormats)[--n]); - for (SwTextINetFormat* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) + for (SwTextINetFormat* pFnd = aIter.First(); pFnd; pFnd = aIter.Next()) { if (pTextINetFormat == pFnd) { BringURLFieldsToAttention(SwGetINetAttrs {SwGetINetAttr(pCnt->GetName(), *pTextINetFormat)}); - break; + return; } } }