sw/source/core/layout/fly.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 60e2fdf1d7e8346e5a3835369c47e582c737ce20
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu Sep 28 09:03:27 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Sep 28 12:14:57 2023 +0200

    sw floattable: maintain the invariant that fly height is at least MINFLY
    
    Fixes these warnings on loading 
sw/qa/core/layout/data/floattable-in-inlinetable.docx:
    
    warn:legacy.osl:6908:6908:sw/source/core/layout/flylay.cxx:703: 
<SwFlyFreeFrame::CheckClip(..)> - fly frame has negative height now.
    warn:legacy.osl:6908:6908:sw/source/core/layout/flylay.cxx:295: 
SwFlyFreeFrame::Format(), flipping Fly.
    
    Change-Id: I20d01e3289ea597a5b5f4ee43a5e1b892a618648
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157347
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 25b8fdd3b939a221ba00ca37fbf89adaf893aab7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157316
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 039aeb549f77..7fc0a566b9d5 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1443,7 +1443,7 @@ void SwFlyFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorderA
                 SwTwips nDeadline = GetFlyAnchorBottom(this, *pAnchor);
                 SwTwips nTop = aRectFnSet.GetTop(getFrameArea());
                 SwTwips nBottom = aRectFnSet.GetTop(getFrameArea()) + 
nRemaining;
-                if (nBottom > nDeadline)
+                if (nBottom > nDeadline && nDeadline > nTop)
                 {
                     nRemaining = nDeadline - nTop;
                 }

Reply via email to