[Libreoffice-commits] .: svx/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Wed Jan 4 06:30:09 PST 2012
svx/source/customshapes/EnhancedCustomShape2d.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8edd479f579afe9b26790c99a9a6648261aec4e3
Author: Radek Doulik <rodo at novell.com>
Date: Wed Jan 4 15:27:27 2012 +0100
move the assert checking the polygon count higher
- so that it is called before accessing polygon points
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 0d9f9a3..f1fbf44 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1643,10 +1643,10 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
const Point aControl(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
const Point aEnd(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
+ DBG_ASSERT(aNewB2DPolygon.count(), "EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)");
basegfx::B2DPoint aStartPointB2D( aNewB2DPolygon.getB2DPoint(aNewB2DPolygon.count() - 1 ) );
Point aStartPoint( aStartPointB2D.getX(), aStartPointB2D.getY() );
- DBG_ASSERT(aNewB2DPolygon.count(), "EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)");
aNewB2DPolygon.appendBezierSegment(
basegfx::B2DPoint(aStartPoint.X() + 2.0*(aControl.X() - aStartPoint.X())/3.0, aStartPoint.Y() + 2.0*(aControl.Y() - aStartPoint.Y())/3.0),
basegfx::B2DPoint(aEnd.X() + 2.0*(aControl.X() - aEnd.X())/3.0, aEnd.Y() + 2.0*(aControl.Y() - aEnd.Y())/3.0),
More information about the Libreoffice-commits
mailing list