diff options
Diffstat (limited to 'oox/source/vml/vmlshape.cxx')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 64c0ed71664b..5c8e728e55f2 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -454,6 +454,28 @@ RectangleShape::RectangleShape( Drawing& rDrawing ) : { } +Reference<XShape> RectangleShape::implConvertAndInsert(const Reference<XShapes>& rxShapes, const Rectangle& rShapeRect) const +{ + XmlFilterBase& rFilter = mrDrawing.getFilter(); + OUString aGraphicPath = getGraphicPath(); + + // try to create a picture object + if(!aGraphicPath.isEmpty()) + { + Reference<XShape> xShape = mrDrawing.createAndInsertXShape("com.sun.star.drawing.GraphicObjectShape", rxShapes, rShapeRect); + if (xShape.is()) + { + OUString aGraphicUrl = rFilter.getGraphicHelper().importEmbeddedGraphicObject(aGraphicPath); + PropertySet aPropSet(xShape); + aPropSet.setProperty(PROP_GraphicURL, aGraphicUrl); + } + return xShape; + } + + // default: try to create a rectangle shape + return SimpleShape::implConvertAndInsert(rxShapes, rShapeRect); +} + // ============================================================================ EllipseShape::EllipseShape( Drawing& rDrawing ) : |