diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-08-16 09:34:49 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-08-16 10:43:46 +0200 |
commit | 1cf29168840f84c2e946e2678b99988e83503c96 (patch) | |
tree | 089b8696995ac8dd7276cba6fdd1df67b3939ef2 /sw/source | |
parent | fa728837ecab38b59c2c562ed48505f204a89bea (diff) |
tdf#156682 sw floattable: fix missing del of master anchor para por on split
Pressing "enter" at the end of B1 in the bugdoc resulted in a split
floating table, which had the anchor text duplicated (both on page 1 and
page2).
What happened is that the master anchor frame didn't have its paragraph
portion cleared, the follow anchor frame had a correct frame offset (of
0).
Fix the problem in SwTextFrame::FormatEmpty(), similar to what commit
00b9b33334791079c2dc26b1ed4c123450cabf7d (sw: call FormatEmpty() in
SwTextFrame::Format() for split fly masters, 2023-02-09), did; here what
we want to avoid is setting some properties on the paragraph preventing
the deletion of non-last anchor paragraph portions.
As a side effect, this also fixes the hang from the bugreport, after
pressing "enter" 5 times at the end of B1.
Change-Id: I16e6d786f02ad503a0fdff465ecf7716c1c5f8b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155732
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/text/porrst.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 255318119f87..5c6ea428c1db 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -413,7 +413,7 @@ bool SwTextFrame::FormatEmpty() // Split fly frames: non-last parts of the anchor want this optimization to clear the old // content. bool bHasNonLastSplitFlyDrawObj = HasNonLastSplitFlyDrawObj(); - if ((HasFollow() && !bHasNonLastSplitFlyDrawObj) || GetMergedPara() || GetTextNodeFirst()->GetpSwpHints() || + if ((HasFollow() && !bHasNonLastSplitFlyDrawObj) || GetMergedPara() || (GetTextNodeFirst()->GetpSwpHints() && !bHasNonLastSplitFlyDrawObj) || nullptr != GetTextNodeForParaProps()->GetNumRule() || GetTextNodeFirst()->HasHiddenCharAttribute(true) || IsInFootnote() || ( HasPara() && GetPara()->IsPrepMustFit() ) ) |