diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2016-10-25 02:44:16 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-25 07:41:00 +0000 |
commit | bc5c51e547e8ea971f90003657509848cc358724 (patch) | |
tree | 59552fa71e7b846daa4f684020d6c029bf2a734b /sw/qa/extras | |
parent | 55840d90c43d0ba6db4a9cda4af648df0776749b (diff) |
tdf#103389: Resaving a DOCX document with two canvases leads to a broken file.
Make custom shape export more robust. In case of the test
document, WriteCustomGeometry is called, but this call
does not export anything, and so we get a shape without
any geometry in the DOCX file, which causes problem to MS Word.
Reviewed-on: https://gerrit.libreoffice.org/30241
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit f7c61b08d526c79ecd1522dff79386059b6125e0)
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
Change-Id: Ie7a4e2b8a18bfddaeeb81425ae5f1de04140d43f
Reviewed-on: https://gerrit.libreoffice.org/30242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf103389.docx | bin | 0 -> 13983 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf103389.docx b/sw/qa/extras/ooxmlexport/data/tdf103389.docx Binary files differnew file mode 100644 index 000000000000..0ef80e6a1814 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf103389.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index a7ad4653f619..42f647430f74 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -1126,6 +1126,17 @@ DECLARE_OOXMLEXPORT_TEST(testFlipAndRotateCustomShape, "flip_and_rotate.odt") #endif } +DECLARE_OOXMLEXPORT_TEST(testTdf103389, "tdf103389.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + // No geometry was exported for the second canvas + // Check both canvases' geometry + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp/wps:spPr/a:prstGeom", "prst", "rect"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp/wps:spPr/a:prstGeom", "prst", "rect"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |