sw/source/core/text/txtfld.cxx |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 09e04efc7c33407271819c1fe7d4d500ca8fff2a
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Oct 25 11:47:56 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Oct 25 13:30:47 2023 +0200

    Simplify a bit
    
    Change-Id: I6b98dd9b383b82c5bcba9235d81b0a9a63a918b2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158430
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index a912e169995b..a728c36aec8b 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -64,14 +64,10 @@ static bool lcl_IsInBody( SwFrame const *pFrame )
 {
     if ( pFrame->IsInDocBody() )
         return true;
-    else
-    {
-        const SwFrame *pTmp = pFrame;
-        const SwFlyFrame *pFly;
-        while ( nullptr != (pFly = pTmp->FindFlyFrame()) )
-            pTmp = pFly->GetAnchorFrame();
-        return pTmp->IsInDocBody();
-    }
+
+    while (const SwFlyFrame* pFly = pFrame->FindFlyFrame())
+        pFrame = pFly->GetAnchorFrame();
+    return pFrame->IsInDocBody();
 }
 
 SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,

Reply via email to