#99271#: check if all crop sizes are > 0
This commit is contained in:
parent
3e56e03d69
commit
81eccb82b3
1 changed files with 3 additions and 3 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: grfmgr.cxx,v $
|
||||
*
|
||||
* $Revision: 1.15 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2001-08-27 15:36:45 $
|
||||
* last change: $Author: ka $ $Date: 2002-05-22 11:50:41 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -354,7 +354,7 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
|
|||
nTotalWidth = aSize100.Width() - pAttr->GetLeftCrop() - pAttr->GetRightCrop();
|
||||
nTotalHeight = aSize100.Height() - pAttr->GetTopCrop() - pAttr->GetBottomCrop();
|
||||
|
||||
if( aSize100.Width() && aSize100.Height() && nTotalWidth && nTotalHeight )
|
||||
if( aSize100.Width() > 0 && aSize100.Height() > 0 && nTotalWidth > 0 && nTotalHeight > 0 )
|
||||
{
|
||||
fScale = (double) aSize100.Width() / nTotalWidth;
|
||||
nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BMP_MIRROR_HORZ ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale );
|
||||
|
|
Loading…
Reference in a new issue