diff options
author | Sourav <sourav.mahajan@synerzip.com> | 2014-05-15 16:20:36 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-19 02:35:49 -0500 |
commit | ca0be6743496cbb747e320b5b13bd1270b113892 (patch) | |
tree | 3c1494517b41ed69e55d12404609de84200bb15c /sw | |
parent | 31d8acbe260c7ff75d1cfa9479b7026528e493bd (diff) |
fdo78474:Corruption a:graphicData has no info for the image.
The original file contains two text boxes one contains image and the other contains chart.
Image in text box is not getting imported in LO which leads to no contents inside the a:graphicData tag which is causing the corruption.
Root cause is found in ShapeContextHandler::getShape.
mxChartShapeContext.is() returns true even when mnStartToken is not set as NMSP_dmlChart which is causing the issue.
I have added one more condition to handle this.
Change-Id: I6c567d7618b34c1a24f6809801e4460af6894c67
Reviewed-on: https://gerrit.libreoffice.org/9363
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo78474.docx | bin | 0 -> 116064 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78474.docx b/sw/qa/extras/ooxmlexport/data/fdo78474.docx Binary files differnew file mode 100644 index 000000000000..6468a8421895 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo78474.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 795ec6735742..67ccaaea4db6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3194,6 +3194,18 @@ DECLARE_OOXMLEXPORT_TEST(testContentTypeTIF, "fdo77476.docx") assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@ContentType='image/tif']", "PartName", "/word/media/image1.tif"); } +DECLARE_OOXMLEXPORT_TEST(fdo78474, "fdo78474.docx") +{ + xmlDocPtr pXmlDoc1 = parseExport("word/document.xml"); + if (!pXmlDoc1) return; + //docx file after RT is getting corrupted. + assertXPath(pXmlDoc1, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]", "embed", "rId2"); + + xmlDocPtr pXmlDoc2 = parseExport("word/_rels/document.xml.rels"); + if (!pXmlDoc2) return; + assertXPath(pXmlDoc2,"/rels:Relationships/rels:Relationship[2]","Id","rId2"); +} + DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx") { uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY); |