From 555ad7a35e4589ffc5624294f10821da1ca0f60e Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 10 Mar 2005 12:28:06 +0000 Subject: INTEGRATION: CWS presfixes01 (1.3.6); FILE MERGED 2005/02/16 11:14:35 fs 1.3.6.2: #i42558# drafts.com.sun.star.drawing/rendering/geometry moved to com.sun.star.* 2005/02/04 17:45:46 thb 1.3.6.1: #i38960# Only create BitmapCanvas for Bitmaps that actually _have_ one - the new, tunneled VCL bitmaps don't --- cppcanvas/source/wrapper/implbitmap.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'cppcanvas/source') diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx index 22de22d5c5e7..b3916d926135 100644 --- a/cppcanvas/source/wrapper/implbitmap.cxx +++ b/cppcanvas/source/wrapper/implbitmap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: implbitmap.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: rt $ $Date: 2004-11-26 20:58:48 $ + * last change: $Author: vg $ $Date: 2005-03-10 13:28:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,7 +67,7 @@ #endif -using namespace ::drafts::com::sun::star; +using namespace ::com::sun::star; using namespace ::com::sun::star; namespace cppcanvas @@ -80,11 +80,16 @@ namespace cppcanvas const uno::Reference< rendering::XBitmap >& rBitmap ) : CanvasGraphicHelper( rParentCanvas ), mxBitmap( rBitmap ), - mpBitmapCanvas( - new ImplBitmapCanvas( uno::Reference< rendering::XBitmapCanvas >(rBitmap, - uno::UNO_QUERY) ) ) + mpBitmapCanvas() { OSL_ENSURE( mxBitmap.is(), "ImplBitmap::ImplBitmap: no valid bitmap" ); + + uno::Reference< rendering::XBitmapCanvas > xBitmapCanvas( rBitmap, + uno::UNO_QUERY ); + if( xBitmapCanvas.is() ) + mpBitmapCanvas.reset( new ImplBitmapCanvas( + uno::Reference< rendering::XBitmapCanvas >(rBitmap, + uno::UNO_QUERY) ) ); } ImplBitmap::~ImplBitmap() -- cgit