diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-05-11 13:48:42 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-11 19:21:49 +0000 |
commit | c7325f39031cb5c968c88c4efc6f58c0df8e01c7 (patch) | |
tree | 5137cb89949674bbb575d12066fe08193bfcdb35 /sdext | |
parent | a5a71cea62ac3041006c5e9815ae2317999639ac (diff) |
sdext: replace boost::bind with C++11 lambdas
Change-Id: I2a30e764b96530e21d5ff201b18f98d1cd334a6d
Reviewed-on: https://gerrit.libreoffice.org/24888
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterAccessibility.cxx | 7 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterBitmapContainer.cxx | 6 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterButton.cxx | 10 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterHelpView.cxx | 6 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterNotesView.cxx | 3 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaintManager.cxx | 14 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaneFactory.cxx | 6 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterScreen.cxx | 17 |
8 files changed, 33 insertions, 36 deletions
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index 2ef842a8f3e0..a340509ce5fc 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/drawing/framework/XView.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/implbase.hxx> -#include <boost/bind.hpp> + #include <algorithm> using namespace ::com::sun::star; @@ -1915,9 +1915,10 @@ void AccessibleNotes::SetTextView ( // events and handles text changes. Register the corresponding // listeners here. mpTextView->GetCaret()->SetCaretMotionBroadcaster( - ::boost::bind(&AccessibleNotes::NotifyCaretChange, this, _1, _2, _3, _4)); + [this](sal_Int32 a, sal_Int32 b, sal_Int32 c, sal_Int32 d) + { return this->NotifyCaretChange(a, b, c, d); }); mpTextView->SetTextChangeBroadcaster( - ::boost::bind(&AccessibleNotes::HandleTextChange, this)); + [this]() { return this->HandleTextChange(); }); } } diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx index b062f5e11a10..84ea7d47a0f4 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.cxx +++ b/sdext/source/presenter/PresenterBitmapContainer.cxx @@ -26,7 +26,6 @@ #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/XIntegerBitmap.hpp> #include <osl/diagnose.h> -#include <boost/bind.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -129,7 +128,10 @@ void PresenterBitmapContainer::LoadBitmaps ( { PresenterConfigurationAccess::ForAll( rxBitmapList, - ::boost::bind(&PresenterBitmapContainer::ProcessBitmap, this, _1, _2)); + [this](OUString const& rKey, Reference<beans::XPropertySet> const& xProps) + { + this->ProcessBitmap(rKey, xProps); + }); } } catch (Exception&) diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx index 454083ac57aa..f0edc2f52d59 100644 --- a/sdext/source/presenter/PresenterButton.cxx +++ b/sdext/source/presenter/PresenterButton.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/drawing/XPresenterHelper.hpp> #include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/TextDirection.hpp> -#include <boost/bind.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -495,10 +494,11 @@ Reference<beans::XPropertySet> PresenterButton::GetConfigurationProperties ( Reference<container::XNameAccess>( aConfiguration.GetConfigurationNode("PresenterScreenSettings/Buttons"), UNO_QUERY), - ::boost::bind(&PresenterConfigurationAccess::IsStringPropertyEqual, - rsConfgurationName, - OUString("Name"), - _2)), + [&rsConfgurationName](OUString const&, uno::Reference<beans::XPropertySet> const& xProps) -> bool + { + return PresenterConfigurationAccess::IsStringPropertyEqual( + rsConfgurationName, OUString("Name"), xProps); + }), UNO_QUERY); } diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx index 9882ce89becc..12dac0864fa1 100644 --- a/sdext/source/presenter/PresenterHelpView.cxx +++ b/sdext/source/presenter/PresenterHelpView.cxx @@ -33,7 +33,6 @@ #include <com/sun/star/util/Color.hpp> #include <algorithm> #include <vector> -#include <boost/bind.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -366,7 +365,10 @@ void PresenterHelpView::ReadHelpStrings() UNO_QUERY); PresenterConfigurationAccess::ForAll( xStrings, - ::boost::bind(&PresenterHelpView::ProcessString, this, _2)); + [this](OUString const&, uno::Reference<beans::XPropertySet> const& xProps) + { + return this->ProcessString(xProps); + }); } void PresenterHelpView::ProcessString ( diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx index 0c37ee4dd4f0..11b6d9ef8347 100644 --- a/sdext/source/presenter/PresenterNotesView.cxx +++ b/sdext/source/presenter/PresenterNotesView.cxx @@ -40,7 +40,6 @@ #include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/container/XChild.hpp> -#include <boost/bind.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -118,7 +117,7 @@ PresenterNotesView::PresenterNotesView ( rxComponentContext, mxParentWindow, mpPresenterController->GetPaintManager(), - ::boost::bind(&PresenterNotesView::SetTop, this, _1)); + [this](double f) { return this->SetTop(f); }); mpScrollBar->SetBackground( mpPresenterController->GetViewBackground(mxViewId->getResourceURL())); diff --git a/sdext/source/presenter/PresenterPaintManager.cxx b/sdext/source/presenter/PresenterPaintManager.cxx index 5fef2118f60e..a5eb4a21df00 100644 --- a/sdext/source/presenter/PresenterPaintManager.cxx +++ b/sdext/source/presenter/PresenterPaintManager.cxx @@ -22,7 +22,6 @@ #include "PresenterPaneContainer.hxx" #include <com/sun/star/awt/InvalidateStyle.hpp> #include <com/sun/star/awt/XWindowPeer.hpp> -#include <boost/bind.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -44,15 +43,10 @@ PresenterPaintManager::PresenterPaintManager ( PresenterPaintManager::GetInvalidator ( const css::uno::Reference<css::awt::XWindow>& rxWindow) { - return ::boost::bind( - static_cast<void (PresenterPaintManager::*)( - const css::uno::Reference<css::awt::XWindow>&, - const css::awt::Rectangle&, - const bool)>(&PresenterPaintManager::Invalidate), - this, - rxWindow, - _1, - false/*bSynchronous*/); + return [this, rxWindow] (css::awt::Rectangle const& rRepaintBox) + { + return this->Invalidate(rxWindow, rRepaintBox, false/*bSynchronous*/); + }; } void PresenterPaintManager::Invalidate ( diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index 551e0eada5ad..9be6b39bc4ae 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -30,7 +30,6 @@ #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <boost/bind.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -298,9 +297,8 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( { if (bIsSpritePane) { - pDescriptor->maSpriteProvider = ::boost::bind( - &PresenterSpritePane::GetSprite, - dynamic_cast<PresenterSpritePane*>(xPane.get())); + auto const pPane(dynamic_cast<PresenterSpritePane*>(xPane.get())); + pDescriptor->maSpriteProvider = [pPane](){ return pPane->GetSprite(); }; pDescriptor->mbIsSprite = true; pDescriptor->mbNeedsClipping = false; } diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index 098bcd58d14f..52c78316df86 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -36,7 +36,6 @@ #include <com/sun/star/presentation/XPresentation2.hpp> #include <com/sun/star/presentation/XPresentationSupplier.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp> -#include <boost/bind.hpp> #include <cppuhelper/compbase.hxx> #include <com/sun/star/view/XSelectionSupplier.hpp> @@ -586,7 +585,7 @@ void PresenterScreen::RequestShutdownPresenterScreen() rtl::Reference<PresenterScreen> pSelf (this); PresenterFrameworkObserver::RunOnUpdateEnd( xCC, - ::boost::bind(&PresenterScreen::ShutdownPresenterScreen, pSelf)); + [pSelf](bool){ return pSelf->ShutdownPresenterScreen(); }); xCC->update(); } } @@ -708,11 +707,10 @@ void PresenterScreen::ProcessLayout ( PresenterConfigurationAccess::ForAll( xList, aProperties, - ::boost::bind(&PresenterScreen::ProcessComponent, this, - _1, - _2, - rxContext, - rxAnchorId)); + [this, rxContext, rxAnchorId](OUString const& rString, std::vector<uno::Any> const& rArgs) + { + this->ProcessComponent(rString, rArgs, rxContext, rxAnchorId); + }); } catch (const RuntimeException&) { @@ -737,7 +735,10 @@ void PresenterScreen::ProcessViewDescriptions ( PresenterConfigurationAccess::ForAll( xViewDescriptionsNode, aProperties, - ::boost::bind(&PresenterScreen::ProcessViewDescription, this, _1, _2)); + [this](OUString const& rString, std::vector<uno::Any> const& rArgs) + { + return this->ProcessViewDescription(rString, rArgs); + }); } catch (const RuntimeException&) { |