sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 6 ++++++ writerfilter/source/dmapper/DomainMapper.cxx | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit f4f91c9e7ad9ad669f03fc9a09cd20fdfb53805b Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Fri Mar 10 12:45:35 2023 -0500 Commit: Justin Luth <jl...@mail.com> CommitDate: Fri Mar 10 20:40:36 2023 +0000 tdf#104394 writerfilter: no addDummyParaForTable when PrevFramed The dummy paragraph is only supposed to be added when the table starts the section. In this case, a framed paragraph was the first item in the section. Since it ends up being a floating item, it is probably not correct to turn off GetIsFirstParagraphInSection. In any case, this is a much more targetted fix, and thus much less likely to lead to regressions. Change-Id: I7fb2c6189ddbff5d46828b27d68667c9d4a31122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148656 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx new file mode 100644 index 000000000000..472d0723a9ac Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf104394_lostTextbox.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index b9432a32a47b..9e637fb937e7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -128,6 +128,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153592_columnBreaks) assertXPath(pXmlDoc, "//w:br", 2); } +DECLARE_OOXMLEXPORT_TEST(testTdf104394_lostTextbox, "tdf104394_lostTextbox.docx") +{ + // This was only one page b/c the textbox was missing. + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak, "tdf153613_anchoredAfterPgBreak.docx") { const auto& pLayout = parseLayoutDump(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index b7e94ff50e84..c526968fc8c0 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3173,7 +3173,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) */ if(m_pImpl->m_nTableDepth == 0 && m_pImpl->GetIsFirstParagraphInSection() && !m_pImpl->GetIsDummyParaAddedForTableInSection() && !m_pImpl->GetIsTextFrameInserted() - && !IsInHeaderFooter()) + && !m_pImpl->GetIsPreviousParagraphFramed() && !IsInHeaderFooter()) { m_pImpl->AddDummyParaForTableInSection(); }