diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-08-03 12:27:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-08-03 14:47:44 +0200 |
commit | 34d2a07a23f344b33f9b3ed7d2a70b405b392db6 (patch) | |
tree | 5ba62351ef016e7d0af08702f74ce7e04704d6c6 /slideshow | |
parent | 81c6ae873d0b624f8f5113253180e796bdafd8d8 (diff) |
slideshow: replace boost::function with std::function
Change-Id: Ibcb0f40d327e3086b6493cf2052caf135aa89e10
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/inc/pch/precompiled_slideshow.hxx | 1 | ||||
-rw-r--r-- | slideshow/source/engine/delayevent.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/effectrewinder.cxx | 16 | ||||
-rw-r--r-- | slideshow/source/engine/effectrewinder.hxx | 12 | ||||
-rw-r--r-- | slideshow/source/engine/eventmultiplexer.cxx | 1 | ||||
-rw-r--r-- | slideshow/source/inc/delayevent.hxx | 9 |
6 files changed, 22 insertions, 21 deletions
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx index ffdc8bb46fb7..96a8bb96b4d6 100644 --- a/slideshow/inc/pch/precompiled_slideshow.hxx +++ b/slideshow/inc/pch/precompiled_slideshow.hxx @@ -41,7 +41,6 @@ #include <boost/bind.hpp> #include <boost/current_function.hpp> #include <boost/enable_shared_from_this.hpp> -#include <boost/function.hpp> #include <boost/mem_fn.hpp> #include <boost/noncopyable.hpp> #include <boost/optional.hpp> diff --git a/slideshow/source/engine/delayevent.cxx b/slideshow/source/engine/delayevent.cxx index b33d8f05049a..78dd0350d4ba 100644 --- a/slideshow/source/engine/delayevent.cxx +++ b/slideshow/source/engine/delayevent.cxx @@ -30,7 +30,7 @@ bool Delay::fire() if (isCharged()) { mbWasFired = true; maFunc(); - maFunc.clear(); // early release of payload + maFunc = nullptr; // early release of payload } return true; } @@ -50,7 +50,7 @@ void Delay::dispose() // don't clear unconditionally, because it may currently be executed: if (isCharged()) { mbWasFired = true; - maFunc.clear(); // release of payload + maFunc = nullptr; // release of payload } } diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 94985986a02c..2b2bbfbbc324 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -29,7 +29,7 @@ #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/animations/EventTrigger.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> -#include <boost/function.hpp> + #include <boost/bind.hpp> #include <boost/enable_shared_from_this.hpp> @@ -44,7 +44,7 @@ namespace { class RewinderEventHandler : public EventHandler { public: - typedef ::boost::function<bool()> Action; + typedef ::std::function<bool ()> Action; RewinderEventHandler (const Action& rAction) : maAction(rAction) {} virtual ~RewinderEventHandler() {} private: @@ -57,7 +57,7 @@ private: class RewinderAnimationEventHandler : public AnimationEventHandler { public: - typedef ::boost::function<bool(const AnimationNodeSharedPtr& rpNode)> Action; + typedef ::std::function<bool (const AnimationNodeSharedPtr& rpNode)> Action; RewinderAnimationEventHandler (const Action& rAction) : maAction(rAction) {} virtual ~RewinderAnimationEventHandler() {} private: @@ -170,8 +170,8 @@ void EffectRewinder::setRootAnimationNode ( bool EffectRewinder::rewind ( const ::boost::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, - const ::boost::function<void()>& rSlideRewindFunctor, - const ::boost::function<void()>& rPreviousSlideFunctor) + const ::std::function<void ()>& rSlideRewindFunctor, + const ::std::function<void ()>& rPreviousSlideFunctor) { mpPaintLock = rpPaintLock; @@ -243,7 +243,7 @@ void EffectRewinder::skipAllMainSequenceEffects() this, nTotalMainSequenceEffectCount, false, - ::boost::function<void()>()), + ::std::function<void ()>()), "EffectRewinder::asynchronousRewind"); mrEventQueue.addEvent(mpAsynchronousRewindEvent); } @@ -354,7 +354,7 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) void EffectRewinder::asynchronousRewind ( sal_Int32 nEffectCount, const bool bRedisplayCurrentSlide, - const boost::function<void()>& rSlideRewindFunctor) + const std::function<void ()>& rSlideRewindFunctor) { OSL_ASSERT(mpAsynchronousRewindEvent); @@ -398,7 +398,7 @@ void EffectRewinder::asynchronousRewind ( void EffectRewinder::asynchronousRewindToPreviousSlide ( - const ::boost::function<void()>& rSlideRewindFunctor) + const ::std::function<void ()>& rSlideRewindFunctor) { OSL_ASSERT(mpAsynchronousRewindEvent); diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index 2fba401ef7f1..713237691acf 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -27,8 +27,10 @@ #include "screenupdater.hxx" #include <com/sun/star/presentation/XSlideShow.hpp> + #include <boost/scoped_ptr.hpp> -#include <boost/function.hpp> + +#include <functional> #include <vector> namespace slideshow { namespace internal { @@ -90,8 +92,8 @@ public: */ bool rewind ( const ::boost::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, - const ::boost::function<void()>& rSlideRewindFunctor, - const ::boost::function<void()>& rPreviousSlideFunctor); + const ::std::function<void ()>& rSlideRewindFunctor, + const ::std::function<void ()>& rPreviousSlideFunctor); /** Call this method after gotoPreviousEffect() triggered a slide change to the previous slide. @@ -152,7 +154,7 @@ private: void asynchronousRewind ( sal_Int32 nEffectCount, const bool bRedisplayCurrentSlide, - const boost::function<void()>& rSlideRewindFunctor); + const ::std::function<void ()>& rSlideRewindFunctor); /** Go to the previous slide and replay all of its main sequence effects (or effect groups). @@ -160,7 +162,7 @@ private: This functor is used to go to the previous slide. */ void asynchronousRewindToPreviousSlide ( - const ::boost::function<void()>& rPreviousSlideFunctor); + const ::std::function<void ()>& rPreviousSlideFunctor); }; } } // end of namespace ::slideshow::internal diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 0d3c391ad88b..d5c32fa9757e 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -46,7 +46,6 @@ #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> -#include <boost/function.hpp> #include <boost/noncopyable.hpp> #include <boost/bind.hpp> diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index cbfd7599a3a8..09efe7ed5a69 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -19,11 +19,12 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_DELAYEVENT_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_DELAYEVENT_HXX -#include <boost/function.hpp> - #include "event.hxx" + #include <boost/noncopyable.hpp> +#include <functional> + namespace slideshow { namespace internal { @@ -32,7 +33,7 @@ namespace internal { class Delay : public Event, private ::boost::noncopyable { public: - typedef ::boost::function0<void> FunctorT; + typedef ::std::function<void ()> FunctorT; template <typename FuncT> Delay( FuncT const& func, @@ -41,7 +42,7 @@ public: ) : Event(rsDescription), mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} - Delay( const boost::function0<void>& func, + Delay( const std::function<void ()>& func, double nTimeout , const OUString& rsDescription ) : Event(rsDescription), |