sw/qa/extras/ooxmlexport/data/tdf169986_bottomSpacing.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport25.cxx | 9 +++++++++ sw/source/writerfilter/dmapper/PropertyMap.cxx | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit 094237055353f2806add9a2bd1c9e1139c2c09f6 Author: Justin Luth <[email protected]> AuthorDate: Mon Dec 15 15:50:45 2025 -0500 Commit: Miklos Vajna <[email protected]> CommitDate: Fri Dec 19 09:03:33 2025 +0100 tdf#169986 docx import: no sectPr belowSpacing to footnotes This fixes my 25.2.6 regression from commit 1326e09d019f05a82265f15c26288b4ffb7dc0c2 Author: Justin Luth on Mon Jul 28 09:29:51 2025 tdf#167657 only move sectPr bottomMargin after pageBreak Footnotes (and comments) are always a CloseSectionGroup disaster. The section's belowSpacing should never transfer into a footnote - it only applies to the body paragraphs. make CppunitTest_sw_ooxmlexport25 \ CPPUNIT_TEST_NAME=testTdf169986_bottomSpacing Change-Id: I848ccda2ce2bb84de951c6da8f4001d217b8b38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195683 Tested-by: Jenkins Reviewed-by: Justin Luth <[email protected]> (cherry picked from commit 01c39dcb622256a66bd11aaaa695729db9b27468) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195684 (cherry picked from commit b5637481d060d01094e7ceef959744d96547cdbb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195686 Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit e070494364f62e7d14ffcbfa87cafe708bacb1d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195709 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf169986_bottomSpacing.docx b/sw/qa/extras/ooxmlexport/data/tdf169986_bottomSpacing.docx new file mode 100644 index 000000000000..c4e50257b58c Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf169986_bottomSpacing.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx index c93d86e7a318..5ff428ab051c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx @@ -55,6 +55,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf166510_sectPr_bottomSpacing, "tdf166510_sectPr_b CPPUNIT_ASSERT_EQUAL(sal_Int32(4253), nHeight); } +DECLARE_OOXMLEXPORT_TEST(testTdf169986_bottomSpacing, "tdf169986_bottomSpacing.docx") +{ + // given with a continuous section break with a lot of below spacing, and several footnotes... + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + auto pLayout = parseLayoutDump(); + assertXPath(pLayout, "/root/page", 1); +} + DECLARE_OOXMLEXPORT_TEST(testTdf167657_sectPr_bottomSpacing, "tdf167657_sectPr_bottomSpacing.docx") { // given with a continuous break sectPr with no belowSpacing diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx b/sw/source/writerfilter/dmapper/PropertyMap.cxx index 73199cc513a3..bd25ce40b4b5 100644 --- a/sw/source/writerfilter/dmapper/PropertyMap.cxx +++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx @@ -1912,7 +1912,8 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) // to the last paragraph before the section page break // so that the consolidation/collapse of this section's 1st paragraph's aboveSpacing // works correctly (since below spacing before a page break otherwise has no relevance). - if (pPrevSection && pPrevSection->GetBelowSpacing().has_value() && m_xPreStartingRange.is()) + if (pPrevSection && pPrevSection->GetBelowSpacing().has_value() && m_xPreStartingRange.is() + && !rDM_Impl.IsInFootOrEndnote()) { try {
