sw/qa/extras/ooxmlexport/data/tdf90789-2.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 6 ++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 ++++---- 3 files changed, 10 insertions(+), 4 deletions(-)
New commits: commit b7e5920bb43c2c7e7d98a235a12c5bb2536f8685 Author: Vasily Melenchuk <vasily.melenc...@cib.de> Date: Mon Oct 9 19:10:18 2017 +0300 tdf#90789: DOCX paragraphs in shapes like frames do not belong to section. Change-Id: I60644bd62e2a2ac97a97f0a492b146dc69456cd6 Reviewed-on: https://gerrit.libreoffice.org/43291 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx b/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx new file mode 100644 index 000000000000..2f831d722ba9 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 4f2f878a249c..4283909df1cf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -1224,6 +1224,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103090, "tdf103090.odt") CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName); } +DECLARE_OOXMLEXPORT_TEST(testTdf90789_2, "tdf90789-2.docx") +{ + // Section break before frame and shape was ignored + CPPUNIT_ASSERT_EQUAL( 3, getPages() ); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 2274c47ee3a9..bd532b87cc19 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1194,10 +1194,10 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap ) } m_bParaChanged = false; - if (!pParaContext || !pParaContext->IsFrameMode()) - { // If the paragraph is in a frame, it's not a paragraph of the section itself. - m_bIsFirstParaInSection = false; - m_bIsLastParaInSection = false; + if( !IsInShape() && (!pParaContext || !pParaContext->IsFrameMode()) ) + { // If the paragraph is in a frame, shape or header/footer, it's not a paragraph of the section itself. + SetIsFirstParagraphInSection(false); + SetIsLastParagraphInSection(false); } if (pParaContext) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits