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-27 15:18:59 +0200 |
commit | 781904af36158b72c131f2d72e562e92f73a9bd2 (patch) | |
tree | c89436af120dc70b8e149bfa6c58c6c2eb7dcb62 /oox | |
parent | ee80670695014697cdfa26a6fd142c69a423cbdd (diff) |
n#820504: Some imported VML paths are closed, try to detect the
(cherry picked from commit 08db0b22bdce0f779e4af01a209aef1be29e9907)
Conflicts:
oox/source/vml/vmlshape.cxx
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 358fe16f4461..4551eee21fa7 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -715,12 +715,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" ); + } + awt::Rectangle aCoordSys = getCoordSystem(); PolyPolygonBezierCoords aBezierCoords; |