summaryrefslogtreecommitdiff
authorMuthu Subramanian <sumuthu@suse.com>2012-08-14 10:42:53 (GMT)
committer Muthu Subramanian <sumuthu@suse.com>2012-08-14 10:48:42 (GMT)
commite3acf19c0502b0758359b56abda81e504d167630 (patch) (side-by-side diff)
tree09ae490e3237877c7aa58afacc2381c51dbaf027
parentaa4b8a8164f01a120ba9bfb2e86b1ed33cc1d69c (diff)
downloadcore-e3acf19c0502b0758359b56abda81e504d167630.zip
core-e3acf19c0502b0758359b56abda81e504d167630.tar.gz
fdo#47434: Zero rect. size causing wrong line positions.
Thanks to Korrawit Pruegsanusak <detective.conan.1412@gmail.com> for the indepth analysis and debugging.
Diffstat (more/less context) (ignore whitespace changes)
-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 74338ff..624a2a7 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);