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
This commit is contained in:
Kurt Zenker 2008-06-24 11:11:49 +00:00
parent 54a90b5059
commit cb40579728

View file

@ -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() );