summaryrefslogtreecommitdiff
path: root/goodies
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-05-04 06:49:34 +0000
committerRüdiger Timm <rt@openoffice.org>2006-05-04 06:49:34 +0000
commit86a04e5420c6d4522fba1706e4ce97b643564c40 (patch)
treeee9015b43585d2f9a5d2796c8a44a75dfd59e2b5 /goodies
parent5291ab39074477fab48b6d0e73d21fc36481f361 (diff)
INTEGRATION: CWS thbpp3 (1.21.32); FILE MERGED
2006/04/26 12:00:05 thb 1.21.32.2: RESYNC: (1.21-1.22); FILE MERGED 2006/03/06 17:53:53 thb 1.21.32.1: #131696# Asserting bmp/mask size inconsistencies; checking return value of GraphicCache::ImplGetCacheEntry() before dereffing the ptr
Diffstat (limited to 'goodies')
-rw-r--r--goodies/source/graphic/grfmgr2.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/goodies/source/graphic/grfmgr2.cxx b/goodies/source/graphic/grfmgr2.cxx
index 865de410da01..7e389eaa56f7 100644
--- a/goodies/source/graphic/grfmgr2.cxx
+++ b/goodies/source/graphic/grfmgr2.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: grfmgr2.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: rt $ $Date: 2006-02-09 13:39:41 $
+ * last change: $Author: rt $ $Date: 2006-05-04 07:49:34 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -945,6 +945,9 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
BYTE cR0, cG0, cB0, cR1, cG1, cB1;
BOOL bRet = FALSE;
+ DBG_ASSERT( aBmp.GetSizePixel() == rBmpEx.GetSizePixel(),
+ "GraphicManager::ImplCreateScaled(): bmp size inconsistent" );
+
if( pAcc )
{
aOutBmp = Bitmap( Size( nDstW, nDstH ), 24 );
@@ -1130,6 +1133,9 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
if( rBmpEx.IsAlpha() )
{
+ DBG_ASSERT( rBmpEx.GetAlpha().GetSizePixel() == rBmpEx.GetSizePixel(),
+ "GraphicManager::ImplCreateScaled(): alpha mask size inconsistent" );
+
AlphaMask aAlpha( rBmpEx.GetAlpha() );
AlphaMask aOutAlpha;
@@ -1207,6 +1213,9 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
}
else
{
+ DBG_ASSERT( rBmpEx.GetMask().GetSizePixel() == rBmpEx.GetSizePixel(),
+ "GraphicManager::ImplCreateScaled(): mask size inconsistent" );
+
Bitmap aMsk( rBmpEx.GetMask() );
Bitmap aOutMsk;