diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-21 10:47:42 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-21 10:49:05 +0200 |
commit | 08db0b22bdce0f779e4af01a209aef1be29e9907 (patch) | |
tree | 52370b6a9cd2520c5f06b61941076559940689c9 /oox | |
parent | 4b1ec8ce97d465b409f98c200b865c851844a3c7 (diff) |
n#820504: Some imported VML paths are closed, try to detect the
Change-Id: Idefd0277a85bd7b2b727f59cc4e568869b4932a1
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 414cc030f554..d34bf336425c 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -683,12 +683,19 @@ awt::Rectangle LineShape::getRelRectangle() const // ============================================================================ BezierShape::BezierShape(Drawing& rDrawing) - : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape") + : SimpleShape(rDrawing, "com.sun.star.drawing.OpenBezierShape") // TODO Could we need both Open and Closed? { } Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const { + // If we have an 'x' in the last part of the path it means it is closed... + sal_Int32 nPos = maShapeModel.maVmlPath.lastIndexOf(','); + if ( nPos != -1 && maShapeModel.maVmlPath.copy(nPos).indexOf('x') != -1 ) + { + const_cast<BezierShape*>( this )->setService( "com.sun.star.drawing.ClosedBezierShape" ); + } + Reference< XShape > xShape = SimpleShape::implConvertAndInsert( rxShapes, rShapeRect ); awt::Rectangle aCoordSys = getCoordSystem(); |