sw/source/uibase/utlui/content.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cafcc50570f9edaaebe74d2152bae5df1cc2edfe
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:25 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/+/162279
    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 3bf29979ddf3..4e6704140334 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -6085,13 +6085,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;
                         }
                     }
                 }

Reply via email to