diff options
author | Armin Weiss <aw@openoffice.org> | 2002-10-22 12:41:25 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2002-10-22 12:41:25 +0000 |
commit | 6424729b6ced8aca43e95c4925353c427c4f0359 (patch) | |
tree | 4d6dc4281b9c5fcba0072ed4f347fc1a3f0c2a69 /svx/source | |
parent | e71d1661cb6b3b73978ddc3686461c72ecb2937d (diff) |
#95736# Take RECT_EMPTY into account when calculating scale factors
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 5449321565ce..05dcd4202d98 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdopath.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: aw $ $Date: 2002-10-21 15:12:14 $ + * last change: $Author: aw $ $Date: 2002-10-22 13:41:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2232,9 +2232,15 @@ void SdrPathObj::RecalcSnapRect() void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect) { Rectangle aOld(GetSnapRect()); - long nMulX = rRect.Right() - rRect.Left(); + + // #95736# Take RECT_EMPTY into account when calculating scale factors + long nMulX = (RECT_EMPTY == rRect.Right()) ? 0 : rRect.Right() - rRect.Left(); + long nDivX = aOld.Right() - aOld.Left(); - long nMulY = rRect.Bottom() - rRect.Top(); + + // #95736# Take RECT_EMPTY into account when calculating scale factors + long nMulY = (RECT_EMPTY == rRect.Bottom()) ? 0 : rRect.Bottom() - rRect.Top(); + long nDivY = aOld.Bottom() - aOld.Top(); if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; } if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; } |