summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-01-09 22:15:26 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-28 15:00:41 +0100
commitd55cc244aba92f4e9fbdd7d51c65112075c6e8a8 (patch)
treebefc94a911232ea364cd9449a6f9c23e76768b8b /oox
parent1ed8416703d1f1a33690cc47fd6cb6b2b3520cf1 (diff)
tdf#122563 DOCX import: fix OLE size after roundtrip
Embedded XLSX spreadsheets and other OLE objects became small in Writer after a roundtrip between LibO and MSO, caused by the empty drawing path of OLE shapes. Change-Id: I4cd39d4bcd6707cc5a3b8e40dde8c6148a20cabc Reviewed-on: https://gerrit.libreoffice.org/66053 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit bdb0177b550d27a541cdfc0668714b2e9ac28540) Reviewed-on: https://gerrit.libreoffice.org/66689 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlshapecontext.cxx4
1 files changed, 3 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 );