summaryrefslogtreecommitdiff
path: root/sw/source/core/inc/frame.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-09-01 08:51:20 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-09-01 11:00:20 +0200
commit7d4213b9f0253b323750acceca8f4edb9d1a7fc5 (patch)
treeb83083657d3681a76f2ab358f3a7db8ecfcac662 /sw/source/core/inc/frame.hxx
parent7aca867aa1e1e675c0a9d27d76bd069bc6d5f512 (diff)
Related: tdf#156318 sw floattable: fix handling of vert orient == top
The bugdoc resulted in a layout loop on load. It was created by forcing pages to be in a single column + increasing the top+bottom margin of the page to 2.5cm. The problem was that the SwFormatVertOrient's m_eOrient is usually text::VertOrientation::NONE ("from top" with 0 offset), but here it's text::VertOrientation::TOP. These are meant to be more or less equivalent, but SwToContentAnchoredObjectPosition::CalcPosition() has different codepath for them. Fix the problem by making sure that TOP doesn't have a vertical offset for follow fly frame: do this by realizing that in case the "orient frame" and the "anchor" is not the same that may need no action, since the fly frame case changes the "orient" to the follow anchor and the "anchor" is the master anchor. The original scenario still needs more work, we don't hang anymore but the follow fly appears on page 3 instead of page 2. Change-Id: I1596a07b78575583070d494ddb8e1400e5653820 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156392 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/inc/frame.hxx')
-rw-r--r--sw/source/core/inc/frame.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index d405da36515b..d57654f6a9e7 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -874,6 +874,8 @@ public:
inline bool IsTextFrame() const;
SwTextFrame* DynCastTextFrame();
const SwTextFrame* DynCastTextFrame() const;
+ SwPageFrame* DynCastPageFrame();
+ const SwPageFrame* DynCastPageFrame() const;
inline bool IsNoTextFrame() const;
// Frames where its PrtArea depends on their neighbors and that are
// positioned in the content flow