Files
loongoffice/sw/source/core/attr
Miklos Vajna 00b9b33334 sw: call FormatEmpty() in SwTextFrame::Format() for split fly masters
The problem was that the text in the anchor frame of a split fly frame
was duplicated on the old page and the new page as well. The reason for
this seems to be that the master has no content and the follow has all
the content (this is wanted), but then there is no code to explicitly
clear the master.

In other cases the master always gets some new content where portion
building for that new content starts by throwing away the old portions.

Once SwTextFrame::Format() and SwTextFrame::FormatEmpty() explicitly
checks for these master anchors, the unwanted text in the master anchor
disappears.

An extra tweak is needed in SwTextFrame::PaintEmpty() to even hide the
paragraph marker: this frame is empty but has a follow frame, so we
should not show a paragraph marker there.

Finally introduce a SwTextFrame::HasNonLastSplitFlyDrawObj() to be able
to check for this "empty master anchor for split fly" case at a single
place.

With this <https://bugs.documentfoundation.org/attachment.cgi?id=185144>
from <https://bugs.documentfoundation.org/show_bug.cgi?id=61594> gets
laid out reasonably: the position is not perfect but we detect that only
1 para of the text frame fits page 1, we create a 2nd page and we
correctly move exactly the text frame's 2nd para to page 2.

Change-Id: I871bba2de5b829e667d5cfb1cbe0ba4cc2274edd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146680
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-02-09 08:25:07 +00:00
..
2022-09-25 20:01:53 +02:00