[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/qa sw/source
PriyankaGaikwad
priyanka.gaikwad at synerzip.com
Tue Jun 10 06:00:40 PDT 2014
sw/qa/extras/ooxmlexport/data/fdo79822.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 ++++++++++
sw/source/filter/ww8/docxsdrexport.cxx | 4 +++-
3 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 713c639ce5ba6371e9c0d9ff51be7cf4c68d3d4c
Author: PriyankaGaikwad <priyanka.gaikwad at synerzip.com>
Date: Tue Jun 10 14:53:40 2014 +0530
fdo#79822 : Crash:LO Crashes while Saving the DOCX containing smartart
Decription :
- Docx file contain smartart and it was created in MS word 2007.
- MS word 2007 does not create any drawing.xml for smartart
- So in DocxSdrExport::writeDiagram() diagramDrawing was not set in this case.
- File crashing at diagramDrawing[0] >>= drawingDom as diagramDrawing is empty.
Change-Id: I6bc38e702f731ad8074b562572fd50f2e29a41b7
Reviewed-on: https://gerrit.libreoffice.org/9706
Tested-by: Michael Stahl <mstahl at redhat.com>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 178550923533b7c015e29d957a2fc3857ba73eb3)
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79822.docx b/sw/qa/extras/ooxmlexport/data/fdo79822.docx
new file mode 100644
index 0000000..2844671
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79822.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index fd98235..a87ddef 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3468,6 +3468,16 @@ DECLARE_OOXMLEXPORT_TEST(testWordArtWithinDraingtool, "testWordArtWithinDraingto
assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]",1);
}
+DECLARE_OOXMLEXPORT_TEST(testfdo79822, "fdo79822.docx")
+{
+ /* File getting crash while saving in LO.
+ * The Docx contain smartart and the file was created in ms word 2007
+ */
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 29c1195..2e77418 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -945,12 +945,14 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFr
else if (propName == "OOXColor")
propList[nProp].Value >>= colorDom;
else if (propName == "OOXDrawing")
+ {
propList[nProp].Value >>= diagramDrawing;
+ diagramDrawing[0] >>= drawingDom; // if there is OOXDrawing property then set drawingDom here only.
+ }
else if (propName == "OOXDiagramDataRels")
propList[nProp].Value >>= xDataRelSeq;
}
- diagramDrawing[0] >>= drawingDom;
// check that we have the 4 mandatory XDocuments
// if not, there was an error importing and we won't output anything
if (!dataDom.is() || !layoutDom.is() || !styleDom.is() || !colorDom.is())
More information about the Libreoffice-commits
mailing list