From e3acf19c0502b0758359b56abda81e504d167630 Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Tue, 14 Aug 2012 16:12:53 +0530 Subject: fdo#47434: Zero rect. size causing wrong line positions. Thanks to Korrawit Pruegsanusak for the indepth analysis and debugging. --- svx/source/svdraw/svdoashp.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'svx') diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 74338ff25c7d..624a2a71cc0d 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -3026,6 +3026,10 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, // build and set BaseRect (use scale) Point aPoint = Point(); Size aSize(FRound(aScale.getX()), FRound(aScale.getY())); + // fdo#47434 We need a valid rectangle here + if( !aSize.Height() ) aSize.setHeight( 1 ); + if( !aSize.Width() ) aSize.setWidth( 1 ); + Rectangle aBaseRect(aPoint, aSize); SetSnapRect(aBaseRect); -- cgit