[Libreoffice-commits] core.git: sw/qa writerfilter/source
Vasily Melenchuk
Vasily.Melenchuk at cib.de
Tue Oct 10 17:34:36 UTC 2017
sw/qa/extras/ooxmlexport/data/tdf90789-2.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 6 ++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 ++++----
3 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 9c4d690b73b30aa144828935ad4e87eb13442d0c
Author: Vasily Melenchuk <Vasily.Melenchuk at 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 <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at 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/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)
More information about the Libreoffice-commits
mailing list