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 178550923533b7c015e29d957a2fc3857ba73eb3 Author: PriyankaGaikwad <priyanka.gaik...@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 <mst...@redhat.com> Reviewed-by: Michael Stahl <mst...@redhat.com> 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 27abde4..df61c77 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3485,6 +3485,16 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78907,"fdo78907.docx") assertXPath ( pXmlDoc1, "/w:ftr[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl", 0 ); } +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 b86fc6e..ac69745 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1021,12 +1021,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()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits