diff options
author | Attila Szűcs <szucs.attila3@nisz.hu> | 2021-11-18 11:02:01 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-11-29 09:34:07 +0100 |
commit | 41cc1d2c0c0c3bfa5ba341311f68df05375859fb (patch) | |
tree | 0aeb601b0714345e49bc99339bfe5fb5da27b077 /sw/source/core/doc | |
parent | d9105d434ac6127f151843c7a7dbcd16257fcc0b (diff) |
tdf#54465 tdf#139336 sw: add compat. flag for footnote in column
Add compatibility option FOOTNOTE_IN_COLUMN_TO_PAGEEND to keep layout
of old ODT files, where multicolumn sections have footnotes in columns,
growing sections to the full page.
Note: Multicolumn page styles or not evenly distributed multicolumn
sections, or footnotes not collected at the end of the sections still
use footnotes in columns, so they don't need this compatibility option.
Follow-up to commit 4c31b4ef2083087a822c3ae648fd09acc67d2f88
"tdf#139336 sw: fix extra pages of multicolumn sections with footnotes".
Co-authored-by: Tibor Nagy (NISZ)
Change-Id: I7d6a1f804b555dc5372767014b8fb5e3fa57ba9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125442
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/DocumentSettingManager.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 883ab4736e73..2776422caf8e 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -102,7 +102,8 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) mbProtectFields(false), mbHeaderSpacingBelowLastPara(false), mbFrameAutowidthWithMorePara(false), - mbGutterAtTop(false) + mbGutterAtTop(false), + mbFootnoteInColumnToPageEnd(false) // COMPATIBILITY FLAGS END { @@ -238,6 +239,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const case DocumentSettingId::FRAME_AUTOWIDTH_WITH_MORE_PARA: return mbFrameAutowidthWithMorePara; case DocumentSettingId::GUTTER_AT_TOP: return mbGutterAtTop; + case DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND: return mbFootnoteInColumnToPageEnd; default: OSL_FAIL("Invalid setting id"); } @@ -503,6 +505,9 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo case DocumentSettingId::GUTTER_AT_TOP: mbGutterAtTop = value; break; + case DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND: + mbFootnoteInColumnToPageEnd = value; + break; default: OSL_FAIL("Invalid setting id"); } @@ -679,6 +684,7 @@ void sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSetti // No mbProtectFields: this is false by default everywhere mbHeaderSpacingBelowLastPara = rSource.mbHeaderSpacingBelowLastPara; mbFrameAutowidthWithMorePara = rSource.mbFrameAutowidthWithMorePara; + mbFootnoteInColumnToPageEnd = rSource.mbFootnoteInColumnToPageEnd; } sal_uInt32 sw::DocumentSettingManager::Getn32DummyCompatibilityOptions1() const @@ -990,7 +996,7 @@ void sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbFrameAutowidthWithMorePara")); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), - BAD_CAST(OString::boolean(mbFrameAutowidthWithMorePara).getStr())); + BAD_CAST(OString::boolean(mbFrameAutowidthWithMorePara).getStr())); (void)xmlTextWriterEndElement(pWriter); (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbGutterAtTop")); @@ -998,6 +1004,11 @@ void sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter) const BAD_CAST(OString::boolean(mbGutterAtTop).getStr())); (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbFootnoteInColumnToPageEnd")); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), + BAD_CAST(OString::boolean(mbFootnoteInColumnToPageEnd).getStr())); + (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterEndElement(pWriter); } |