summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/flylay.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-10-02 14:23:20 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-10-02 16:32:27 +0200
commit29d7ece94318d3f03d079dff33ec15ff74f8febf (patch)
tree2db2fccf3d96b4b62e8ae0399d3209cadacec7fb /sw/source/core/layout/flylay.cxx
parent2e6d82e94f3efc76ea4243bc67b3acbfc74d8b39 (diff)
tdf#124601 sw FollowTextFlow: fix hori pos of objects outside the current cell
The problem is that the image in the bugdoc's footer is anchored in one cell, but its position has a value that shifts it to the next column and next row. The next column is the problem for the horizontal position. So build on top of the previous vertical position fix, and make sure that CalcRelPosX() doesn't limit the position inside the current cell for an in-table, follow-text-flow, wrap-though image. Once that's in place, make sure that we don't try to grow the cell due to follow-text-flow, wrap-though objects in CalcPosition(), since in a wrap-through vs follow-text-flow situation, the wrap-though should have priority (should not affect size of cells). Finally, now that cells don't grow in this case, the previously added special-casing of footers in SwFlyFreeFrame::CheckClip() is no longer necessary. Not growing the cells means we don't try to re-position the object. Change-Id: Ic55e4b5188704fa70314f91fe9a01987b6a56d7b Reviewed-on: https://gerrit.libreoffice.org/80032 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/layout/flylay.cxx')
-rw-r--r--sw/source/core/layout/flylay.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 1589c12670fe..4a7030ea241e 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -501,11 +501,11 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
!GetDrawObjs() && !GetAnchorFrame()->IsInTab() )
{
SwFrame* pHeader = FindFooterOrHeader();
- // In a header or footer, correction of the position is no good idea.
+ // In a header, correction of the position is no good idea.
// If the fly moves, some paragraphs have to be formatted, this
// could cause a change of the height of the headerframe,
// now the flyframe can change its position and so on ...
- if ( !pHeader )
+ if ( !pHeader || !pHeader->IsHeaderFrame() )
{
const long nOld = getFrameArea().Top();