summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-28 09:16:48 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-02-28 09:47:20 +0000
commit6603947329a7b372a173a3c60e013e532d0bc5cf (patch)
tree83bef0e00f32062ad1dd0438e38746dec34c3668 /writerfilter/source
parent14faa41bebc8147d45f9f392fd33fca08e7d1ba0 (diff)
tdf#103931 DOCX import: fix lost section break
When there are multiple sections in a document, every <w:p> element triggers a handleLastParagraphInSection() call, and that's how the previous section is ended and the next one is started if necessary. In case the section contains no paragraphs at all, the section was lost on import. Fix this by also calling handleLastParagraphInSection() on <w:sectPr> as well. It's not a problem if there are both <w:p> and <w:sectPr> in a section (which is the usual situation) as only the first call closes the previous section / starts the next one. Change-Id: I64f2c403dcb2ceca76d444ab06df3052235d2795 Reviewed-on: https://gerrit.libreoffice.org/34715 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/ooxml/model.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 5312510d6c1f..771d2114296a 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>