From cb40579728f017bf4f0ef5efb60478175d098260 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 24 Jun 2008 11:11:49 +0000 Subject: INTEGRATION: CWS canvas05 (1.2.18); FILE MERGED 2008/04/21 07:55:15 thb 1.2.18.2: RESYNC: (1.2-1.3); FILE MERGED 2007/10/01 13:49:13 thb 1.2.18.1: #i79258# Merge from CWS picom --- .../source/engine/shapes/viewbackgroundshape.cxx | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'slideshow/source/engine/shapes/viewbackgroundshape.cxx') diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index 6d9ff2296391..8e6db547cb85 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: viewbackgroundshape.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -33,9 +33,10 @@ // must be first #include +#include -#include -#include +#include "viewbackgroundshape.hxx" +#include "tools.hxx" #include #include @@ -48,6 +49,8 @@ #include #include +#include + #include #include #include @@ -67,7 +70,7 @@ namespace slideshow const GDIMetaFileSharedPtr& rMtf ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::prefetch()" ); - ENSURE_AND_RETURN( rMtf, + ENSURE_OR_RETURN( rMtf, "ViewBackgroundShape::prefetch(): no valid metafile!" ); const ::basegfx::B2DHomMatrix& rCanvasTransform( @@ -98,12 +101,12 @@ namespace slideshow rDestinationCanvas, aBmpSizePixel ) ); - ENSURE_AND_THROW( pBitmap, + ENSURE_OR_THROW( pBitmap, "ViewBackgroundShape::prefetch(): Cannot create background bitmap" ); ::cppcanvas::BitmapCanvasSharedPtr pBitmapCanvas( pBitmap->getBitmapCanvas() ); - ENSURE_AND_THROW( pBitmapCanvas, + ENSURE_OR_THROW( pBitmapCanvas, "ViewBackgroundShape::prefetch(): Cannot create background bitmap canvas" ); // clear bitmap @@ -128,7 +131,7 @@ namespace slideshow *rMtf.get(), ::cppcanvas::Renderer::Parameters() ) ); - ENSURE_AND_RETURN( pRenderer, + ENSURE_OR_RETURN( pRenderer, "ViewBackgroundShape::prefetch(): Could not create Renderer" ); pRenderer->setTransformation( aShapeTransform ); @@ -151,8 +154,8 @@ namespace slideshow maLastTransformation(), maBounds( rShapeBounds ) { - ENSURE_AND_THROW( mpViewLayer, "ViewBackgroundShape::ViewBackgroundShape(): Invalid View" ); - ENSURE_AND_THROW( mpViewLayer->getCanvas(), "ViewBackgroundShape::ViewBackgroundShape(): Invalid ViewLayer canvas" ); + ENSURE_OR_THROW( mpViewLayer, "ViewBackgroundShape::ViewBackgroundShape(): Invalid View" ); + ENSURE_OR_THROW( mpViewLayer->getCanvas(), "ViewBackgroundShape::ViewBackgroundShape(): Invalid ViewLayer canvas" ); } ViewLayerSharedPtr ViewBackgroundShape::getViewLayer() const @@ -169,7 +172,7 @@ namespace slideshow if( !prefetch( rDestinationCanvas, rMtf ) ) return false; - ENSURE_AND_RETURN( mxBitmap.is(), + ENSURE_OR_RETURN( mxBitmap.is(), "ViewBackgroundShape::draw(): Invalid background bitmap" ); ::basegfx::B2DHomMatrix aTransform( mpViewLayer->getTransformation() ); -- cgit v1.2.3