summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/layout/data/tdf134298.ott
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-11-13 20:52:28 +0100
committerGabor Kelemen <kelemeng@ubuntu.com>2021-12-10 15:58:31 +0100
commit38b997ebdd80e5a652bba3e24760e704d0f0e3ea (patch)
tree79398514fdfc1212e9d4f6f0579bb9dd00097c80 /sw/qa/extras/layout/data/tdf134298.ott
parent(related tdf#134298) sw: layout: avoid infinite loop in InternalAction() (diff)
downloadcore-38b997ebdd80e5a652bba3e24760e704d0f0e3ea.tar.gz
core-38b997ebdd80e5a652bba3e24760e704d0f0e3ea.zip
tdf#134298 sw: layout: remove left-over page frame without content
Once tdf#138039 is fixed, this bugdoc has an additional empty page 3. This is because it first goes to 3 pages, and then the SwTextFrame on page does a MoveBwd, leaving behind a page frame with just a body frame and nothing else. It turns out that SwRootFrame::RemoveSuperfluous() only removes empty frames at the end of the document, but here there's a non-empty frame following it. Also, this function doesn't handle cases like right/left page styles so it can't delete pages in the middle. SwFrame::CheckPageDescs() doesn't remove page frames that don't have content, it only removes those that have the intentionally-empty flag set. Extend CheckPageDescs() to also remove page frames that don't have content, and make sure it is called when SwContentFrame::Cut() removes the last content from a page frame (it will be called after all pages are valid in SwLayAction::InternalAction()). (Alternatively it might be possible to prevent the problem from occurring in SwTextFly::ForEach() by ignoring the fly so that the first paragraph never leaves page 1, but we didn't explore that.) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105810 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit b9ef71476fd70bc13f50ebe80390e0730d1b7afb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114097 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Change-Id: I3a3f1efe6d7ed28e05dc159a86abc3d702cc272b
Diffstat (limited to 'sw/qa/extras/layout/data/tdf134298.ott')
-rw-r--r--sw/qa/extras/layout/data/tdf134298.ottbin0 -> 40880 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134298.ott b/sw/qa/extras/layout/data/tdf134298.ott
new file mode 100644
index 000000000000..effb595eb328
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf134298.ott
Binary files differ