oox/source/vml/vmlshape.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit a176d3645722746563f6dda3d9807dbe2cad1b01 Author: Cédric Bosdonnat <[email protected]> Date: Fri Jun 21 10:47:42 2013 +0200 n#820504: Some imported VML paths are closed, try to detect the (cherry picked from commit 08db0b22bdce0f779e4af01a209aef1be29e9907) (cherry picked from commit b516a9b69119b25df8f973b6318f2ae1c7e601df) Conflicts: oox/source/vml/vmlshape.cxx Change-Id: Idefd0277a85bd7b2b727f59cc4e568869b4932a1 Reviewed-on: https://gerrit.libreoffice.org/4584 Reviewed-by: Fridrich Strba <[email protected]> Tested-by: Fridrich Strba <[email protected]> diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 35ad93d..b77adf6 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -700,7 +700,7 @@ 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? { } @@ -709,6 +709,13 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes awt::Rectangle aCoordSys = getCoordSystem(); PolyPolygonBezierCoords aBezierCoords; + // 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" ); + } + if( (aCoordSys.Width > 0) && (aCoordSys.Height > 0) ) { const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
