diff options
author | Regényi Balázs <regenyi.balazs+gerrit@gmail.com> | 2020-05-11 16:16:59 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-05-20 17:01:05 +0200 |
commit | c28d6b99599eaeb923804547c3ac849b6feec044 (patch) | |
tree | d8d0808b6d18ff210a67fa000f70f9430a76f43f /sw | |
parent | 7daab7859f3b5b4297c45ac1631c68387192a962 (diff) |
tdf#126363 DOCX shape round-trip: keep original line width
to avoid of rounding error of EMU -> 1/100 mm -> EMU
conversions, which messed up recognition of preset
line widths in MSO.
Co-authored-by: Szabolcs Tóth
Change-Id: Ide0e393e667848683f00f9ba7a73ff8a45a908b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94043
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx | bin | 0 -> 9956 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx b/sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx Binary files differnew file mode 100644 index 000000000000..180383ec6842 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf126363_LineWidthRounding.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index a591a3caa8fe..dd6544eb3173 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -971,6 +971,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131539, "tdf131539.odt") CPPUNIT_ASSERT(aXmlVal.indexOf("margin-left:139.95")>-1); } +DECLARE_OOXMLEXPORT_TEST(testLineWidthRounding, "tdf126363_LineWidthRounding.docx") +{ + // tdf#126363: check if line with stays the same after export + xmlDocUniquePtr pXml = parseExport("word/document.xml"); + if (!pXml) + return; + // this was 57240 (it differs from the original 57150, losing the preset line width) + assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln", "w", "57150"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |