sw/source/core/layout/tabfrm.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 8fae3b4d33898d6703c2bca0e4ad8c7c02a08a67
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Sep 4 08:26:26 2024 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Sep 4 11:50:03 2024 +0200

    Clarify the logic a bit
    
    Change-Id: Ia7ff63f6651e3003e25b1552f6fe22548df2fb81
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172814
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 77e5abd83a86..010e15486bce 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -3357,11 +3357,13 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
         text::WrapTextMode nSurround = 
pFly->GetFormat()->GetSurround().GetSurround();
         // If the frame format is a TextBox of a draw shape,
         // then use the surround of the original shape.
-        bool bWrapThrough = nSurround == text::WrapTextMode_THROUGH;
-        SwTextBoxHelper::getShapeWrapThrough(pFly->GetFormat(), bWrapThrough);
-        if (bWrapThrough)
-            continue;
-        if (!bWrapThrough && nSurround == text::WrapTextMode_THROUGH)
+        {
+            bool bWrapThrough = nSurround == text::WrapTextMode_THROUGH;
+            SwTextBoxHelper::getShapeWrapThrough(pFly->GetFormat(), 
bWrapThrough);
+            if (bWrapThrough)
+                continue;
+        }
+        if (nSurround == text::WrapTextMode_THROUGH)
             nSurround = text::WrapTextMode_PARALLEL;
 
         bool bShiftDown = css::text::WrapTextMode_NONE == nSurround;

Reply via email to