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 5ee30d863a310d2f6ddb18c613283a80b36e7c5c Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Fri Mar 10 12:45:35 2023 -0500 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Mar 13 10:29:21 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> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148670 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> 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 ce1aec0fa07f..1d2c3712570e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -87,6 +87,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf153526_commentInNumbering, "tdf153526_commentInN CPPUNIT_ASSERT_EQUAL(13, getParagraphs()); } +DECLARE_OOXMLEXPORT_TEST(testTdf104394_lostTextbox, "tdf104394_lostTextbox.docx") +{ + // This was only one page b/c the textbox was missing. + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert) { // Given a docx document with a shape with vert="mongolianVert". diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index ae4a82c1a6db..3565b131084d 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3044,7 +3044,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(); }