sdext: replace boost::bind with C++11 lambdas, part 2
Change-Id: Ife5fbf7a7a41182de00dca339cba160e3bb0062f
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <boost/bind.hpp>
|
||||
#include <osl/diagnose.h>
|
||||
#include <osl/doublecheckedlocking.h>
|
||||
#include <osl/getglobalmutex.hxx>
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include <com/sun/star/rendering/CompositeOperation.hpp>
|
||||
#include <com/sun/star/rendering/TexturingMode.hpp>
|
||||
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <math.h>
|
||||
@@ -809,8 +809,9 @@ void PresenterScrollBar::MousePressRepeater::Start (const PresenterScrollBar::Ar
|
||||
Execute();
|
||||
|
||||
// Schedule repeated executions.
|
||||
auto pThis(shared_from_this());
|
||||
mnMousePressRepeaterTaskId = PresenterTimer::ScheduleRepeatedTask (
|
||||
::boost::bind(&PresenterScrollBar::MousePressRepeater::Callback, shared_from_this(), _1),
|
||||
[pThis] (TimeValue const& rTime) { return pThis->Callback(rTime); },
|
||||
500000000,
|
||||
250000000);
|
||||
}
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include <com/sun/star/util/Color.hpp>
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -303,7 +302,7 @@ PresenterSlideSorter::PresenterSlideSorter (
|
||||
rxContext,
|
||||
mxWindow,
|
||||
mpPresenterController->GetPaintManager(),
|
||||
::boost::bind(&PresenterSlideSorter::SetVerticalOffset,this,_1)));
|
||||
[this] (double const offset) { return this->SetVerticalOffset(offset); }));
|
||||
|
||||
mpCloseButton = PresenterButton::Create(
|
||||
rxContext,
|
||||
@@ -1052,7 +1051,9 @@ void PresenterSlideSorter::Paint (const awt::Rectangle& rUpdateBox)
|
||||
PresenterGeometryHelper::ConvertRectangle(mpLayout->maBoundingBox)))
|
||||
{
|
||||
mpLayout->ForAllVisibleSlides(
|
||||
::boost::bind(&PresenterSlideSorter::PaintPreview, this, mxCanvas, rUpdateBox, _1));
|
||||
[this, &rUpdateBox] (sal_Int32 const nIndex) {
|
||||
return this->PaintPreview(this->mxCanvas, rUpdateBox, nIndex);
|
||||
});
|
||||
}
|
||||
|
||||
Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxCanvas, UNO_QUERY);
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <com/sun/star/rendering/CompositeOperation.hpp>
|
||||
#include <com/sun/star/rendering/TextDirection.hpp>
|
||||
#include <com/sun/star/text/WritingMode2.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::accessibility;
|
||||
@@ -75,7 +74,8 @@ PresenterTextView::PresenterTextView (
|
||||
mpFont(),
|
||||
maParagraphs(),
|
||||
mpCaret(new PresenterTextCaret(
|
||||
::boost::bind(&PresenterTextView::GetCaretBounds, this, _1, _2),
|
||||
[this] (sal_Int32 const nParagraphIndex, sal_Int32 const nCharacterIndex)
|
||||
{ return this->GetCaretBounds(nParagraphIndex, nCharacterIndex); },
|
||||
rInvalidator)),
|
||||
mnLeftOffset(0),
|
||||
mnTopOffset(0),
|
||||
@@ -1105,7 +1105,7 @@ void PresenterTextCaret::ShowCaret()
|
||||
if (mnCaretBlinkTaskId == 0)
|
||||
{
|
||||
mnCaretBlinkTaskId = PresenterTimer::ScheduleRepeatedTask (
|
||||
::boost::bind(&PresenterTextCaret::InvertCaret, this),
|
||||
[this] (TimeValue const&) { return this->InvertCaret(); },
|
||||
CaretBlinkIntervall,
|
||||
CaretBlinkIntervall);
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include <com/sun/star/rendering/XBitmap.hpp>
|
||||
#include <com/sun/star/util/Color.hpp>
|
||||
#include <osl/diagnose.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include <map>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
@@ -383,10 +382,11 @@ std::shared_ptr<PresenterConfigurationAccess> PresenterTheme::GetNodeForViewStyl
|
||||
"Presenter/Themes/" + mpTheme->msConfigurationNodeName + "/ViewStyles")))
|
||||
{
|
||||
pConfiguration->GoToChild(
|
||||
::boost::bind(&PresenterConfigurationAccess::IsStringPropertyEqual,
|
||||
rsStyleName,
|
||||
OUString("StyleName"),
|
||||
_2));
|
||||
[&rsStyleName] (OUString const&, uno::Reference<beans::XPropertySet> const& xProps)
|
||||
{
|
||||
return PresenterConfigurationAccess::IsStringPropertyEqual(
|
||||
rsStyleName, OUString("StyleName"), xProps);
|
||||
});
|
||||
}
|
||||
return pConfiguration;
|
||||
}
|
||||
@@ -653,8 +653,10 @@ void PresenterTheme::Theme::Read (
|
||||
UNO_QUERY);
|
||||
PresenterConfigurationAccess::ForAll(
|
||||
xFontNode,
|
||||
::boost::bind(&PresenterTheme::Theme::ProcessFont,
|
||||
this, ::boost::ref(rReadContext), _1, _2));
|
||||
[this, &rReadContext] (OUString const& rKey, uno::Reference<beans::XPropertySet> const& xProps)
|
||||
{
|
||||
return this->ProcessFont(rReadContext, rKey, xProps);
|
||||
});
|
||||
}
|
||||
|
||||
SharedPaneStyle PresenterTheme::Theme::GetPaneStyle (const OUString& rsStyleName) const
|
||||
@@ -863,8 +865,10 @@ void PaneStyleContainer::Read (
|
||||
PresenterConfigurationAccess::ForAll(
|
||||
xPaneStyleList,
|
||||
aProperties,
|
||||
::boost::bind(&PaneStyleContainer::ProcessPaneStyle,
|
||||
this, ::boost::ref(rReadContext), _1, _2));
|
||||
[this, &rReadContext] (OUString const& rKey, std::vector<uno::Any> const& rValues)
|
||||
{
|
||||
return this->ProcessPaneStyle(rReadContext, rKey, rValues);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -993,8 +997,10 @@ void ViewStyleContainer::Read (
|
||||
{
|
||||
PresenterConfigurationAccess::ForAll(
|
||||
xViewStyleList,
|
||||
::boost::bind(&ViewStyleContainer::ProcessViewStyle,
|
||||
this, ::boost::ref(rReadContext), _2));
|
||||
[this, &rReadContext] (OUString const&, uno::Reference<beans::XPropertySet> const& xProps)
|
||||
{
|
||||
return this->ProcessViewStyle(rReadContext, xProps);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1106,8 +1112,10 @@ void StyleAssociationContainer::Read (
|
||||
PresenterConfigurationAccess::ForAll(
|
||||
xStyleAssociationList,
|
||||
aProperties,
|
||||
::boost::bind(&StyleAssociationContainer::ProcessStyleAssociation,
|
||||
this, ::boost::ref(rReadContext), _1, _2));
|
||||
[this, &rReadContext] (OUString const& rKey, std::vector<uno::Any> const& rValues)
|
||||
{
|
||||
return this->ProcessStyleAssociation(rReadContext, rKey, rValues);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <osl/doublecheckedlocking.h>
|
||||
#include <osl/thread.hxx>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
@@ -416,7 +416,7 @@ void PresenterClockTimer::AddListener (const SharedListener& rListener)
|
||||
if (mnTimerTaskId==PresenterTimer::NotAValidTaskId)
|
||||
{
|
||||
mnTimerTaskId = PresenterTimer::ScheduleRepeatedTask(
|
||||
::boost::bind(&PresenterClockTimer::CheckCurrentTime, this, _1),
|
||||
[this] (TimeValue const& rTime) { return this->CheckCurrentTime(rTime); },
|
||||
0,
|
||||
250000000 /*ns*/);
|
||||
}
|
||||
|
@@ -49,7 +49,6 @@
|
||||
#include <com/sun/star/util/Color.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -658,7 +657,10 @@ void PresenterToolBar::CreateControls (
|
||||
{
|
||||
PresenterConfigurationAccess::ForAll(
|
||||
xEntries,
|
||||
::boost::bind(&PresenterToolBar::ProcessEntry, this, _2, ::boost::ref(aContext)));
|
||||
[this, &aContext] (OUString const&, uno::Reference<beans::XPropertySet> const& xProps)
|
||||
{
|
||||
return this->ProcessEntry(xProps, aContext);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -35,7 +35,6 @@
|
||||
#include <com/sun/star/drawing/XSlideSorterBase.hpp>
|
||||
#include <com/sun/star/presentation/XSlideShow.hpp>
|
||||
#include <com/sun/star/presentation/XSlideShowView.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -490,8 +489,11 @@ Reference<XView> PresenterViewFactory::CreateSlideSorterView(
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindPaneId(rxViewId->getAnchor()));
|
||||
if (pDescriptor.get() != nullptr)
|
||||
pDescriptor->maActivator = ::boost::bind(
|
||||
&PresenterSlideSorter::SetActiveState, _1);
|
||||
{
|
||||
pDescriptor->maActivator = [] (bool const isActive) {
|
||||
return PresenterSlideSorter::SetActiveState(isActive);
|
||||
};
|
||||
}
|
||||
xView = pView.get();
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
|
Reference in New Issue
Block a user