summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-01-06 19:07:35 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-01-10 15:44:27 +0000
commit2bcfb7231b5ca74f02274cfb74ca8463f78905d6 (patch)
tree94de4f27856b2aaddf2664dc507211d4885bd10e /sw/source/core/doc
parent5b49927760fc4b5f5563a39646e3e5fe23c7fbc5 (diff)
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). Change-Id: I8290962ea58278e17b8f84bf6b2ca4bb2325aa8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145162 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/doctxm.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 5578a503dcfd..5f54e5313f70 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -363,12 +363,13 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPaM& aPam,
OUString sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), rTOX.GetTOXName() );
SwSectionData aSectionData( SectionType::ToxContent, sSectNm );
- std::tuple<SwTOXBase const*, sw::RedlineMode, sw::FieldmarkMode> const tmp(
+ std::tuple<SwTOXBase const*, sw::RedlineMode, sw::FieldmarkMode, sw::ParagraphBreakMode> const tmp(
&rTOX,
pLayout && pLayout->IsHideRedlines()
? sw::RedlineMode::Hidden
: sw::RedlineMode::Shown,
- pLayout ? pLayout->GetFieldmarkMode() : sw::FieldmarkMode::ShowBoth);
+ pLayout ? pLayout->GetFieldmarkMode() : sw::FieldmarkMode::ShowBoth,
+ pLayout ? pLayout->GetParagraphBreakMode() : sw::ParagraphBreakMode::Shown);
SwTOXBaseSection *const pNewSection = dynamic_cast<SwTOXBaseSection *>(
InsertSwSection(aPam, aSectionData, & tmp, pSet, false));
if (pNewSection)