diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-14 11:45:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-14 11:45:22 +0200 |
commit | 21595018cd22345ef15dc13d0ccf9cc5a89660fe (patch) | |
tree | a0e8e414348ba3c4c9a27025548b1265d7441b62 /slideshow | |
parent | 8ac02b48579c18c1f3c394ea1ae8eb76262eb1e7 (diff) |
loplugin:unusedmethods unused return value in slideshow
Change-Id: I1ed955a0e474a755949e80eef60c8cd19f43fd0e
Diffstat (limited to 'slideshow')
29 files changed, 115 insertions, 218 deletions
diff --git a/slideshow/source/engine/animatedsprite.cxx b/slideshow/source/engine/animatedsprite.cxx index 48edbcad92fa..2c1870119bcd 100644 --- a/slideshow/source/engine/animatedsprite.cxx +++ b/slideshow/source/engine/animatedsprite.cxx @@ -89,7 +89,7 @@ namespace slideshow return pContentCanvas; } - bool AnimatedSprite::resize( const ::basegfx::B2DSize& rSpriteSizePixel ) + void AnimatedSprite::resize( const ::basegfx::B2DSize& rSpriteSizePixel ) { // Enlarge or reduce the sprite size, if necessary. This // method employs a strategy similar to container, when @@ -148,8 +148,6 @@ namespace slideshow mpSprite->setClip( *maClip ); } } - - return static_cast< bool >(mpSprite); } void AnimatedSprite::setPixelOffset( const ::basegfx::B2DSize& rPixelOffset ) diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx index 95e9ef1ddf4d..cd4aa9b31756 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.cxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx @@ -163,13 +163,12 @@ bool BaseContainerNode::notifyDeactivatedChild( return bFinished; } -bool BaseContainerNode::repeat() +void BaseContainerNode::repeat() { forEachChildNode( boost::mem_fn(&AnimationNode::end), ~ENDED ); bool bState = init_children(); if( bState ) activate_st(); - return bState; } #if defined(DBG_UTIL) diff --git a/slideshow/source/engine/animationnodes/basecontainernode.hxx b/slideshow/source/engine/animationnodes/basecontainernode.hxx index 7549039b7106..7fb308c44ab8 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.hxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.hxx @@ -66,7 +66,7 @@ protected: /// @return true: if all children have been deactivated bool notifyDeactivatedChild( AnimationNodeSharedPtr const& pChildNode ); - bool repeat(); + void repeat(); template <typename FuncT> inline void forEachChildNode( FuncT const& func, diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index b2e66b0ae6f1..d7af870a4f04 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -490,14 +490,14 @@ bool BaseNode::resolve_st() } -bool BaseNode::activate() +void BaseNode::activate() { if (! checkValidNode()) - return false; + return; OSL_ASSERT( meCurrState != ACTIVE ); if (inStateOrTransition( ACTIVE )) - return true; + return; StateTransition st(this); if (st.enter( ACTIVE )) { @@ -507,11 +507,7 @@ bool BaseNode::activate() st.commit(); // changing state maContext.mrEventMultiplexer.notifyAnimationStart( mpSelf ); - - return true; } - - return false; } void BaseNode::activate_st() diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx index 25dd2b94fadc..0d244832d508 100644 --- a/slideshow/source/engine/animationnodes/basenode.hxx +++ b/slideshow/source/engine/animationnodes/basenode.hxx @@ -106,7 +106,7 @@ public: // AnimationNode: virtual bool init() override; virtual bool resolve() override; - virtual bool activate() override; + virtual void activate() override; virtual void deactivate() override; virtual void end() override; virtual css::uno::Reference<css::animations::XAnimationNode> getXAnimationNode() const override; diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index ef9a95945f4f..c58734001eb0 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -981,66 +981,66 @@ void EventMultiplexer::removeHyperlinkHandler( const HyperlinkHandlerSharedPtr& 0.0) ); } -bool EventMultiplexer::notifyShapeListenerAdded( +void EventMultiplexer::notifyShapeListenerAdded( const uno::Reference<presentation::XShapeEventListener>& xListener, const uno::Reference<drawing::XShape>& xShape ) { - return mpImpl->maShapeListenerHandlers.applyAll( + mpImpl->maShapeListenerHandlers.applyAll( [&xListener, &xShape]( const ShapeListenerEventHandlerSharedPtr& pHandler ) { return pHandler->listenerAdded( xListener, xShape ); } ); } -bool EventMultiplexer::notifyShapeListenerRemoved( +void EventMultiplexer::notifyShapeListenerRemoved( const uno::Reference<presentation::XShapeEventListener>& xListener, const uno::Reference<drawing::XShape>& xShape ) { - return mpImpl->maShapeListenerHandlers.applyAll( + mpImpl->maShapeListenerHandlers.applyAll( [&xListener, &xShape]( const ShapeListenerEventHandlerSharedPtr& pHandler ) { return pHandler->listenerRemoved( xListener, xShape ); } ); } -bool EventMultiplexer::notifyUserPaintColor( RGBColor const& rUserColor ) +void EventMultiplexer::notifyUserPaintColor( RGBColor const& rUserColor ) { - return mpImpl->maUserPaintEventHandlers.applyAll( + mpImpl->maUserPaintEventHandlers.applyAll( [&rUserColor]( const UserPaintEventHandlerSharedPtr& pHandler ) { return pHandler->colorChanged( rUserColor ); } ); } -bool EventMultiplexer::notifyUserPaintStrokeWidth( double rUserStrokeWidth ) +void EventMultiplexer::notifyUserPaintStrokeWidth( double rUserStrokeWidth ) { - return mpImpl->maUserPaintEventHandlers.applyAll( + mpImpl->maUserPaintEventHandlers.applyAll( [&rUserStrokeWidth]( const UserPaintEventHandlerSharedPtr& pHandler ) { return pHandler->widthChanged( rUserStrokeWidth ); } ); } -bool EventMultiplexer::notifyUserPaintDisabled() +void EventMultiplexer::notifyUserPaintDisabled() { - return mpImpl->maUserPaintEventHandlers.applyAll( + mpImpl->maUserPaintEventHandlers.applyAll( boost::mem_fn(&UserPaintEventHandler::disable)); } -bool EventMultiplexer::notifySwitchPenMode(){ - return mpImpl->maUserPaintEventHandlers.applyAll( +void EventMultiplexer::notifySwitchPenMode(){ + mpImpl->maUserPaintEventHandlers.applyAll( boost::mem_fn(&UserPaintEventHandler::switchPenMode)); } -bool EventMultiplexer::notifySwitchEraserMode(){ - return mpImpl->maUserPaintEventHandlers.applyAll( +void EventMultiplexer::notifySwitchEraserMode(){ + mpImpl->maUserPaintEventHandlers.applyAll( boost::mem_fn(&UserPaintEventHandler::switchEraserMode)); } //adding erasing all ink features with UserPaintOverlay -bool EventMultiplexer::notifyEraseAllInk( bool const& rEraseAllInk ) +void EventMultiplexer::notifyEraseAllInk( bool const& rEraseAllInk ) { - return mpImpl->maUserPaintEventHandlers.applyAll( + mpImpl->maUserPaintEventHandlers.applyAll( [&rEraseAllInk]( const UserPaintEventHandlerSharedPtr& pHandler ) { return pHandler->eraseAllInkChanged( rEraseAllInk ); } ); } //adding erasing features with UserPaintOverlay -bool EventMultiplexer::notifyEraseInkWidth( sal_Int32 rEraseInkSize ) +void EventMultiplexer::notifyEraseInkWidth( sal_Int32 rEraseInkSize ) { - return mpImpl->maUserPaintEventHandlers.applyAll( + mpImpl->maUserPaintEventHandlers.applyAll( [&rEraseInkSize]( const UserPaintEventHandlerSharedPtr& pHandler ) { return pHandler->eraseInkWidthChanged( rEraseInkSize ); } ); } @@ -1050,9 +1050,9 @@ bool EventMultiplexer::notifyNextEffect() return mpImpl->notifyNextEffect(); } -bool EventMultiplexer::notifySlideStartEvent() +void EventMultiplexer::notifySlideStartEvent() { - return mpImpl->maSlideStartHandlers.applyAll( + mpImpl->maSlideStartHandlers.applyAll( boost::mem_fn(&EventHandler::handleEvent) ); } @@ -1098,14 +1098,14 @@ bool EventMultiplexer::notifyCommandStopAudio( rNode ); } -bool EventMultiplexer::notifyPauseMode( bool bPauseShow ) +void EventMultiplexer::notifyPauseMode( bool bPauseShow ) { - return mpImpl->maPauseHandlers.applyAll( + mpImpl->maPauseHandlers.applyAll( [&bPauseShow]( const PauseEventHandlerSharedPtr& pHandler ) { return pHandler->handlePause( bPauseShow ); } ); } -bool EventMultiplexer::notifyViewAdded( const UnoViewSharedPtr& rView ) +void EventMultiplexer::notifyViewAdded( const UnoViewSharedPtr& rView ) { ENSURE_OR_THROW( rView, "EventMultiplexer::notifyViewAdded(): Invalid view"); @@ -1121,12 +1121,12 @@ bool EventMultiplexer::notifyViewAdded( const UnoViewSharedPtr& rView ) rUnoView->addMouseMotionListener( mpImpl->mxListener.get() ); - return mpImpl->maViewHandlers.applyAll( + mpImpl->maViewHandlers.applyAll( [&rView]( const ViewEventHandlerWeakPtr& pHandler ) { return pHandler.lock()->viewAdded( rView ); } ); } -bool EventMultiplexer::notifyViewRemoved( const UnoViewSharedPtr& rView ) +void EventMultiplexer::notifyViewRemoved( const UnoViewSharedPtr& rView ) { ENSURE_OR_THROW( rView, "EventMultiplexer::removeView(): Invalid view" ); @@ -1143,7 +1143,7 @@ bool EventMultiplexer::notifyViewRemoved( const UnoViewSharedPtr& rView ) rUnoView->removeMouseMotionListener( mpImpl->mxListener.get() ); - return mpImpl->maViewHandlers.applyAll( + mpImpl->maViewHandlers.applyAll( [&rView]( const ViewEventHandlerWeakPtr& pHandler ) { return pHandler.lock()->viewRemoved( rView ); } ); } @@ -1155,39 +1155,39 @@ bool EventMultiplexer::notifyViewChanged( const UnoViewSharedPtr& rView ) { return pHandler.lock()->viewChanged( rView ); } ); } -bool EventMultiplexer::notifyViewChanged( const uno::Reference<presentation::XSlideShowView>& xView ) +void EventMultiplexer::notifyViewChanged( const uno::Reference<presentation::XSlideShowView>& xView ) { UnoViewSharedPtr pView( mpImpl->findUnoView(xView) ); if( !pView ) - return false; // view not registered here + return; // view not registered here - return notifyViewChanged( pView ); + notifyViewChanged( pView ); } -bool EventMultiplexer::notifyViewsChanged() +void EventMultiplexer::notifyViewsChanged() { - return mpImpl->maViewHandlers.applyAll( + mpImpl->maViewHandlers.applyAll( boost::mem_fn( &ViewEventHandler::viewsChanged )); } -bool EventMultiplexer::notifyViewClobbered( +void EventMultiplexer::notifyViewClobbered( const uno::Reference<presentation::XSlideShowView>& xView ) { UnoViewSharedPtr pView( mpImpl->findUnoView(xView) ); if( !pView ) - return false; // view not registered here + return; // view not registered here - return mpImpl->maViewRepaintHandlers.applyAll( + mpImpl->maViewRepaintHandlers.applyAll( [&pView]( const ViewRepaintHandlerSharedPtr& pHandler ) { return pHandler->viewClobbered( pView ); } ); } -bool EventMultiplexer::notifyHyperlinkClicked( +void EventMultiplexer::notifyHyperlinkClicked( OUString const& hyperLink ) { - return mpImpl->maHyperlinkHandlers.apply( + mpImpl->maHyperlinkHandlers.apply( [&hyperLink]( const PrioritizedHandlerEntry< HyperlinkHandler >& pHandler ) { return pHandler.getHandler()->handleHyperlink( hyperLink ); } ); } diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx index 5bf234780dd2..a034e28281a6 100644 --- a/slideshow/source/engine/shapes/appletshape.cxx +++ b/slideshow/source/engine/shapes/appletshape.cxx @@ -82,7 +82,7 @@ namespace slideshow virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer, bool bRedrawLayer ) override; virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ) override; - virtual bool clearAllViewLayers() override; + virtual void clearAllViewLayers() override; // ExternalShapeBase methods @@ -93,7 +93,7 @@ namespace slideshow virtual void implViewsChanged() override; virtual bool implStartIntrinsicAnimation() override; virtual bool implEndIntrinsicAnimation() override; - virtual bool implPauseIntrinsicAnimation() override; + virtual void implPauseIntrinsicAnimation() override; virtual bool implIsIntrinsicAnimationPlaying() const override; virtual void implSetIntrinsicAnimationTime(double) override; @@ -207,10 +207,9 @@ namespace slideshow - bool AppletShape::clearAllViewLayers() + void AppletShape::clearAllViewLayers() { maViewAppletShapes.clear(); - return true; } @@ -260,11 +259,10 @@ namespace slideshow - bool AppletShape::implPauseIntrinsicAnimation() + void AppletShape::implPauseIntrinsicAnimation() { // TODO(F1): any way of temporarily disabling/deactivating // applets? - return true; } diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx index a0dcb61bce2e..80c15268a2cd 100644 --- a/slideshow/source/engine/shapes/backgroundshape.cxx +++ b/slideshow/source/engine/shapes/backgroundshape.cxx @@ -80,7 +80,7 @@ namespace slideshow virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer, bool bRedrawLayer ) override; virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ) override; - virtual bool clearAllViewLayers() override; + virtual void clearAllViewLayers() override; // attribute methods @@ -209,10 +209,9 @@ namespace slideshow return true; } - bool BackgroundShape::clearAllViewLayers() + void BackgroundShape::clearAllViewLayers() { maViewShapes.clear(); - return true; } ::basegfx::B2DRectangle BackgroundShape::getBounds() const diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index 16b157951e50..fb80f60984a7 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -681,10 +681,9 @@ namespace slideshow return true; } - bool DrawShape::clearAllViewLayers() + void DrawShape::clearAllViewLayers() { maViewShapes.clear(); - return true; } bool DrawShape::update() const @@ -836,9 +835,9 @@ namespace slideshow return (!maAnimationFrames.empty() || mbDrawingLayerAnim); } - bool DrawShape::setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ) + void DrawShape::setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ) { - ENSURE_OR_RETURN_FALSE( nCurrFrame < maAnimationFrames.size(), + ENSURE_OR_RETURN_VOID( nCurrFrame < maAnimationFrames.size(), "DrawShape::setIntrinsicAnimationFrame(): frame index out of bounds" ); if( mnCurrFrame != nCurrFrame ) @@ -847,8 +846,6 @@ namespace slideshow mpCurrMtf = maAnimationFrames[ mnCurrFrame ].mpMtf; mbForceUpdate = true; } - - return true; } // hyperlink support diff --git a/slideshow/source/engine/shapes/drawshape.hxx b/slideshow/source/engine/shapes/drawshape.hxx index b6f6cb24b41e..5cc1d59a9d1e 100644 --- a/slideshow/source/engine/shapes/drawshape.hxx +++ b/slideshow/source/engine/shapes/drawshape.hxx @@ -125,7 +125,7 @@ namespace slideshow virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer, bool bRedrawLayer ) override; virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ) override; - virtual bool clearAllViewLayers() override; + virtual void clearAllViewLayers() override; // attribute methods @@ -195,7 +195,7 @@ namespace slideshow Used by IntrinsicAnimationActivity, to show the next animation frame. */ - bool setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ); + void setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ); /** forces the drawshape to load and return a specially crafted metafile, usable to display drawing layer text diff --git a/slideshow/source/engine/shapes/externalshapebase.hxx b/slideshow/source/engine/shapes/externalshapebase.hxx index 5e89d82ba345..4455b1c2a6dd 100644 --- a/slideshow/source/engine/shapes/externalshapebase.hxx +++ b/slideshow/source/engine/shapes/externalshapebase.hxx @@ -109,7 +109,7 @@ namespace slideshow /// override in derived class to stop external viewer virtual bool implEndIntrinsicAnimation() = 0; /// override in derived class to pause external viewer - virtual bool implPauseIntrinsicAnimation() = 0; + virtual void implPauseIntrinsicAnimation() = 0; /// override in derived class to return status of animation virtual bool implIsIntrinsicAnimationPlaying() const = 0; /// override in derived class to set media time diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx index 00c029def801..2961be5d9fd3 100644 --- a/slideshow/source/engine/shapes/mediashape.cxx +++ b/slideshow/source/engine/shapes/mediashape.cxx @@ -68,7 +68,7 @@ namespace slideshow virtual void addViewLayer( const ViewLayerSharedPtr& rNewLayer, bool bRedrawLayer ) override; virtual bool removeViewLayer( const ViewLayerSharedPtr& rNewLayer ) override; - virtual bool clearAllViewLayers() override; + virtual void clearAllViewLayers() override; // ExternalShapeBase methods @@ -79,7 +79,7 @@ namespace slideshow virtual void implViewsChanged() override; virtual bool implStartIntrinsicAnimation() override; virtual bool implEndIntrinsicAnimation() override; - virtual bool implPauseIntrinsicAnimation() override; + virtual void implPauseIntrinsicAnimation() override; virtual bool implIsIntrinsicAnimationPlaying() const override; virtual void implSetIntrinsicAnimationTime(double) override; @@ -171,10 +171,9 @@ namespace slideshow - bool MediaShape::clearAllViewLayers() + void MediaShape::clearAllViewLayers() { maViewMediaShapes.clear(); - return true; } @@ -223,14 +222,12 @@ namespace slideshow - bool MediaShape::implPauseIntrinsicAnimation() + void MediaShape::implPauseIntrinsicAnimation() { for( const auto& pViewMediaShape : maViewMediaShapes ) pViewMediaShape->pauseMedia(); mbIsPlaying = false; - - return true; } diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index fc247ca61db6..79d439289840 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -157,7 +157,7 @@ public: virtual void addViewLayer( ViewLayerSharedPtr const& pNewLayer, bool bRedrawLayer ) override; virtual bool removeViewLayer( ViewLayerSharedPtr const& pNewLayer ) override; - virtual bool clearAllViewLayers() override; + virtual void clearAllViewLayers() override; virtual bool update() const override; virtual bool render() const override; virtual bool isContentChanged() const override; @@ -210,9 +210,8 @@ bool ShapeOfGroup::removeViewLayer( ViewLayerSharedPtr const& /*pNewLayer*/ ) return true; } -bool ShapeOfGroup::clearAllViewLayers() +void ShapeOfGroup::clearAllViewLayers() { - return true; } bool ShapeOfGroup::update() const diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index 7afef45cb56a..495e24f7b8ef 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -123,9 +123,9 @@ namespace slideshow - bool ViewAppletShape::startApplet( const ::basegfx::B2DRectangle& rBounds ) + void ViewAppletShape::startApplet( const ::basegfx::B2DRectangle& rBounds ) { - ENSURE_OR_RETURN_FALSE( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), + ENSURE_OR_RETURN_VOID( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), "ViewAppletShape::startApplet(): Invalid or disposed view" ); try { @@ -203,10 +203,7 @@ namespace slideshow } catch (uno::Exception &) { - return false; } - - return true; } diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx index f6e266e4640b..0f0591be46ec 100644 --- a/slideshow/source/engine/shapes/viewappletshape.hxx +++ b/slideshow/source/engine/shapes/viewappletshape.hxx @@ -98,10 +98,8 @@ namespace slideshow @param rBounds The current applet shape bounds - - @return whether the mode change finished successfully. */ - bool startApplet( const ::basegfx::B2DRectangle& rBounds ); + void startApplet( const ::basegfx::B2DRectangle& rBounds ); /** Notify the ViewShape that it is no longer animated diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index e3674d9867f8..05d5cf70b01b 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -120,15 +120,13 @@ namespace slideshow - bool ViewMediaShape::startMedia() + void ViewMediaShape::startMedia() { if( !mxPlayer.is() ) implInitialize( maBounds ); if (mxPlayer.is()) mxPlayer->start(); - - return true; } @@ -431,7 +429,7 @@ namespace slideshow - bool ViewMediaShape::implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds, + void ViewMediaShape::implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds, const uno::Sequence< uno::Any >& rVCLDeviceParams, const OUString& rMimeType ) { @@ -534,8 +532,6 @@ namespace slideshow RTL_TEXTENCODING_UTF8 ).getStr() ); } } - - return mxPlayerWindow.is(); } } } diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index d001ddadc1d8..0bd98b951309 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -84,10 +84,8 @@ namespace slideshow This method enters animation mode on the associate target view. The shape can be animated in parallel on different views. - - @return whether the mode change finished successfully. */ - bool startMedia(); + void startMedia(); /** Notify the ViewShape that it is no longer animated @@ -141,7 +139,7 @@ namespace slideshow bool implInitialize( const ::basegfx::B2DRectangle& rBounds ); void implSetMediaProperties( const css::uno::Reference< css::beans::XPropertySet >& rxProps ); void implInitializeMediaPlayer( const OUString& rMediaURL, const OUString& rMimeType ); - bool implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds, + void implInitializePlayerWindow( const ::basegfx::B2DRectangle& rBounds, const css::uno::Sequence< css::uno::Any >& rVCLDeviceParams, const OUString& rMimeType ); ViewLayerSharedPtr mpViewLayer; diff --git a/slideshow/source/engine/shapesubset.cxx b/slideshow/source/engine/shapesubset.cxx index 04b1fbff227b..e5c5eee7e8fd 100644 --- a/slideshow/source/engine/shapesubset.cxx +++ b/slideshow/source/engine/shapesubset.cxx @@ -93,7 +93,7 @@ namespace slideshow return mpSubsetShape ? mpSubsetShape : mpOriginalShape; } - bool ShapeSubset::enableSubsetShape() + void ShapeSubset::enableSubsetShape() { if( !mpSubsetShape && !maTreeNode.isEmpty() ) @@ -102,8 +102,6 @@ namespace slideshow mpOriginalShape, maTreeNode ); } - - return static_cast< bool >(mpSubsetShape); } void ShapeSubset::disableSubsetShape() diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index a484cae6a309..de546680a4c4 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -323,14 +323,14 @@ bool ShapeManagerImpl::listenerRemoved( return true; } -bool ShapeManagerImpl::cursorChanged( const uno::Reference<drawing::XShape>& xShape, +void ShapeManagerImpl::cursorChanged( const uno::Reference<drawing::XShape>& xShape, sal_Int16 nCursor ) { ShapeSharedPtr pShape( lookupShape(xShape) ); // is this one of our shapes? other shapes are ignored. if( !pShape ) - return false; + return; if( mrGlobalCursorMap.find(xShape) == mrGlobalCursorMap.end() ) { @@ -354,8 +354,6 @@ bool ShapeManagerImpl::cursorChanged( const uno::Reference<drawing::XShape>& x aIter->second = nCursor; } } - - return true; } OUString ShapeManagerImpl::checkForHyperlink( basegfx::B2DPoint const& hitPos ) const @@ -392,15 +390,15 @@ void ShapeManagerImpl::removeIntrinsicAnimationHandler( const IntrinsicAnimation maIntrinsicAnimationEventHandlers.remove( rHandler ); } -bool ShapeManagerImpl::notifyIntrinsicAnimationsEnabled() +void ShapeManagerImpl::notifyIntrinsicAnimationsEnabled() { - return maIntrinsicAnimationEventHandlers.applyAll( + maIntrinsicAnimationEventHandlers.applyAll( boost::mem_fn(&IntrinsicAnimationEventHandler::enableAnimations)); } -bool ShapeManagerImpl::notifyIntrinsicAnimationsDisabled() +void ShapeManagerImpl::notifyIntrinsicAnimationsDisabled() { - return maIntrinsicAnimationEventHandlers.applyAll( + maIntrinsicAnimationEventHandlers.applyAll( boost::mem_fn(&IntrinsicAnimationEventHandler::disableAnimations)); } diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx index 5fbe14f11e56..1e0fd8912312 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.hxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx @@ -136,8 +136,8 @@ private: const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) override; virtual void removeIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) override; - virtual bool notifyIntrinsicAnimationsEnabled() override; - virtual bool notifyIntrinsicAnimationsDisabled() override; + virtual void notifyIntrinsicAnimationsEnabled() override; + virtual void notifyIntrinsicAnimationsDisabled() override; // ShapeListenerEventHandler @@ -149,7 +149,7 @@ private: virtual bool listenerRemoved( const css::uno::Reference< css::presentation::XShapeEventListener>& xListener, const css::uno::Reference< css::drawing::XShape>& xShape ) override; - bool cursorChanged( const css::uno::Reference< css::drawing::XShape>& xShape, + void cursorChanged( const css::uno::Reference< css::drawing::XShape>& xShape, sal_Int16 nCursor ); diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 45c98551b0e6..e289ea6ce9d0 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -108,8 +108,8 @@ public: // Slide interface - virtual bool prefetch() override; - virtual bool show( bool ) override; + virtual void prefetch() override; + virtual void show( bool ) override; virtual void hide() override; virtual basegfx::B2ISize getSlideSize() const override; @@ -410,32 +410,26 @@ SlideImpl::~SlideImpl() } } -bool SlideImpl::prefetch() +void SlideImpl::prefetch() { if( !mxRootNode.is() ) - return false; + return; - return applyInitialShapeAttributes(mxRootNode); + applyInitialShapeAttributes(mxRootNode); } -bool SlideImpl::show( bool bSlideBackgoundPainted ) +void SlideImpl::show( bool bSlideBackgoundPainted ) { - - if( mbActive ) - return true; // already active + return; // already active if( !mpShapeManager || !mpLayerManager ) - return false; // disposed - - + return; // disposed // set initial shape attributes (e.g. hide shapes that have // 'appear' effect set) if( !applyInitialShapeAttributes(mxRootNode) ) - return false; - - + return; // activate and take over view - clears view, if necessary mbActive = true; @@ -486,17 +480,12 @@ bool SlideImpl::show( bool bSlideBackgoundPainted ) if( mbIntrinsicAnimationsAllowed ) startIntrinsicAnimations(); - - // enable paint overlay, if maUserPaintColor is valid activatePaintOverlay(); - // from now on, animations might be showing meAnimationState = SHOWING_STATE; - - return true; } void SlideImpl::hide() diff --git a/slideshow/source/inc/animatedsprite.hxx b/slideshow/source/inc/animatedsprite.hxx index c6c1e4b9af38..8e9520296c57 100644 --- a/slideshow/source/inc/animatedsprite.hxx +++ b/slideshow/source/inc/animatedsprite.hxx @@ -73,11 +73,8 @@ namespace slideshow @param rSpriteSizePixel The new size in pixel - - @return true, if the resize was successful. If false - is returned, the sprite might be invalid. */ - bool resize( const ::basegfx::B2DSize& rSpriteSizePixel ); + void resize( const ::basegfx::B2DSize& rSpriteSizePixel ); /** Set an offset for the content output in pixel diff --git a/slideshow/source/inc/animationnode.hxx b/slideshow/source/inc/animationnode.hxx index 8eabe47e98be..eb856cc5d613 100644 --- a/slideshow/source/inc/animationnode.hxx +++ b/slideshow/source/inc/animationnode.hxx @@ -86,12 +86,8 @@ public: This method starts the animation on this node, without begin timeout. The node will change its state to ACTIVE. - - @return true, if start was successful. This method - might return false, if e.g. a restart is not permitted - on this node. */ - virtual bool activate() = 0; + virtual void activate() = 0; /** Immediately stop this node diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx index e808b6d1a39a..4ae4feaa54e7 100644 --- a/slideshow/source/inc/eventmultiplexer.hxx +++ b/slideshow/source/inc/eventmultiplexer.hxx @@ -445,14 +445,14 @@ public: displayed on. On every added view, the EventMultiplexer registers mouse and motion event listeners. */ - bool notifyViewAdded( const UnoViewSharedPtr& rView ); + void notifyViewAdded( const UnoViewSharedPtr& rView ); /** View removed This method removes a view. Registered mouse and motion event listeners are revoked. */ - bool notifyViewRemoved( const UnoViewSharedPtr& rView ); + void notifyViewRemoved( const UnoViewSharedPtr& rView ); /** View changed @@ -472,7 +472,7 @@ public: @param xView View that has changed */ - bool notifyViewChanged( const css::uno::Reference<css::presentation::XSlideShowView>& xView ); + void notifyViewChanged( const css::uno::Reference<css::presentation::XSlideShowView>& xView ); /** All Views changed @@ -480,7 +480,7 @@ public: <em>every</em> known view has changed. View changes include size and transformation. */ - bool notifyViewsChanged(); + void notifyViewsChanged(); /** View clobbered @@ -490,28 +490,22 @@ public: @param xView View that has been clobbered */ - bool notifyViewClobbered( const css::uno::Reference<css::presentation::XSlideShowView>& xView ); + void notifyViewClobbered( const css::uno::Reference<css::presentation::XSlideShowView>& xView ); /** New shape event listener added This method announces that the given listener was added for the specified shape. - - @return true, if at least one handler successfully processed - the notification. */ - bool notifyShapeListenerAdded( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener, + void notifyShapeListenerAdded( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener, const css::uno::Reference<css::drawing::XShape>& xShape ); /** A shape event listener was removed This method announces that the given listener was removed for the specified shape. - - @return true, if at least one handler successfully processed - the notification. */ - bool notifyShapeListenerRemoved( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener, + void notifyShapeListenerRemoved( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener, const css::uno::Reference<css::drawing::XShape>& xShape ); /** Notify a new user paint color @@ -519,23 +513,15 @@ public: Sending this notification also implies that user paint is enabled. User paint denotes the feature to draw colored lines on top of the slide content. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - bool notifyUserPaintColor( RGBColor const& rUserColor ); + void notifyUserPaintColor( RGBColor const& rUserColor ); /** Notify a new user paint width Sending this notification also implies that user paint is enabled. . - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) - */ - bool notifyUserPaintStrokeWidth( double rUserStrokeWidth ); + */ + void notifyUserPaintStrokeWidth( double rUserStrokeWidth ); /** Notify a new user paint erase all ink mode @@ -543,26 +529,18 @@ public: Sending this notification also implies that user paint is enabled. User paint denotes the feature to draw colored lines on top of the slide content. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - bool notifyEraseAllInk( bool const& rEraseAllInk ); - bool notifySwitchPenMode(); - bool notifySwitchEraserMode(); - bool notifyEraseInkWidth( sal_Int32 rEraseInkSize ); + void notifyEraseAllInk( bool const& rEraseAllInk ); + void notifySwitchPenMode(); + void notifySwitchEraserMode(); + void notifyEraseInkWidth( sal_Int32 rEraseInkSize ); /** Notify that user paint is disabled User paint denotes the feature to draw colored lines on top of the slide content. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - bool notifyUserPaintDisabled(); + void notifyUserPaintDisabled(); /** Notify that the user requested the next effect. @@ -580,12 +558,8 @@ public: This method is to be used from the Presentation object to signal that a new slide is starting now. This will invoke all registered slide start handlers. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - bool notifySlideStartEvent(); + void notifySlideStartEvent(); /** Notify that a slide has ended @@ -662,12 +636,8 @@ public: to signal that a slide is entering (bPauseShow=true) or exiting (bPauseShow=false) pause mode. This will invoke all registered slide end handlers. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - bool notifyPauseMode( bool bPauseShow ); + void notifyPauseMode( bool bPauseShow ); /** Notify that all audio has to be stopped. @@ -682,12 +652,8 @@ public: bool notifyCommandStopAudio( const boost::shared_ptr<AnimationNode>& rNode ); /** Notifies that a hyperlink has been clicked. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - bool notifyHyperlinkClicked( OUString const& hyperLink ); + void notifyHyperlinkClicked( OUString const& hyperLink ); private: std::unique_ptr<EventMultiplexerImpl> mpImpl; diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx index db9f2aec3c45..4416c6aafdbf 100644 --- a/slideshow/source/inc/listenercontainer.hxx +++ b/slideshow/source/inc/listenercontainer.hxx @@ -252,25 +252,20 @@ public: @param rListener Listener to add - - @return false, if the listener is already added, true - otherwise */ - bool add( listener_type const& rListener ) + void add( listener_type const& rListener ) { Guard aGuard(*this); // ensure uniqueness if( isAdded(rListener) ) - return false; // already added + return; // already added maListeners.push_back( rListener ); ListenerOperations<ListenerT>::pruneListeners( maListeners, MaxDeceasedListenerUllage); - - return true; } /** Add new listener into sorted container diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx index a0ed0d38d7ac..7bcb7147a72a 100644 --- a/slideshow/source/inc/shape.hxx +++ b/slideshow/source/inc/shape.hxx @@ -99,7 +99,7 @@ namespace slideshow This method will be faster than repeated removeViewLayer() calls. */ - virtual bool clearAllViewLayers() = 0; + virtual void clearAllViewLayers() = 0; // render methods @@ -246,10 +246,6 @@ namespace slideshow return compare(rLHS.get(),rRHS.get()); } - bool operator()(const Shape* pLHS, const Shape* pRHS) const - { - return compare(pLHS, pRHS); - } }; }; diff --git a/slideshow/source/inc/shapesubset.hxx b/slideshow/source/inc/shapesubset.hxx index e32fb0c23193..6405da78ab1d 100644 --- a/slideshow/source/inc/shapesubset.hxx +++ b/slideshow/source/inc/shapesubset.hxx @@ -104,10 +104,8 @@ namespace slideshow successful completion of this method, the original shape will cease to show the subset range, and getSubsetShape() will return a valid shape. - - @return true, if subsetting was successfully enabled. */ - bool enableSubsetShape(); + void enableSubsetShape(); /** Disable the subset shape. diff --git a/slideshow/source/inc/slide.hxx b/slideshow/source/inc/slide.hxx index 8c3b40f9d4a9..264b2a235bd5 100644 --- a/slideshow/source/inc/slide.hxx +++ b/slideshow/source/inc/slide.hxx @@ -67,7 +67,7 @@ namespace slideshow prefetch() is not called explicitly, the named methods will call it implicitly. */ - virtual bool prefetch() = 0; + virtual void prefetch() = 0; /** Shows the slide on all registered views @@ -80,7 +80,7 @@ namespace slideshow transition). When false, Slide renders initial content of slide. */ - virtual bool show( bool bSlideBackgoundPainted ) = 0; + virtual void show( bool bSlideBackgoundPainted ) = 0; /** Force-ends the slide diff --git a/slideshow/source/inc/subsettableshapemanager.hxx b/slideshow/source/inc/subsettableshapemanager.hxx index 42f58bb5a9c1..54cc34db4200 100644 --- a/slideshow/source/inc/subsettableshapemanager.hxx +++ b/slideshow/source/inc/subsettableshapemanager.hxx @@ -95,20 +95,12 @@ namespace slideshow virtual void removeIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) = 0; /** Notify that shape-intrinsic animations are now enabled. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - virtual bool notifyIntrinsicAnimationsEnabled() = 0; + virtual void notifyIntrinsicAnimationsEnabled() = 0; /** Notify that shape-intrinsic animations are now disabled. - - @return true, if this event was processed by - anybody. If false is returned, no handler processed - this event (and probably, nothing will happen at all) */ - virtual bool notifyIntrinsicAnimationsDisabled() = 0; + virtual void notifyIntrinsicAnimationsDisabled() = 0; }; typedef ::boost::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr; |