summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/shapes/viewbackgroundshape.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-24 11:11:49 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-24 11:11:49 +0000
commitcb40579728f017bf4f0ef5efb60478175d098260 (patch)
tree4b313c86b3b688ad6d050818bc3f027ba558628a /slideshow/source/engine/shapes/viewbackgroundshape.cxx
parent54a90b5059d76254124f964c09e51122d7f7fd4e (diff)
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
Diffstat (limited to 'slideshow/source/engine/shapes/viewbackgroundshape.cxx')
-rw-r--r--slideshow/source/engine/shapes/viewbackgroundshape.cxx23
1 files changed, 13 insertions, 10 deletions
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 <canvas/debug.hxx>
+#include <tools/diagnose_ex.h>
-#include <viewbackgroundshape.hxx>
-#include <tools.hxx>
+#include "viewbackgroundshape.hxx"
+#include "tools.hxx"
#include <rtl/logfile.hxx>
#include <rtl/math.hxx>
@@ -48,6 +49,8 @@
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <com/sun/star/rendering/XCanvas.hpp>
+
#include <canvas/verbosetrace.hxx>
#include <canvas/canvastools.hxx>
#include <cppcanvas/vclfactory.hxx>
@@ -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() );