diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-03-29 10:25:30 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-03-29 10:25:30 +0000 |
commit | 221c87ada7166c74bd29ff9feca7add7acd6413b (patch) | |
tree | d870aac4e7db1c5b1cff978fa8771353b45052b2 /vcl/source/gdi/outdev.cxx | |
parent | 415ea40f88041f323de5e602bb8656ec43413625 (diff) |
INTEGRATION: CWS vcl54 (1.38.72); FILE MERGED
2006/01/30 13:03:22 thb 1.38.72.1: #i59315# Limit clip coords passed on to sal layer to actual outdev bounds (to avoid overflows)
Diffstat (limited to 'vcl/source/gdi/outdev.cxx')
-rw-r--r-- | vcl/source/gdi/outdev.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 6e4d61e13d86..5bd4f1eb5af8 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -4,9 +4,9 @@ * * $RCSfile: outdev.cxx,v $ * - * $Revision: 1.40 $ + * $Revision: 1.41 $ * - * last change: $Author: obo $ $Date: 2006-03-22 15:17:31 $ + * last change: $Author: obo $ $Date: 2006-03-29 11:25:30 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -232,6 +232,14 @@ BOOL OutputDevice::ImplSelectClipRegion( SalGraphics* pGraphics, const Region& r bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight ); while ( bRegionRect ) { + // #i59315# Limit coordinates passed to sal layer to actual + // outdev dimensions - everything else bears the risk of + // overflowing internal coordinates (e.g. the 16 bit wire + // format of X11). + nX = ::std::max<long>(0,nX); + nY = ::std::max<long>(0,nY); + nWidth = ::std::min<long>(pOutDev->GetOutputWidthPixel(), nWidth); + nHeight = ::std::min<long>(pOutDev->GetOutputHeightPixel(), nHeight); if ( !pGraphics->UnionClipRegion( nX, nY, nWidth, nHeight, pOutDev ) ) bClipRegion = FALSE; DBG_ASSERT( bClipRegion, "OutputDevice::ImplSelectClipRegion() - can't cerate region" ); |