diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-09-28 09:03:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-09-28 09:52:41 +0200 |
commit | 25b8fdd3b939a221ba00ca37fbf89adaf893aab7 (patch) | |
tree | d727757d3bb7f17febd2003be5743f7511dc9b75 | |
parent | 5d490133efe7a2509515ac6d85ed3db0a7988b3c (diff) |
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 <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/source/core/layout/fly.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |