summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-08-14 16:12:53 +0530
committerMichael Meeks <michael.meeks@suse.com>2012-08-21 11:25:13 +0100
commit350d9f972e00a05ff61140eafc078188252cc2de (patch)
tree3429d37d6d1dba88457e1b089bbc1358910fc8ab
parent76ae3173bb16f5ce4899026bb2bed109ecee6ce4 (diff)
fdo#47434: Zero rect. size causing wrong line positions.
Thanks to Korrawit Pruegsanusak <detective.conan.1412@gmail.com> for the indepth analysis and debugging. Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r--svx/source/svdraw/svdoashp.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 1e66287d8b83..4359459954ca 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);