summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-08-14 16:12:53 +0530
committerPetr Mladek <pmladek@suse.cz>2012-08-20 18:03:56 +0200
commit9b1f4aac63e0f1e5453485f8b4c36c9020bbea03 (patch)
treefa7818b3cde3679249b1abcf514c9d7213a3b1f0
parentf1c26949e29278a3eae0c167f172a0fd4895fd2f (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>
-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);