oox/source/vml/vmlshape.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit d1d45140ef21098894b57405ddd0526f2f46008d Author: Cédric Bosdonnat <cedric.bosdon...@free.fr> Date: Fri Jun 21 10:47:42 2013 +0200 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 <nthieb...@gmail.com> Tested-by: Norbert Thiebaud <nthieb...@gmail.com> diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 1b0caf9..124807c 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();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits