diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-05-11 12:41:19 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-13 08:34:47 +0000 |
commit | a345c5912d9e292ddd885546a60353d1769fbc86 (patch) | |
tree | ca06419465e2db749195c818c9d36be8d0ba7a48 /slideshow | |
parent | slideshow: tweak BaseContainerNode::forEachChildNode (diff) | |
download | core-a345c5912d9e292ddd885546a60353d1769fbc86.tar.gz core-a345c5912d9e292ddd885546a60353d1769fbc86.zip |
slideshow: replace boost::mem_fn with std::mem_fn
Change-Id: I0b02b2b13cacac48d94e541671a446368f5e527f
Reviewed-on: https://gerrit.libreoffice.org/24885
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'slideshow')
7 files changed, 27 insertions, 29 deletions
diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx index df4b09716763..229e26dd5c7b 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.cxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx @@ -24,7 +24,7 @@ #include "nodetools.hxx" #include "delayevent.hxx" -#include <boost/mem_fn.hpp> +#include <functional> #include <algorithm> using namespace com::sun::star; @@ -47,7 +47,7 @@ BaseContainerNode::BaseContainerNode( void BaseContainerNode::dispose() { - forEachChildNode( boost::mem_fn(&Disposable::dispose) ); + forEachChildNode( std::mem_fn(&Disposable::dispose) ); maChildren.clear(); BaseNode::dispose(); } @@ -66,7 +66,7 @@ bool BaseContainerNode::init_children() // initialize all children return (std::count_if( maChildren.begin(), maChildren.end(), - boost::mem_fn(&AnimationNode::init) ) == + std::mem_fn(&AnimationNode::init) ) == static_cast<VectorOfNodes::difference_type>(maChildren.size())); } @@ -75,12 +75,12 @@ void BaseContainerNode::deactivate_st( NodeState eDestState ) mnLeftIterations = 0; // in order to make skip effect work correctly if (eDestState == FROZEN) { // deactivate all children that are not FROZEN or ENDED: - forEachChildNode( boost::mem_fn(&AnimationNode::deactivate), + forEachChildNode( std::mem_fn(&AnimationNode::deactivate), ~(FROZEN | ENDED) ); } else { // end all children that are not ENDED: - forEachChildNode( boost::mem_fn(&AnimationNode::end), ~ENDED ); + forEachChildNode( std::mem_fn(&AnimationNode::end), ~ENDED ); } } @@ -91,7 +91,7 @@ bool BaseContainerNode::hasPendingAnimation() const // If yes, we, too, return true return std::any_of( maChildren.begin(), maChildren.end(), - boost::mem_fn(&AnimationNode::hasPendingAnimation) ); + std::mem_fn(&AnimationNode::hasPendingAnimation) ); } void BaseContainerNode::appendChildNode( AnimationNodeSharedPtr const& pNode ) @@ -165,7 +165,7 @@ bool BaseContainerNode::notifyDeactivatedChild( void BaseContainerNode::repeat() { - forEachChildNode( boost::mem_fn(&AnimationNode::end), ~ENDED ); + forEachChildNode( std::mem_fn(&AnimationNode::end), ~ENDED ); bool bState = init_children(); if( bState ) activate_st(); diff --git a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx index 20d16d711552..56cf7e185a39 100644 --- a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx @@ -21,7 +21,7 @@ #include "paralleltimecontainer.hxx" #include "delayevent.hxx" -#include <boost/mem_fn.hpp> +#include <functional> namespace slideshow { namespace internal { @@ -32,7 +32,7 @@ void ParallelTimeContainer::activate_st() std::size_t const nResolvedNodes = static_cast<std::size_t>(std::count_if( maChildren.begin(), maChildren.end(), - boost::mem_fn(&AnimationNode::resolve) )); + std::mem_fn(&AnimationNode::resolve) )); (void) nResolvedNodes; // avoid warning OSL_ENSURE( nResolvedNodes == maChildren.size(), "### resolving all children failed!" ); diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 96b86bf2218d..472d85d82d65 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -42,8 +42,7 @@ #include "unoview.hxx" #include "unoviewcontainer.hxx" -#include <boost/mem_fn.hpp> - +#include <functional> #include <memory> #include <algorithm> #include <vector> @@ -1003,17 +1002,17 @@ void EventMultiplexer::notifyUserPaintStrokeWidth( double rUserStrokeWidth ) void EventMultiplexer::notifyUserPaintDisabled() { mpImpl->maUserPaintEventHandlers.applyAll( - boost::mem_fn(&UserPaintEventHandler::disable)); + std::mem_fn(&UserPaintEventHandler::disable)); } void EventMultiplexer::notifySwitchPenMode(){ mpImpl->maUserPaintEventHandlers.applyAll( - boost::mem_fn(&UserPaintEventHandler::switchPenMode)); + std::mem_fn(&UserPaintEventHandler::switchPenMode)); } void EventMultiplexer::notifySwitchEraserMode(){ mpImpl->maUserPaintEventHandlers.applyAll( - boost::mem_fn(&UserPaintEventHandler::switchEraserMode)); + std::mem_fn(&UserPaintEventHandler::switchEraserMode)); } //adding erasing all ink features with UserPaintOverlay @@ -1040,13 +1039,13 @@ bool EventMultiplexer::notifyNextEffect() void EventMultiplexer::notifySlideStartEvent() { mpImpl->maSlideStartHandlers.applyAll( - boost::mem_fn(&EventHandler::handleEvent) ); + std::mem_fn(&EventHandler::handleEvent) ); } bool EventMultiplexer::notifySlideEndEvent() { return mpImpl->maSlideEndHandlers.applyAll( - boost::mem_fn(&EventHandler::handleEvent) ); + std::mem_fn(&EventHandler::handleEvent) ); } bool EventMultiplexer::notifyAnimationStart( @@ -1066,7 +1065,7 @@ bool EventMultiplexer::notifyAnimationEnd( bool EventMultiplexer::notifySlideAnimationsEnd() { return mpImpl->maSlideAnimationsEndHandlers.applyAll( - boost::mem_fn(&EventHandler::handleEvent)); + std::mem_fn(&EventHandler::handleEvent)); } bool EventMultiplexer::notifyAudioStopped( @@ -1155,7 +1154,7 @@ void EventMultiplexer::notifyViewChanged( const uno::Reference<presentation::XSl void EventMultiplexer::notifyViewsChanged() { mpImpl->maViewHandlers.applyAll( - boost::mem_fn( &ViewEventHandler::viewsChanged )); + std::mem_fn( &ViewEventHandler::viewsChanged )); } void EventMultiplexer::notifyViewClobbered( diff --git a/slideshow/source/engine/screenupdater.cxx b/slideshow/source/engine/screenupdater.cxx index 43d483015568..597da9daf600 100644 --- a/slideshow/source/engine/screenupdater.cxx +++ b/slideshow/source/engine/screenupdater.cxx @@ -22,7 +22,7 @@ #include <osl/diagnose.h> -#include <boost/mem_fn.hpp> +#include <functional> #include <memory> #include <vector> #include <algorithm> @@ -125,12 +125,12 @@ namespace internal // any ViewUpdate-triggered updates? const bool bViewUpdatesNeeded( mpImpl->maUpdaters.apply( - boost::mem_fn(&ViewUpdate::needsUpdate)) ); + std::mem_fn(&ViewUpdate::needsUpdate)) ); if( bViewUpdatesNeeded ) { mpImpl->maUpdaters.applyAll( - boost::mem_fn((bool (ViewUpdate::*)())&ViewUpdate::update) ); + std::mem_fn((bool (ViewUpdate::*)())&ViewUpdate::update) ); } if( bViewUpdatesNeeded || diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index 667a176a94f9..ad9212e1d3e9 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -46,7 +46,6 @@ #include <comphelper/scopeguard.hxx> #include <canvas/canvastools.hxx> -#include <boost/mem_fn.hpp> #include <cmath> #include <algorithm> #include <iterator> @@ -569,7 +568,7 @@ namespace slideshow pShape->maAnimationFrames.begin(), pShape->maAnimationFrames.end(), std::back_insert_iterator< std::vector<double> >( aTimeout ), - boost::mem_fn(&MtfAnimationFrame::getDuration) ); + std::mem_fn(&MtfAnimationFrame::getDuration) ); WakeupEventSharedPtr pWakeupEvent( new WakeupEvent( rContext.mrEventQueue.getTimer(), diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 865e6424cb8c..b6134fbce616 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -25,7 +25,7 @@ #include <comphelper/anytostring.hxx> #include <cppuhelper/exc_hlp.hxx> -#include <boost/mem_fn.hpp> +#include <functional> #include <algorithm> #include "layermanager.hxx" @@ -436,7 +436,7 @@ namespace slideshow return std::any_of( maLayers.begin(), maLayers.end(), - boost::mem_fn(&Layer::isUpdatePending) ); + std::mem_fn(&Layer::isUpdatePending) ); } bool LayerManager::updateSprites() @@ -492,7 +492,7 @@ namespace slideshow // any non-sprite update areas left? if( std::none_of( maLayers.begin(), maLayers.end(), - boost::mem_fn( &Layer::isUpdatePending ) ) ) + std::mem_fn( &Layer::isUpdatePending ) ) ) return bRet; // nope, done. // update each shape on each layer, that has diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index ceb0db898511..4a0a3375630b 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -26,7 +26,7 @@ #include "shapemanagerimpl.hxx" -#include <boost/mem_fn.hpp> +#include <functional> using namespace com::sun::star; @@ -393,13 +393,13 @@ void ShapeManagerImpl::removeIntrinsicAnimationHandler( const IntrinsicAnimation void ShapeManagerImpl::notifyIntrinsicAnimationsEnabled() { maIntrinsicAnimationEventHandlers.applyAll( - boost::mem_fn(&IntrinsicAnimationEventHandler::enableAnimations)); + std::mem_fn(&IntrinsicAnimationEventHandler::enableAnimations)); } void ShapeManagerImpl::notifyIntrinsicAnimationsDisabled() { maIntrinsicAnimationEventHandlers.applyAll( - boost::mem_fn(&IntrinsicAnimationEventHandler::disableAnimations)); + std::mem_fn(&IntrinsicAnimationEventHandler::disableAnimations)); } |