summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf103931.docxbin0 -> 3542 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx8
-rw-r--r--writerfilter/source/ooxml/model.xml1
3 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103931.docx b/sw/qa/extras/ooxmlexport/data/tdf103931.docx
new file mode 100644
index 000000000000..094fe1ba91cf
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf103931.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index ef278f245757..001f5b026251 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -207,6 +207,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106001, "tdf106001.docx")
CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int16>( 100 ), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharScaleWidth" ));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf103931, "tdf103931.docx")
+{
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // This was 2, the last (empty) section of the document was lost on import.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xTextSections->getCount());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 24a020b1bc58..19339d3ee040 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -17822,6 +17822,7 @@
</resource>
<resource name="CT_SectPrBase" resource="Properties"/>
<resource name="CT_SectPr" resource="Properties">
+ <action name="start" action="handleLastParagraphInSection"/>
<element name="sectPrChange" tokenid="ooxml:CT_SectPr_sectPrChange"/>
<action name="start" action="setLastParagraphInSection"/>
</resource>