sw/qa/extras/ooxmlexport/data/tdf164500_framePrBeforeTable2.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 5 +++++ sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 6 ++++++ 3 files changed, 11 insertions(+)
New commits: commit 041829c76877599ebf94c9b5bdfa94ec08132d9f Author: Justin Luth <jl...@mail.com> AuthorDate: Fri Aug 15 11:31:12 2025 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Fri Aug 15 21:27:29 2025 +0200 tdf#164500 writerfilter: make extra framePr anchor para tiny This reduces the layout impact of 25.8 commit 575094675e7f6fb643e8cac61f06c14d2f79bcd5 I initially just tried to make the paragraph simple (default), but that could still end up being overly large, so force a small size/margins/lineSpacing as well to make this added paragraph as inconspicuous as possible. make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf164500_framePrBeforeTable2 Change-Id: I0c91048d206037b3427c6aa4704d65bb9f677435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189702 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/qa/extras/ooxmlexport/data/tdf164500_framePrBeforeTable2.docx b/sw/qa/extras/ooxmlexport/data/tdf164500_framePrBeforeTable2.docx new file mode 100644 index 000000000000..1c5c74985531 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf164500_framePrBeforeTable2.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index 9b21067e9dc0..a84ad54ac5b4 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -204,6 +204,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf164500_framePrBeforeTable, "tdf164500_framePrBef CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTables->getCount()); } +DECLARE_OOXMLEXPORT_TEST(testTdf164500_framePrBeforeTable2, "tdf164500_framePrBeforeTable2.docx") +{ + CPPUNIT_ASSERT_EQUAL_MESSAGE("Everything should fit on one page", 1, getPages()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf146984_anchorInShape, "tdf146984_anchorInShape.docx") { // This was only one page b/c the page break was missing. diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index dc309d04483f..56666177af30 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -2628,8 +2628,14 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con uno::UNO_QUERY); xMPS->setAllPropertiesToDefault(); uno::Reference<beans::XPropertySet> xPS(xCursor, uno::UNO_QUERY); + // try to make this additional paragraph inconspicuous xPS->setPropertyValue(u"ParaStyleName"_ustr, uno::Any(u"Standard"_ustr)); + xPS->setPropertyValue(u"CharHeight"_ustr, uno::Any(float(2.0))); + xPS->setPropertyValue(u"ParaTopMargin"_ustr, uno::Any(sal_Int32(0))); + xPS->setPropertyValue(u"ParaBottomMargin"_ustr, uno::Any(sal_Int32(0))); + const style::LineSpacing aSingle(style::LineSpacingMode::PROP, 100); + xPS->setPropertyValue(u"ParaLineSpacing"_ustr, uno::Any(aSingle)); } // If different frame properties are set on this paragraph, keep them.