summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-28 09:16:48 +0100
committerAndras Timar <andras.timar@collabora.com>2017-03-17 11:58:41 +0100
commit2ff9cff66819fd9ea3aaf7a1caaa00838773f75b (patch)
treeb46ca60fad82682292e562d9be45e54206c7dab9 /writerfilter
parent08b7e84a01d836e513a85f542217b9c67eddda7d (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. (cherry picked from commit 6603947329a7b372a173a3c60e013e532d0bc5cf) Change-Id: I64f2c403dcb2ceca76d444ab06df3052235d2795 Reviewed-on: https://gerrit.libreoffice.org/34718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 1e88c10327642e6867db5708e3fd0fb7065bc74c)
Diffstat (limited to 'writerfilter')
-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 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>