diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-03-22 09:19:57 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-03-22 09:19:57 +0000 |
commit | ade93a6e213abbb768f91cc839cd0ffe25934b9b (patch) | |
tree | f0e3e8e5f11480754d30c6fccd2368541e9b84bd | |
parent | 5fc0596e780cef1d9916718d7d4f10b6d45cb932 (diff) |
INTEGRATION: CWS vcl55 (1.16.194); FILE MERGED
2006/03/14 09:13:20 hdu 1.16.194.1: #131856# check mapmode enumerator before use
-rw-r--r-- | vcl/source/gdi/outmap.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx index 0da54c37f67c..88a11c61683c 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -4,9 +4,9 @@ * * $RCSfile: outmap.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: rt $ $Date: 2005-09-09 12:07:42 $ + * last change: $Author: obo $ $Date: 2006-03-22 10:19:57 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1713,10 +1713,17 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, // ----------------------------------------------------------------------- #define ENTER3( eUnitSource, eUnitDest ) \ - long nNumerator = aImplNumeratorAry[eUnitSource] * \ + long nNumerator = 1; \ + long nDenominator = 1; \ + DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \ + DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \ + if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \ + { \ + nNumerator = aImplNumeratorAry[eUnitSource] * \ aImplDenominatorAry[eUnitDest]; \ - long nDenominator = aImplNumeratorAry[eUnitDest] * \ + nDenominator = aImplNumeratorAry[eUnitDest] * \ aImplDenominatorAry[eUnitSource]; \ + } \ if ( eUnitSource == MAP_PIXEL ) \ nDenominator *= 72; \ else if( eUnitDest == MAP_PIXEL ) \ |