[Libreoffice-commits] core.git: 2 commits - slideshow/source
Michael Stahl
mstahl at redhat.com
Wed May 11 19:41:36 UTC 2016
slideshow/source/engine/slideshowimpl.cxx | 16 ++++++++++++----
slideshow/source/inc/listenercontainer.hxx | 2 +-
2 files changed, 13 insertions(+), 5 deletions(-)
New commits:
commit 58a64174a8679b10464180d3807e4b89a1535b42
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed May 11 20:15:26 2016 +0200
slideshow: tweak ListenerOperations<std::weak_ptr<ListenerTargetT>>
Pretty sure FuncT(...value_type) is wrong since value_type is
std::weak_ptr which does not implicitly convert to a callable pointer;
this caused build failure on Mac OS X with clang/libc++.
Change-Id: Id9de4a7825347a84cce2aab5367a457a003bb352
diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx
index 0b20464..7999066 100644
--- a/slideshow/source/inc/listenercontainer.hxx
+++ b/slideshow/source/inc/listenercontainer.hxx
@@ -155,7 +155,7 @@ struct ListenerOperations< std::weak_ptr<ListenerTargetT> >
std::shared_ptr<ListenerTargetT> pListener( rCurr.lock() );
if( pListener.get() &&
- FunctionApply< typename ::std::result_of< FuncT( const typename ContainerT::value_type& ) >::type,
+ FunctionApply<typename ::std::result_of<FuncT (std::shared_ptr<ListenerTargetT> const&)>::type,
std::shared_ptr<ListenerTargetT> >::apply(func,pListener) )
{
bRet = true;
commit 7ac1062c66427186f06697885a96e54ff1af6e0e
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed May 11 12:53:59 2016 +0200
slideshow: replace boost::mem_fn with C++11 lambdas
A bit more verbose but we have less than 10 mem_fn now so better
elimintate them all so hopefully we can get rid of the corresponding
boost warning patches.
Change-Id: I79e2f9994841125916d92bdce9973d956f2a68ce
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 1e8d9e6..af48345 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -95,7 +95,6 @@
#include "framerate.hxx"
#include "pointersymbol.hxx"
-#include <boost/mem_fn.hpp>
#include <map>
#include <vector>
#include <iterator>
@@ -1175,7 +1174,10 @@ void SlideShowImpl::displaySlide(
} // finally
maListenerContainer.forEach<presentation::XSlideShowListener>(
- boost::mem_fn( &presentation::XSlideShowListener::slideTransitionStarted ) );
+ [](uno::Reference<presentation::XSlideShowListener> const& xListener)
+ {
+ xListener->slideTransitionStarted();
+ });
// We are currently rewinding an effect. This lead us from the next
// slide to this one. To complete this we have to play back all main
@@ -1206,7 +1208,10 @@ void SlideShowImpl::redisplayCurrentSlide()
"SlideShowImpl::notifySlideTransitionEnded"));
maListenerContainer.forEach<presentation::XSlideShowListener>(
- boost::mem_fn( &presentation::XSlideShowListener::slideTransitionStarted ) );
+ [](uno::Reference<presentation::XSlideShowListener> const& xListener)
+ {
+ xListener->slideTransitionStarted();
+ });
}
sal_Bool SlideShowImpl::nextEffect() throw (uno::RuntimeException, std::exception)
@@ -2278,7 +2283,10 @@ void SlideShowImpl::notifySlideAnimationsEnded()
} // finally
maListenerContainer.forEach<presentation::XSlideShowListener>(
- boost::mem_fn( &presentation::XSlideShowListener::slideAnimationsEnded ) );
+ [](uno::Reference<presentation::XSlideShowListener> const& xListener)
+ {
+ xListener->slideAnimationsEnded();
+ });
}
void SlideShowImpl::notifySlideEnded (const bool bReverse)
More information about the Libreoffice-commits
mailing list