sw/source/core/layout/fly.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 25b8fdd3b939a221ba00ca37fbf89adaf893aab7
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 09:52:41 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

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 04fc8fb823d8..78aa7f604b20 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1441,7 +1441,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