diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-25 13:30:33 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-25 13:30:33 +0000 |
commit | 5084161e8146b885cf92ec96c195c72d396c7cfe (patch) | |
tree | b8606d95de6b6f14201bdf8adf935e02c3737d0d /vcl/source/gdi/outdev2.cxx | |
parent | 4646f83f49ddeb674fba42473c2f82e9c78b7be6 (diff) |
INTEGRATION: CWS vcl89 (1.40.16); FILE MERGED
2008/04/29 09:03:16 pl 1.40.16.1: #i88818# catch negative sizes
Diffstat (limited to 'vcl/source/gdi/outdev2.cxx')
-rw-r--r-- | vcl/source/gdi/outdev2.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 5ac9f00b6bad..1d9956c7523b 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: outdev2.cxx,v $ - * $Revision: 1.41 $ + * $Revision: 1.42 $ * * This file is part of OpenOffice.org. * @@ -692,7 +692,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize, } if( aPosAry.mnDestX < 0 ) { - aPosAry.mnDestWidth += aPosAry.mnDestX; + aPosAry.mnDestWidth = Max(long(0),aPosAry.mnDestWidth+aPosAry.mnDestX); aPosAry.mnSrcX -= sal::static_int_cast<long>(aPosAry.mnDestX / nScaleX); aPosAry.mnDestX = 0; } @@ -710,7 +710,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize, } if( aPosAry.mnDestY < 0 ) { - aPosAry.mnDestHeight += aPosAry.mnDestY; + aPosAry.mnDestHeight = Max(long(0),aPosAry.mnDestHeight+aPosAry.mnDestY); aPosAry.mnSrcY -= sal::static_int_cast<long>(aPosAry.mnDestY / nScaleY); aPosAry.mnDestY = 0; } @@ -720,7 +720,8 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize, } } - mpGraphics->DrawBitmap( &aPosAry, *aBmp.ImplGetImpBitmap()->ImplGetSalBitmap(), this ); + if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight ) + mpGraphics->DrawBitmap( &aPosAry, *aBmp.ImplGetImpBitmap()->ImplGetSalBitmap(), this ); } } } |