From 55f00b76a9878480cdeb1528371eafe3fd85412e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 31 Jan 2012 10:49:16 +0100 Subject: [PATCH] it seems this is not true in all cases --- vcl/source/gdi/virdev.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 008ecb9576bc..3f6acf31852d 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -48,9 +48,6 @@ using namespace ::com::sun::star::uno; void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData ) { - DBG_ASSERT( nBitCount <= 1, - "VirtualDevice::VirtualDevice(): Only 0 or 1 is for BitCount allowed" ); - if ( nDX < 1 ) nDX = 1; @@ -138,6 +135,8 @@ VirtualDevice::VirtualDevice( sal_uInt16 nBitCount ) : mpVirDev( NULL ), meRefDevMode( REFDEV_NONE ) { + SAL_WARN_IF( nBitCount > 1, "vcl.gdi", + "VirtualDevice::VirtualDevice(): Only 0 or 1 is for BitCount allowed" ); OSL_TRACE( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); ImplInitVirDev( Application::GetDefaultDevice(), 1, 1, nBitCount ); @@ -149,6 +148,8 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount : mpVirDev( NULL ), meRefDevMode( REFDEV_NONE ) { + SAL_WARN_IF( nBitCount > 1, "vcl.gdi", + "VirtualDevice::VirtualDevice(): Only 0 or 1 is for BitCount allowed" ); OSL_TRACE( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); ImplInitVirDev( &rCompDev, 1, 1, nBitCount ); @@ -160,6 +161,8 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount : mpVirDev( NULL ), meRefDevMode( REFDEV_NONE ) { + SAL_WARN_IF( nBitCount > 1, "vcl.gdi", + "VirtualDevice::VirtualDevice(): Only 0 or 1 is for BitCount allowed" ); OSL_TRACE( "VirtualDevice::VirtualDevice( %hu )", nBitCount ); ImplInitVirDev( &rCompDev, 1, 1, nBitCount );