diff options
author | Vasily Melenchuk <Vasily.Melenchuk@cib.de> | 2017-10-09 19:10:18 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-10-10 19:34:15 +0200 |
commit | 9c4d690b73b30aa144828935ad4e87eb13442d0c (patch) | |
tree | 93f86f9110b96c94590aad94da5ad8c18bbf94ca | |
parent | 47ec4332dde7a8b7a8abb188679e8b13481bd62f (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf90789-2.docx | bin | 0 -> 12372 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 |
3 files changed, 10 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx b/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx Binary files differnew file mode 100644 index 000000000000..2f831d722ba9 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf90789-2.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index a612b14bfee2..3587dbfd53a6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -1099,6 +1099,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx") } +DECLARE_OOXMLEXPORT_TEST(testTdf90789_2, "tdf90789-2.docx") +{ + // Section break before frame and shape was ignored + CPPUNIT_ASSERT_EQUAL( 3, getPages() ); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 029ab83ee36d..be16a2307eaf 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1292,10 +1292,10 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap ) SetIsPreviousParagraphFramed(false); m_bParaChanged = false; - if( !IsInHeaderFooter() && (!pParaContext || !pParaContext->IsFrameMode()) ) - { // If the paragraph is in a frame or header/footer, it's not a paragraph of the section itself. - m_bIsFirstParaInSection = false; - m_bIsLastParaInSection = false; + if( !IsInHeaderFooter() && !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) |