diff options
author | László Németh <nemeth@numbertext.org> | 2018-09-17 13:36:09 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-09-18 08:05:12 +0200 |
commit | f63a60f56156e4ac17887e6c96d15fb865a2a8eb (patch) | |
tree | 7f8b8534ab83ba086dc4cf35ab75996a75c65b80 /writerfilter/source | |
parent | 5571d3c8621e18a3bea527da807b7b99d19ec409 (diff) |
tdf#118691 DOCX import: fix table loss caused by <w:cr>
According to the OOXML standard, <w:cr> (carriage return –
Unicode character 000D) is equivalent to a break
with null type and clear attributes, so we handle it as
a <w:br/>, instead of endOfParagraph, fixing
losing table paragraphs and tables containing <w:cr/>.
Note: It seems, MSO cannot handle carriage return characters
in table cells correctly. It shows squares (unknown
characters) without line break there. Copying this text to
a non-table paragraph in MSO, we get the correct layout with
line breaks. Copying this text with carriage return characters
back to a table cell, we get squares again. With this LO fix,
it will be possible to fix the bad tables edited by MS Word
by using LO, because LibreOffice import/export converts all
<w:cr>s to <w:br>s (as before, but now without destroying
the structure of the tables).
Change-Id: Iee42f71e9a00531353582e7127c2c212ea0890d0
Reviewed-on: https://gerrit.libreoffice.org/60585
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 36328c035d75..e1640c44e54d 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -17942,8 +17942,8 @@ <resource name="CT_PgNum" resource="Stream"> <action name="end" action="pgNum"/> </resource> - <resource name="CT_Cr" resource="Stream"> - <action name="end" action="endOfParagraph"/> + <resource name="CT_Cr" resource="Properties"> + <action name="end" action="handleBreak"/> </resource> <resource name="CT_Tab" resource="Stream"> <action name="end" action="tab"/> |