From d7c7624024f1da26165869921f340f53026a423d Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 9 Jul 2012 11:25:28 +0000 Subject: Resolves: #i119519# Fixed import of closed borders from PPT... when an ellipse is involved. Reported by: liupingtan Patch by: Jianyuan Li Review by: Andre Fischer (cherry picked from commit da2c3ed52ae631dba11821f201a2fce49bf18c86) Change-Id: Iff8195365823b60a70641b9efeb9c9f6c86d5341 --- svx/source/customshapes/EnhancedCustomShape2d.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'svx/source') diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index f74e938c84e6..210f55b6a09f 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1564,14 +1564,16 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm case ANGLEELLIPSE : { - if(aNewB2DPolygon.count() > 1L) + if ( nPntCount ) { - // #i76201# Add conversion to closed polygon when first and last points are equal - basegfx::tools::checkClosed(aNewB2DPolygon); - aNewB2DPolyPolygon.append(aNewB2DPolygon); + if(aNewB2DPolygon.count() > 1L) + { + // #i76201# Add conversion to closed polygon when first and last points are equal + basegfx::tools::checkClosed(aNewB2DPolygon); + aNewB2DPolyPolygon.append(aNewB2DPolygon); + } + aNewB2DPolygon.clear(); } - - aNewB2DPolygon.clear(); } case ANGLEELLIPSETO : { -- cgit