diff options
author | thb <thb@openoffice.org> | 2010-04-12 18:17:01 +0200 |
---|---|---|
committer | thb <thb@openoffice.org> | 2010-04-12 18:17:01 +0200 |
commit | 68c8d9e269164b3fcd2987a32223c8d61d1d6ad9 (patch) | |
tree | 4290dff3362a93702fe300f7d215020b25dfe634 /slideshow | |
parent | da8e718e08b3d9bb19b3939884c5f4ba71fc3f07 (diff) | |
parent | e725e315399f527e63f919a9a6861066b1f41512 (diff) |
Merged DEV300_m76
Diffstat (limited to 'slideshow')
20 files changed, 47 insertions, 49 deletions
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index 8f563a57546f..358029e08590 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -151,7 +151,7 @@ namespace slideshow virtual bool operator()( const ::basegfx::B2DTuple& rValue ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "TupleAnimation::operator(): Invalid ShapeAttributeLayer" ); ValueT aValue( rValue.getX(), @@ -314,7 +314,7 @@ namespace slideshow virtual bool operator()( double nValue ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "PathAnimation::operator(): Invalid ShapeAttributeLayer" ); ::basegfx::B2DPoint rOutPos = ::basegfx::tools::getPositionRelative( maPathPoly, @@ -534,7 +534,7 @@ namespace slideshow */ bool operator()( const ValueT& x ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "GenericAnimation::operator(): Invalid ShapeAttributeLayer" ); ((*mpAttrLayer).*mpSetValueFunc)( maSetterModifier( x ) ); @@ -549,7 +549,7 @@ namespace slideshow */ bool operator()( ValueT x ) { - ENSURE_OR_RETURN( mpAttrLayer && mpShape, + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "GenericAnimation::operator(): Invalid ShapeAttributeLayer" ); ((*mpAttrLayer).*mpSetValueFunc)( maSetterModifier( x ) ); diff --git a/slideshow/source/engine/animationnodes/animationnodefactory.cxx b/slideshow/source/engine/animationnodes/animationnodefactory.cxx index d8d02653e8e8..868a0b8d81ac 100644 --- a/slideshow/source/engine/animationnodes/animationnodefactory.cxx +++ b/slideshow/source/engine/animationnodes/animationnodefactory.cxx @@ -198,7 +198,7 @@ bool implCreateIteratedNodes( // ================================== // TODO(E1): I'm not too sure what to expect here... - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( xIterNode->getTarget().hasValue(), "implCreateIteratedNodes(): no target on ITERATE node" ); @@ -213,14 +213,14 @@ bool implCreateIteratedNodes( { // no shape provided. Maybe a ParagraphTarget? if( !(xIterNode->getTarget() >>= aTarget) ) - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "implCreateIteratedNodes(): could not extract any " "target information" ); xTargetShape = aTarget.Shape; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( xTargetShape.is(), "implCreateIteratedNodes(): invalid shape in ParagraphTarget" ); @@ -251,7 +251,7 @@ bool implCreateIteratedNodes( // paragraph) if( bParagraphTarget ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( aTarget.Paragraph >= 0 && rTreeNodeSupplier.getNumberOfTreeNodes( DocTreeNode::NODETYPE_LOGICAL_PARAGRAPH ) > aTarget.Paragraph, @@ -322,7 +322,7 @@ bool implCreateIteratedNodes( if( !::anim::for_each_childNode( xNode, aCreator ) ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "implCreateIteratedNodes(): iterated child node creation failed" ); } @@ -445,7 +445,7 @@ bool implCreateIteratedNodes( if( !::anim::for_each_childNode( xNode, aCreator ) ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "implCreateIteratedNodes(): " "iterated child node creation failed" ); } diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index c6e2f697a5b9..b0cfa99c34f5 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -671,7 +671,7 @@ bool BaseNode::registerDeactivatingListener( if (! checkValidNode()) return false; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( rNotifee, "BaseNode::registerDeactivatingListener(): invalid notifee" ); maDeactivatingListeners.push_back( rNotifee ); diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 899b05dc52ae..ea910d60e575 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -612,7 +612,7 @@ bool EventMultiplexerImpl::notifyMouseHandlers( uno::Reference<presentation::XSlideShowView> xView( e.Source, uno::UNO_QUERY ); - ENSURE_OR_RETURN( xView.is(), "EventMultiplexer::notifyHandlers(): " + ENSURE_OR_RETURN_FALSE( xView.is(), "EventMultiplexer::notifyHandlers(): " "event source is not an XSlideShowView" ); // find corresponding view (to map mouse position into user @@ -627,7 +627,7 @@ bool EventMultiplexerImpl::notifyMouseHandlers( boost::cref( xView ), boost::bind( &UnoView::getUnoView, _1 ) ) ) ) == aEnd) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( false, "EventMultiplexer::notifyHandlers(): " "event source not found under registered views" ); } diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 3b5cd31f1307..f7af3156ff0b 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -109,7 +109,7 @@ namespace slideshow rEvent.get(), rEvent->getActivationTime(0.0)); #endif - ENSURE_OR_RETURN( rEvent, + ENSURE_OR_RETURN_FALSE( rEvent, "EventQueue::addEvent: event ptr NULL" ); // prepare entry @@ -138,7 +138,7 @@ namespace slideshow rEvent->getActivationTime(0.0)); #endif - ENSURE_OR_RETURN( rEvent.get() != NULL, + ENSURE_OR_RETURN_FALSE( rEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL" ); maNextEvents.push_back( EventEntry( rEvent, rEvent->getActivationTime( @@ -158,7 +158,7 @@ namespace slideshow rpEvent->getActivationTime(0.0)); #endif - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( rpEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL"); diff --git a/slideshow/source/engine/shapeattributelayer.cxx b/slideshow/source/engine/shapeattributelayer.cxx index 4f6de9a0fd58..ca3b9f8997aa 100644 --- a/slideshow/source/engine/shapeattributelayer.cxx +++ b/slideshow/source/engine/shapeattributelayer.cxx @@ -211,7 +211,7 @@ namespace slideshow bool ShapeAttributeLayer::revokeChildLayer( const ShapeAttributeLayerSharedPtr& rChildLayer ) { - ENSURE_OR_RETURN( rChildLayer, + ENSURE_OR_RETURN_FALSE( rChildLayer, "ShapeAttributeLayer::revokeChildLayer(): Will not remove NULL child" ); if( !haveChild() ) diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 1e99658c5743..6c1cab84e0eb 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -700,7 +700,7 @@ bool ActivityImpl::perform() if( !isActive() ) return false; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( mpDrawShape, "ActivityImpl::perform(): still active, but NULL draw shape" ); diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index e192d731fa36..dc8fe959a0e8 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -327,7 +327,7 @@ namespace slideshow mbForceUpdate = false; mbAttributeLayerRevoked = false; - ENSURE_OR_RETURN( !maViewShapes.empty(), + ENSURE_OR_RETURN_FALSE( !maViewShapes.empty(), "DrawShape::implRender(): render called on DrawShape without views" ); if( maBounds.isEmpty() ) @@ -1059,7 +1059,7 @@ namespace slideshow bool DrawShape::setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ) { - ENSURE_OR_RETURN( nCurrFrame < maAnimationFrames.size(), + ENSURE_OR_RETURN_FALSE( nCurrFrame < maAnimationFrames.size(), "DrawShape::setIntrinsicAnimationFrame(): frame index out of bounds" ); if( mnCurrFrame != nCurrFrame ) diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 0702ee52913c..ea58ec2af9d7 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -186,7 +186,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, int mtfLoadFlags, const uno::Reference< uno::XComponentContext >& rxContext ) { - ENSURE_OR_RETURN( rxContext.is(), + ENSURE_OR_RETURN_FALSE( rxContext.is(), "getMetaFile(): Invalid context" ); // create dummy XGraphicRenderer, which receives the @@ -386,7 +386,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, break; default: - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "getAnimationFromGraphic(): Unexpected case" ); break; } diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index c6c8f4381db3..fe15638edef9 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -138,7 +138,7 @@ namespace slideshow bool ViewAppletShape::startApplet( const ::basegfx::B2DRectangle& rBounds ) { - ENSURE_OR_RETURN( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), + ENSURE_OR_RETURN_FALSE( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), "ViewAppletShape::startApplet(): Invalid or disposed view" ); try { diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index a35e850339b5..bbaef1f486e0 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -68,7 +68,7 @@ namespace slideshow const GDIMetaFileSharedPtr& rMtf ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::prefetch()" ); - ENSURE_OR_RETURN( rMtf, + ENSURE_OR_RETURN_FALSE( rMtf, "ViewBackgroundShape::prefetch(): no valid metafile!" ); const ::basegfx::B2DHomMatrix& rCanvasTransform( @@ -128,7 +128,7 @@ namespace slideshow *rMtf.get(), ::cppcanvas::Renderer::Parameters() ) ); - ENSURE_OR_RETURN( pRenderer, + ENSURE_OR_RETURN_FALSE( pRenderer, "ViewBackgroundShape::prefetch(): Could not create Renderer" ); pRenderer->setTransformation( aShapeTransform ); @@ -169,7 +169,7 @@ namespace slideshow if( !prefetch( rDestinationCanvas, rMtf ) ) return false; - ENSURE_OR_RETURN( mxBitmap.is(), + ENSURE_OR_RETURN_FALSE( mxBitmap.is(), "ViewBackgroundShape::draw(): Invalid background bitmap" ); ::basegfx::B2DHomMatrix aTransform( mpViewLayer->getTransformation() ); diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index c96b7ba41d72..1c0b6f9b71a1 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -272,7 +272,7 @@ namespace slideshow { if( !mxPlayer.is() && mxShape.is() ) { - ENSURE_OR_RETURN( mpViewLayer->getCanvas(), + ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewMediaShape::update(): Invalid layer canvas" ); uno::Reference< rendering::XCanvas > xCanvas( mpViewLayer->getCanvas()->getUNOCanvas() ); diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 6d029e2ccc3f..00a4ef4006f8 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -77,7 +77,7 @@ namespace slideshow const ShapeAttributeLayerSharedPtr& rAttr ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::prefetch()" ); - ENSURE_OR_RETURN( rMtf, + ENSURE_OR_RETURN_FALSE( rMtf, "ViewShape::prefetch(): no valid metafile!" ); if( rMtf != io_rCacheEntry.mpMtf || @@ -203,7 +203,7 @@ namespace slideshow ::cppcanvas::RendererSharedPtr pRenderer( getRenderer( rDestinationCanvas, rMtf, rAttr ) ); - ENSURE_OR_RETURN( pRenderer, "ViewShape::draw(): Invalid renderer" ); + ENSURE_OR_RETURN_FALSE( pRenderer, "ViewShape::draw(): Invalid renderer" ); pRenderer->setTransformation( rTransform ); #if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 @@ -395,7 +395,7 @@ namespace slideshow mpSprite->resize( rSpriteSizePixel ); } - ENSURE_OR_RETURN( mpSprite, "ViewShape::renderSprite(): No sprite" ); + ENSURE_OR_RETURN_FALSE( mpSprite, "ViewShape::renderSprite(): No sprite" ); VERBOSE_TRACE( "ViewShape::renderSprite(): Rendering sprite 0x%X", mpSprite.get() ); @@ -869,7 +869,7 @@ namespace slideshow bool bIsVisible ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::update()" ); - ENSURE_OR_RETURN( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); + ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); // Shall we render to a sprite, or to a plain canvas? if( isBackgroundDetached() ) diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index 93d8fc6719af..5144e88fbd60 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -339,7 +339,7 @@ bool ShapeManagerImpl::listenerAdded( if( (aIter = mrGlobalListenersMap.find( xShape )) == mrGlobalListenersMap.end() ) { - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "ShapeManagerImpl::listenerAdded(): global " "shape listener map inconsistency!"); } diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 0343c357a51a..55831ba1609f 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -822,9 +822,9 @@ bool SlideImpl::implPrefetchShow() if( mbShowLoaded ) return true; - ENSURE_OR_RETURN( mxDrawPage.is(), + ENSURE_OR_RETURN_FALSE( mxDrawPage.is(), "SlideImpl::implPrefetchShow(): Invalid draw page" ); - ENSURE_OR_RETURN( mpLayerManager, + ENSURE_OR_RETURN_FALSE( mpLayerManager, "SlideImpl::implPrefetchShow(): Invalid layer manager" ); // fetch desired page content @@ -968,7 +968,7 @@ bool SlideImpl::applyInitialShapeAttributes( try { - ENSURE_OR_RETURN( maContext.mxComponentContext.is(), + ENSURE_OR_RETURN_FALSE( maContext.mxComponentContext.is(), "SlideImpl::applyInitialShapeAttributes(): Invalid component context" ); uno::Reference<lang::XMultiComponentFactory> xFac( @@ -996,7 +996,7 @@ bool SlideImpl::applyInitialShapeAttributes( // could not determine initial shape attributes - this // is an error, as some effects might then be plainly // invisible - ENSURE_OR_RETURN( false, + ENSURE_OR_RETURN_FALSE( false, "SlideImpl::applyInitialShapeAttributes(): " "couldn't create TargetPropertiesCreator." ); } @@ -1101,9 +1101,9 @@ bool SlideImpl::loadShapes() if( mbShapesLoaded ) return true; - ENSURE_OR_RETURN( mxDrawPage.is(), + ENSURE_OR_RETURN_FALSE( mxDrawPage.is(), "SlideImpl::loadShapes(): Invalid draw page" ); - ENSURE_OR_RETURN( mpLayerManager, + ENSURE_OR_RETURN_FALSE( mpLayerManager, "SlideImpl::loadShapes(): Invalid layer manager" ); // fetch desired page content diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index 68921576fcf4..01df83697fc6 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -65,7 +65,7 @@ namespace slideshow bool SlideBitmap::draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const { - ENSURE_OR_RETURN( rCanvas && rCanvas->getUNOCanvas().is(), + ENSURE_OR_RETURN_FALSE( rCanvas && rCanvas->getUNOCanvas().is(), "SlideBitmap::draw(): Invalid canvas" ); // selectively only copy the transformation from current viewstate, diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index ca9ab91d0e41..d2af8c0daaed 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1402,8 +1402,8 @@ sal_Bool SlideShowImpl::addView( DBG_TESTSOLARMUTEX(); // first of all, check if view has a valid canvas - ENSURE_OR_RETURN( xView.is(), "addView(): Invalid view" ); - ENSURE_OR_RETURN( xView->getCanvas().is(), + ENSURE_OR_RETURN_FALSE( xView.is(), "addView(): Invalid view" ); + ENSURE_OR_RETURN_FALSE( xView->getCanvas().is(), "addView(): View does not provide a valid canvas" ); UnoViewSharedPtr const pView( createSlideView( @@ -1446,7 +1446,7 @@ sal_Bool SlideShowImpl::removeView( // precondition: must only be called from the main thread! DBG_TESTSOLARMUTEX(); - ENSURE_OR_RETURN( xView.is(), "removeView(): Invalid view" ); + ENSURE_OR_RETURN_FALSE( xView.is(), "removeView(): Invalid view" ); UnoViewSharedPtr const pView( maViewContainer.removeView( xView ) ); if( !pView ) diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 8110fee710b3..9573f3c29a3d 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -83,9 +83,7 @@ struct StaticUnitRectPoly : public rtl::StaticWithInit<basegfx::B2DPolygon, Stat { basegfx::B2DPolygon operator()() { - return basegfx::tools::createPolygonFromRect( - basegfx::B2DRectangle( 0.0, 0.0, - 1.0, 1.0 ) ); + return basegfx::tools::createUnitPolygon(); } }; @@ -852,7 +850,7 @@ bool SlideView::updateScreen() const { osl::MutexGuard aGuard( m_aMutex ); - ENSURE_OR_RETURN( mpCanvas.get(), + ENSURE_OR_RETURN_FALSE( mpCanvas.get(), "SlideView::updateScreen(): Disposed" ); return mpCanvas->updateScreen( false ); @@ -862,7 +860,7 @@ bool SlideView::paintScreen() const { osl::MutexGuard aGuard( m_aMutex ); - ENSURE_OR_RETURN( mpCanvas.get(), + ENSURE_OR_RETURN_FALSE( mpCanvas.get(), "SlideView::paintScreen(): Disposed" ); return mpCanvas->updateScreen( true ); diff --git a/slideshow/source/engine/transitions/shapetransitionfactory.cxx b/slideshow/source/engine/transitions/shapetransitionfactory.cxx index 7e120e7e57bb..667bd6d17c22 100644 --- a/slideshow/source/engine/transitions/shapetransitionfactory.cxx +++ b/slideshow/source/engine/transitions/shapetransitionfactory.cxx @@ -182,7 +182,7 @@ void ClippingAnimation::end_() bool ClippingAnimation::operator()( double nValue ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( mpAttrLayer && mpShape, "ClippingAnimation::operator(): Invalid ShapeAttributeLayer" ); diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx index 7ecbe62acd9b..0b043968b9c6 100644 --- a/slideshow/source/engine/usereventqueue.cxx +++ b/slideshow/source/engine/usereventqueue.cxx @@ -178,7 +178,7 @@ public: virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode ) { - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( rNode, "AllAnimationEventHandler::handleAnimationEvent(): Invalid node" ); |