summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-03-03 14:06:17 +0100
committerMichael Stahl <mstahl@redhat.com>2016-03-03 15:04:10 +0100
commit521c5602e366a8d4d826fcd910428965de5d9d4e (patch)
tree7cdda4e7c4f7f6bcabacb9bf0c41880c69cc8176 /sd
parentdaa7754026ba5b025076b90f7a4427cd5820e736 (diff)
sd: replace boost::bind with C++11 lambdas or std::bind
Change-Id: I1fc9ca7712fde802c885f5cfeedec1575d913f85
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/pch/precompiled_sd.hxx1
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.cxx5
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx5
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx36
4 files changed, 36 insertions, 11 deletions
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 454dfe354839..b0555fb222e1 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -42,7 +42,6 @@
#include <unordered_map>
#include <utility>
#include <vector>
-#include <boost/bind.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/limits.hpp>
#include <boost/noncopyable.hpp>
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index fdd3fadaebb8..4db7f62e7d57 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -27,7 +27,8 @@
#include <sfx2/app.hxx>
#include <svx/svxids.hrc>
#include <vcl/svapp.hxx>
-#include <boost/bind.hpp>
+
+#include <functional>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -110,7 +111,7 @@ IMPL_LINK_NOARG_TYPED(SlideShowRestarter, EndPresentation, void*, void)
pHelper->RunOnConfigurationEvent(
FrameworkHelper::msConfigurationUpdateEndEvent,
- ::boost::bind(&SlideShowRestarter::StartPresentation, shared_from_this()));
+ ::std::bind(&SlideShowRestarter::StartPresentation, shared_from_this()));
pHelper->UpdateConfiguration();
}
else
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index db0f47693f2a..20a723108a02 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -51,7 +51,6 @@
#include "SlideShowRestarter.hxx"
#include "DrawController.hxx"
#include "customshowlist.hxx"
-#include <boost/bind.hpp>
#include "unopage.hxx"
using ::com::sun::star::presentation::XSlideShowController;
@@ -1072,7 +1071,9 @@ void SlideShow::StartInPlacePresentation()
}
pHelper->RequestView( FrameworkHelper::msImpressViewURL, FrameworkHelper::msCenterPaneURL );
- pHelper->RunOnConfigurationEvent( FrameworkHelper::msConfigurationUpdateEndEvent, ::boost::bind(&SlideShow::StartInPlacePresentationConfigurationCallback, this) );
+ pHelper->RunOnConfigurationEvent(
+ FrameworkHelper::msConfigurationUpdateEndEvent,
+ [this] (bool const) { return this->StartInPlacePresentationConfigurationCallback(); } );
return;
}
else
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 3eed5a6d3ecb..b154130c47b8 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -78,7 +78,7 @@
#include "customshowlist.hxx"
#include "unopage.hxx"
-#include <boost/bind.hpp>
+#include <boost/mem_fn.hpp>
using ::comphelper::OInterfaceContainerHelper2;
using ::com::sun::star::animations::XAnimationNode;
@@ -3325,7 +3325,12 @@ void SAL_CALL SlideShowListenerProxy::beginEvent( const Reference< XAnimationNod
::osl::MutexGuard aGuard( m_aMutex );
if( maListeners.getLength() >= 0 )
- maListeners.forEach<XSlideShowListener>( boost::bind( &XAnimationListener::beginEvent, _1, boost::cref(xNode) ));
+ {
+ maListeners.forEach<XSlideShowListener>(
+ [&] (Reference<XAnimationListener> const& xListener) {
+ return xListener->beginEvent(xNode);
+ } );
+ }
}
void SAL_CALL SlideShowListenerProxy::endEvent( const Reference< XAnimationNode >& xNode ) throw (RuntimeException, std::exception)
@@ -3333,7 +3338,12 @@ void SAL_CALL SlideShowListenerProxy::endEvent( const Reference< XAnimationNode
::osl::MutexGuard aGuard( m_aMutex );
if( maListeners.getLength() >= 0 )
- maListeners.forEach<XSlideShowListener>( boost::bind( &XAnimationListener::endEvent, _1, boost::cref(xNode) ));
+ {
+ maListeners.forEach<XSlideShowListener>(
+ [&] (Reference<XAnimationListener> const& xListener) {
+ return xListener->endEvent(xNode);
+ } );
+ }
}
void SAL_CALL SlideShowListenerProxy::repeat( const Reference< XAnimationNode >& xNode, ::sal_Int32 nRepeat ) throw (RuntimeException, std::exception)
@@ -3341,7 +3351,12 @@ void SAL_CALL SlideShowListenerProxy::repeat( const Reference< XAnimationNode >&
::osl::MutexGuard aGuard( m_aMutex );
if( maListeners.getLength() >= 0 )
- maListeners.forEach<XSlideShowListener>( boost::bind( &XAnimationListener::repeat, _1, boost::cref(xNode), boost::cref(nRepeat) ));
+ {
+ maListeners.forEach<XSlideShowListener>(
+ [&] (Reference<XAnimationListener> const& xListener) {
+ return xListener->repeat(xNode, nRepeat);
+ } );
+ }
}
// css::presentation::XSlideShowListener:
@@ -3392,8 +3407,12 @@ void SlideShowListenerProxy::slideEnded(sal_Bool bReverse) throw (RuntimeExcepti
::osl::MutexGuard aGuard( m_aMutex );
if( maListeners.getLength() >= 0 )
+ {
maListeners.forEach<XSlideShowListener>(
- boost::bind( &XSlideShowListener::slideEnded, _1, bReverse) );
+ [&] (Reference<XSlideShowListener> const& xListener) {
+ return xListener->slideEnded(bReverse);
+ } );
+ }
}
{
@@ -3409,7 +3428,12 @@ void SlideShowListenerProxy::hyperLinkClicked( OUString const& aHyperLink ) thro
::osl::MutexGuard aGuard( m_aMutex );
if( maListeners.getLength() >= 0 )
- maListeners.forEach<XSlideShowListener>( boost::bind( &XSlideShowListener::hyperLinkClicked, _1, boost::cref(aHyperLink) ));
+ {
+ maListeners.forEach<XSlideShowListener>(
+ [&] (Reference<XSlideShowListener> const& xListener) {
+ return xListener->hyperLinkClicked(aHyperLink);
+ } );
+ }
}
{