Kaydet (Commit) c7325f39 authored tarafından Michael Stahl's avatar Michael Stahl

sdext: replace boost::bind with C++11 lambdas

Change-Id: I2a30e764b96530e21d5ff201b18f98d1cd334a6d
Reviewed-on: https://gerrit.libreoffice.org/24888Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst a5a71cea
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <com/sun/star/drawing/framework/XView.hpp> #include <com/sun/star/drawing/framework/XView.hpp>
#include <cppuhelper/compbase.hxx> #include <cppuhelper/compbase.hxx>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
#include <boost/bind.hpp>
#include <algorithm> #include <algorithm>
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -1915,9 +1915,10 @@ void AccessibleNotes::SetTextView ( ...@@ -1915,9 +1915,10 @@ void AccessibleNotes::SetTextView (
// events and handles text changes. Register the corresponding // events and handles text changes. Register the corresponding
// listeners here. // listeners here.
mpTextView->GetCaret()->SetCaretMotionBroadcaster( 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( mpTextView->SetTextChangeBroadcaster(
::boost::bind(&AccessibleNotes::HandleTextChange, this)); [this]() { return this->HandleTextChange(); });
} }
} }
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp> #include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <boost/bind.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -129,7 +128,10 @@ void PresenterBitmapContainer::LoadBitmaps ( ...@@ -129,7 +128,10 @@ void PresenterBitmapContainer::LoadBitmaps (
{ {
PresenterConfigurationAccess::ForAll( PresenterConfigurationAccess::ForAll(
rxBitmapList, rxBitmapList,
::boost::bind(&PresenterBitmapContainer::ProcessBitmap, this, _1, _2)); [this](OUString const& rKey, Reference<beans::XPropertySet> const& xProps)
{
this->ProcessBitmap(rKey, xProps);
});
} }
} }
catch (Exception&) catch (Exception&)
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <com/sun/star/drawing/XPresenterHelper.hpp> #include <com/sun/star/drawing/XPresenterHelper.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp> #include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/TextDirection.hpp> #include <com/sun/star/rendering/TextDirection.hpp>
#include <boost/bind.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -495,10 +494,11 @@ Reference<beans::XPropertySet> PresenterButton::GetConfigurationProperties ( ...@@ -495,10 +494,11 @@ Reference<beans::XPropertySet> PresenterButton::GetConfigurationProperties (
Reference<container::XNameAccess>( Reference<container::XNameAccess>(
aConfiguration.GetConfigurationNode("PresenterScreenSettings/Buttons"), aConfiguration.GetConfigurationNode("PresenterScreenSettings/Buttons"),
UNO_QUERY), UNO_QUERY),
::boost::bind(&PresenterConfigurationAccess::IsStringPropertyEqual, [&rsConfgurationName](OUString const&, uno::Reference<beans::XPropertySet> const& xProps) -> bool
rsConfgurationName, {
OUString("Name"), return PresenterConfigurationAccess::IsStringPropertyEqual(
_2)), rsConfgurationName, OUString("Name"), xProps);
}),
UNO_QUERY); UNO_QUERY);
} }
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <com/sun/star/util/Color.hpp> #include <com/sun/star/util/Color.hpp>
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <boost/bind.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -366,7 +365,10 @@ void PresenterHelpView::ReadHelpStrings() ...@@ -366,7 +365,10 @@ void PresenterHelpView::ReadHelpStrings()
UNO_QUERY); UNO_QUERY);
PresenterConfigurationAccess::ForAll( PresenterConfigurationAccess::ForAll(
xStrings, xStrings,
::boost::bind(&PresenterHelpView::ProcessString, this, _2)); [this](OUString const&, uno::Reference<beans::XPropertySet> const& xProps)
{
return this->ProcessString(xProps);
});
} }
void PresenterHelpView::ProcessString ( void PresenterHelpView::ProcessString (
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XChild.hpp>
#include <boost/bind.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -118,7 +117,7 @@ PresenterNotesView::PresenterNotesView ( ...@@ -118,7 +117,7 @@ PresenterNotesView::PresenterNotesView (
rxComponentContext, rxComponentContext,
mxParentWindow, mxParentWindow,
mpPresenterController->GetPaintManager(), mpPresenterController->GetPaintManager(),
::boost::bind(&PresenterNotesView::SetTop, this, _1)); [this](double f) { return this->SetTop(f); });
mpScrollBar->SetBackground( mpScrollBar->SetBackground(
mpPresenterController->GetViewBackground(mxViewId->getResourceURL())); mpPresenterController->GetViewBackground(mxViewId->getResourceURL()));
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "PresenterPaneContainer.hxx" #include "PresenterPaneContainer.hxx"
#include <com/sun/star/awt/InvalidateStyle.hpp> #include <com/sun/star/awt/InvalidateStyle.hpp>
#include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/awt/XWindowPeer.hpp>
#include <boost/bind.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -44,15 +43,10 @@ PresenterPaintManager::PresenterPaintManager ( ...@@ -44,15 +43,10 @@ PresenterPaintManager::PresenterPaintManager (
PresenterPaintManager::GetInvalidator ( PresenterPaintManager::GetInvalidator (
const css::uno::Reference<css::awt::XWindow>& rxWindow) const css::uno::Reference<css::awt::XWindow>& rxWindow)
{ {
return ::boost::bind( return [this, rxWindow] (css::awt::Rectangle const& rRepaintBox)
static_cast<void (PresenterPaintManager::*)( {
const css::uno::Reference<css::awt::XWindow>&, return this->Invalidate(rxWindow, rRepaintBox, false/*bSynchronous*/);
const css::awt::Rectangle&, };
const bool)>(&PresenterPaintManager::Invalidate),
this,
rxWindow,
_1,
false/*bSynchronous*/);
} }
void PresenterPaintManager::Invalidate ( void PresenterPaintManager::Invalidate (
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <boost/bind.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -298,9 +297,8 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( ...@@ -298,9 +297,8 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
{ {
if (bIsSpritePane) if (bIsSpritePane)
{ {
pDescriptor->maSpriteProvider = ::boost::bind( auto const pPane(dynamic_cast<PresenterSpritePane*>(xPane.get()));
&PresenterSpritePane::GetSprite, pDescriptor->maSpriteProvider = [pPane](){ return pPane->GetSprite(); };
dynamic_cast<PresenterSpritePane*>(xPane.get()));
pDescriptor->mbIsSprite = true; pDescriptor->mbIsSprite = true;
pDescriptor->mbNeedsClipping = false; pDescriptor->mbNeedsClipping = false;
} }
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <com/sun/star/presentation/XPresentation2.hpp> #include <com/sun/star/presentation/XPresentation2.hpp>
#include <com/sun/star/presentation/XPresentationSupplier.hpp> #include <com/sun/star/presentation/XPresentationSupplier.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp> #include <com/sun/star/document/XEventBroadcaster.hpp>
#include <boost/bind.hpp>
#include <cppuhelper/compbase.hxx> #include <cppuhelper/compbase.hxx>
#include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp>
...@@ -586,7 +585,7 @@ void PresenterScreen::RequestShutdownPresenterScreen() ...@@ -586,7 +585,7 @@ void PresenterScreen::RequestShutdownPresenterScreen()
rtl::Reference<PresenterScreen> pSelf (this); rtl::Reference<PresenterScreen> pSelf (this);
PresenterFrameworkObserver::RunOnUpdateEnd( PresenterFrameworkObserver::RunOnUpdateEnd(
xCC, xCC,
::boost::bind(&PresenterScreen::ShutdownPresenterScreen, pSelf)); [pSelf](bool){ return pSelf->ShutdownPresenterScreen(); });
xCC->update(); xCC->update();
} }
} }
...@@ -708,11 +707,10 @@ void PresenterScreen::ProcessLayout ( ...@@ -708,11 +707,10 @@ void PresenterScreen::ProcessLayout (
PresenterConfigurationAccess::ForAll( PresenterConfigurationAccess::ForAll(
xList, xList,
aProperties, aProperties,
::boost::bind(&PresenterScreen::ProcessComponent, this, [this, rxContext, rxAnchorId](OUString const& rString, std::vector<uno::Any> const& rArgs)
_1, {
_2, this->ProcessComponent(rString, rArgs, rxContext, rxAnchorId);
rxContext, });
rxAnchorId));
} }
catch (const RuntimeException&) catch (const RuntimeException&)
{ {
...@@ -737,7 +735,10 @@ void PresenterScreen::ProcessViewDescriptions ( ...@@ -737,7 +735,10 @@ void PresenterScreen::ProcessViewDescriptions (
PresenterConfigurationAccess::ForAll( PresenterConfigurationAccess::ForAll(
xViewDescriptionsNode, xViewDescriptionsNode,
aProperties, 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&) catch (const RuntimeException&)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment