diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-06-21 10:47:42 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-06-27 14:57:35 +0000 |
commit | d1d45140ef21098894b57405ddd0526f2f46008d (patch) | |
tree | 5cf386c9cbdaa81e8c5adb160fc820870be2094a /oox | |
parent | 3c1559ba0ba71bb18faacd18016cd9e3b510c598 (diff) |
n#820504: Some imported VML paths are closed, try to detect the
Change-Id: Idefd0277a85bd7b2b727f59cc4e568869b4932a1
(cherry picked from commit 08db0b22bdce0f779e4af01a209aef1be29e9907)
Reviewed-on: https://gerrit.libreoffice.org/4533
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
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 1b0caf9224b1..124807cc0cc0 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -628,12 +628,19 @@ Reference<XShape> LineShape::implConvertAndInsert(const Reference<XShapes>& rxSh // ============================================================================ 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 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 ); Rectangle aCoordSys = getCoordSystem(); |