diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 11:10:16 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 11:10:16 +0000 |
commit | 57c025d9a51eaffd5a4ed10c2909aa79ac8f387f (patch) | |
tree | faf48ad21a1d1e35e41b7b120d4d350e840bb1b8 /slideshow | |
parent | 6237733fa1562ac24a2324d80be61f3ede169483 (diff) |
INTEGRATION: CWS canvas05 (1.2.18); FILE MERGED
2008/04/21 07:55:06 thb 1.2.18.3: RESYNC: (1.3-1.4); FILE MERGED
2008/01/22 00:53:39 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')
-rw-r--r-- | slideshow/source/engine/shapes/drawshape.cxx | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index d1c4c9d0ae2a..9b2f4741005d 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: drawshape.cxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,7 @@ // must be first #include <canvas/debug.hxx> +#include <tools/diagnose_ex.h> #include <canvas/verbosetrace.hxx> #include <rtl/logfile.hxx> @@ -242,7 +243,7 @@ namespace slideshow // will typically have dimension different from the // actual shape ::basegfx::B2DRectangle aScrollRect, aPaintRect; - ENSURE_AND_THROW( getRectanglesFromScrollMtf( aScrollRect, + ENSURE_OR_THROW( getRectanglesFromScrollMtf( aScrollRect, aPaintRect, mpCurrMtf ), "DrawShape::forceScrollTextMetaFile(): Could " @@ -282,10 +283,10 @@ namespace slideshow if( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) == 0 && maAnimationFrames.empty() ) { - ENSURE_AND_THROW( !maSubsetting.hasSubsetShapes(), + ENSURE_OR_THROW( !maSubsetting.hasSubsetShapes(), "DrawShape::ensureVerboseMtfComments(): reloading the metafile " "with active child subsets will wreak havoc on the view!" ); - ENSURE_AND_THROW( maSubsetting.getSubsetNode().isEmpty(), + ENSURE_OR_THROW( maSubsetting.getSubsetNode().isEmpty(), "DrawShape::ensureVerboseMtfComments(): reloading the metafile " "for an ALREADY SUBSETTED shape is not possible!" ); @@ -327,7 +328,7 @@ namespace slideshow mbForceUpdate = false; mbAttributeLayerRevoked = false; - ENSURE_AND_RETURN( !maViewShapes.empty(), + ENSURE_OR_RETURN( !maViewShapes.empty(), "DrawShape::implRender(): render called on DrawShape without views" ); if( maBounds.isEmpty() ) @@ -411,7 +412,7 @@ namespace slideshow ::basegfx::B2DRectangle DrawShape::getActualUnitShapeBounds() const { - ENSURE_AND_THROW( !maViewShapes.empty(), + ENSURE_OR_THROW( !maViewShapes.empty(), "DrawShape::getActualUnitShapeBounds(): called on DrawShape without views" ); const VectorOfDocTreeNodes& rSubsets( @@ -555,8 +556,8 @@ namespace slideshow mbAttributeLayerRevoked( false ), mbDrawingLayerAnim( false ) { - ENSURE_AND_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" ); - ENSURE_AND_THROW( mxPage.is(), "DrawShape::DrawShape(): Invalid containing page" ); + ENSURE_OR_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" ); + ENSURE_OR_THROW( mxPage.is(), "DrawShape::DrawShape(): Invalid containing page" ); // check for drawing layer animations: drawing::TextAnimationKind eKind = drawing::TextAnimationKind_NONE; @@ -574,7 +575,7 @@ namespace slideshow uno::Reference<lang::XComponent>(xShape, uno::UNO_QUERY), xContainingPage, *mpCurrMtf, mnCurrMtfLoadFlags, mxComponentContext ); - ENSURE_AND_THROW( mpCurrMtf, + ENSURE_OR_THROW( mpCurrMtf, "DrawShape::DrawShape(): Invalid metafile" ); maSubsetting.reset( mpCurrMtf ); @@ -615,7 +616,7 @@ namespace slideshow mbAttributeLayerRevoked( false ), mbDrawingLayerAnim( false ) { - ENSURE_AND_THROW( rGraphic.IsAnimated(), + ENSURE_OR_THROW( rGraphic.IsAnimated(), "DrawShape::DrawShape(): Graphic is no animation" ); getAnimationFromGraphic( maAnimationFrames, @@ -623,14 +624,14 @@ namespace slideshow meCycleMode, rGraphic ); - ENSURE_AND_THROW( !maAnimationFrames.empty() && + ENSURE_OR_THROW( !maAnimationFrames.empty() && maAnimationFrames.front().mpMtf, "DrawShape::DrawShape(): " ); mpCurrMtf = maAnimationFrames.front().mpMtf; - ENSURE_AND_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" ); - ENSURE_AND_THROW( mxPage.is(), "DrawShape::DrawShape(): Invalid containing page" ); - ENSURE_AND_THROW( mpCurrMtf, "DrawShape::DrawShape(): Invalid metafile" ); + ENSURE_OR_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" ); + ENSURE_OR_THROW( mxPage.is(), "DrawShape::DrawShape(): Invalid containing page" ); + ENSURE_OR_THROW( mpCurrMtf, "DrawShape::DrawShape(): Invalid metafile" ); } DrawShape::DrawShape( const DrawShape& rSrc, @@ -666,8 +667,8 @@ namespace slideshow mbAttributeLayerRevoked( false ), mbDrawingLayerAnim( false ) { - ENSURE_AND_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" ); - ENSURE_AND_THROW( mpCurrMtf, "DrawShape::DrawShape(): Invalid metafile" ); + ENSURE_OR_THROW( mxShape.is(), "DrawShape::DrawShape(): Invalid XShape" ); + ENSURE_OR_THROW( mpCurrMtf, "DrawShape::DrawShape(): Invalid metafile" ); // xxx todo: currently not implemented for subsetted shapes; // would mean modifying set of hyperlink regions when @@ -1041,7 +1042,7 @@ namespace slideshow bool DrawShape::setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ) { - ENSURE_AND_RETURN( nCurrFrame < maAnimationFrames.size(), + ENSURE_OR_RETURN( nCurrFrame < maAnimationFrames.size(), "DrawShape::setIntrinsicAnimationFrame(): frame index out of bounds" ); if( mnCurrFrame != nCurrFrame ) @@ -1311,7 +1312,7 @@ namespace slideshow AttributableShapeSharedPtr DrawShape::getSubset( const DocTreeNode& rTreeNode ) const { - ENSURE_AND_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0, + ENSURE_OR_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0, "DrawShape::getSubset(): subset query on shape with apparently no subsets" ); // forward to delegate @@ -1321,7 +1322,7 @@ namespace slideshow bool DrawShape::createSubset( AttributableShapeSharedPtr& o_rSubset, const DocTreeNode& rTreeNode ) { - ENSURE_AND_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0, + ENSURE_OR_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0, "DrawShape::createSubset(): subset query on shape with apparently no subsets" ); // subset shape already created for this DocTreeNode? @@ -1365,7 +1366,7 @@ namespace slideshow bool DrawShape::revokeSubset( const AttributableShapeSharedPtr& rShape ) { - ENSURE_AND_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0, + ENSURE_OR_THROW( (mnCurrMtfLoadFlags & MTF_LOAD_VERBOSE_COMMENTS) != 0, "DrawShape::createSubset(): subset query on shape with apparently no subsets" ); // flush bounds cache |