path: root/sw/source/filter/html/htmlreqifreader.cxx
diff options
authorMichael Stahl <>2020-11-13 20:52:28 +0100
committerMiklos Vajna <>2021-10-08 15:03:04 +0200
commit72669b98cf2c71fb0006b2d100248e8234b1b61b (patch)
tree2e1743caeb85321cbfb18a574a09d92a9fe87cf2 /sw/source/filter/html/htmlreqifreader.cxx
parenta543433c730eac8f91b49c6a7993ae26e67d309b (diff)
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.) (cherry picked from commit b9ef71476fd70bc13f50ebe80390e0730d1b7afb) Conflicts: sw/qa/extras/layout/layout2.cxx sw/source/core/layout/pagechg.cxx Change-Id: I3a3f1efe6d7ed28e05dc159a86abc3d702cc272b
Diffstat (limited to 'sw/source/filter/html/htmlreqifreader.cxx')
0 files changed, 0 insertions, 0 deletions