tdf#152872 sw: conditionally hide paragraph breaks
commit9f028707e78c85b99c587287328fc5fc000b42f4
authorMichael Stahl <michael.stahl@allotropia.de>
Fri, 6 Jan 2023 18:07:35 +0000 (6 19:07 +0100)
committerAndras Timar <andras.timar@collabora.com>
Mon, 23 Jan 2023 08:41:34 +0000 (23 09:41 +0100)
tree90a4738820f027845754e38b1acb1907bfbef665
parentd7f69ddc137a9cb13d1da77602d76e54d8fb93ad
tdf#152872 sw: conditionally hide paragraph breaks

Add a 3rd kind of hiding to SwRootFrame and CheckParaRedlineMerge().

This is quite simple as only consecutive paragraphs are merged.

There is an existing similar feature described in
http://www.openoffice.org/specs/writer/hidden_text/hidden_text.sxw
which results in 0-height text frames if all text is hidden
- but that is unconditional, while Word shows the paragraph when
control chars are shown, and hides it otherwise *iff* its paragraph
marker is hidden (and there's no page break on it).

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145162
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 2bcfb7231b5ca74f02274cfb74ca8463f78905d6)

tdf#152872 sw: fix crash on ooo27109-1.sxw
Has a redline that ends on the body end node.
(regression from commit 2bcfb7231b5ca74f02274cfb74ca8463f78905d6)
(cherry picked from commit 29507e398d27bdfceb9155d24a20986ee997d70c)

Change-Id: I8290962ea58278e17b8f84bf6b2ca4bb2325aa8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145296
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
12 files changed:
sw/inc/doc.hxx
sw/qa/extras/layout/data/hidden-para-separator.docx [new file with mode: 0644]
sw/qa/extras/layout/layout2.cxx
sw/source/core/doc/doctxm.cxx
sw/source/core/docnode/ndsect.cxx
sw/source/core/inc/UndoSection.hxx
sw/source/core/inc/rootfrm.hxx
sw/source/core/layout/newfrm.cxx
sw/source/core/layout/wsfrm.cxx
sw/source/core/text/redlnitr.cxx
sw/source/core/undo/unsect.cxx
sw/source/core/view/viewsh.cxx