summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/vml/vmlshapecontext.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf122563.docxbin0 -> 24895 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx11
3 files changed, 14 insertions, 1 deletions
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index f5f4bf884e31..621f20d29895 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -240,7 +240,9 @@ ContextHandlerRef ShapeContextBase::createShapeContext( ContextHandler2Helper co
case VML_TOKEN( group ):
return new GroupShapeContext( rParent, rShapes.createShape< GroupShape >(), rAttribs );
case VML_TOKEN( shape ):
- if (rAttribs.hasAttribute(XML_path))
+ if (rAttribs.hasAttribute(XML_path) &&
+ // tdf#122563 skip in the case of empty path
+ !rAttribs.getString(XML_path, "").isEmpty())
return new ShapeContext( rParent, rShapes.createShape< BezierShape >(), rAttribs );
else
return new ShapeContext( rParent, rShapes.createShape< ComplexShape >(), rAttribs );
diff --git a/sw/qa/extras/ooxmlexport/data/tdf122563.docx b/sw/qa/extras/ooxmlexport/data/tdf122563.docx
new file mode 100644
index 000000000000..69168a382623
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf122563.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 3e90ed1b4d9d..a91fe0c3b67b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -936,6 +936,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99631, "tdf99631.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:object[1]", "dyaOrig", "768");
}
+DECLARE_OOXMLEXPORT_TEST(testTdf122563, "tdf122563.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object", 1);
+ // Size of the embedded OLE spreadsheet was the bad "width:28.35pt;height:28.35pt"
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:object/v:shape", "style",
+ "width:255.75pt;height:63.75pt");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */