summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-08-29 09:25:21 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-08-29 09:26:14 +0200
commit9f6dd9a4cff12460d09a31a065feaf8fece1eb4b (patch)
treeb8281e867c22a37c0ce7971b5d4669703acdb493 /oox/source
parent2323ca6bc367f6c8125eb994d02e7988cc4d276c (diff)
n#777345 import imagedata of v:rect elements inside OLE objects
Change-Id: I300bb5d3008b839f6ec63a4435f5ce8c1dd0a2c1
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/vml/vmlshape.cxx22
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 ) :