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

sd: replace boost::function with std::function

Change-Id: If70426d6d93a8c3b7c585b1c69e9b1c58643d140
üst 902d61bc
......@@ -69,7 +69,6 @@
#include <basic/sbx.hxx>
#include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/function.hpp>
#include <boost/limits.hpp>
#include <boost/make_shared.hpp>
#include <boost/noncopyable.hpp>
......
......@@ -31,7 +31,8 @@
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/function.hpp>
#include <functional>
#include <map>
namespace sd {
......@@ -146,11 +147,11 @@ public:
static ::boost::shared_ptr<ViewShell> GetViewShell (
const css::uno::Reference<css::drawing::framework::XView>& rxView);
typedef ::boost::function<bool(const css::drawing::framework::ConfigurationChangeEvent&)>
typedef ::std::function<bool (const css::drawing::framework::ConfigurationChangeEvent&)>
ConfigurationChangeEventFilter;
typedef ::boost::function<void(bool bEventSeen)> Callback;
typedef ::boost::function<
void(
typedef ::std::function<void (bool bEventSeen)> Callback;
typedef ::std::function<
void (
const css::uno::Reference<
css::drawing::framework::XResourceId>&)
> ResourceFunctor;
......
......@@ -81,7 +81,7 @@ class SdNavigatorWin
: public vcl::Window
{
public:
typedef ::boost::function<void()> UpdateRequestFunctor;
typedef ::std::function<void ()> UpdateRequestFunctor;
/** Create a new instance of the navigator.
@param bUseActiveUpdate
......
......@@ -31,7 +31,6 @@
#include "sdxfer.hxx"
#include <vector>
#include <boost/scoped_ptr.hpp>
#include <boost/function.hpp>
class SdDrawDocument;
class SfxMedium;
......
......@@ -21,8 +21,9 @@
#define INCLUDED_SD_SOURCE_UI_INC_TOOLS_ASYNCHRONOUSCALL_HXX
#include <vcl/timer.hxx>
#include <memory>
#include <boost/function.hpp>
#include <functional>
namespace sd { namespace tools {
......@@ -63,7 +64,7 @@ public:
The timeout in milliseconds until the function object is
executed.
*/
typedef ::boost::function0<void> AsynchronousFunction;
typedef ::std::function<void ()> AsynchronousFunction;
void Post (
const AsynchronousFunction& rFunction,
sal_uInt32 nTimeoutInMilliseconds=10);
......
......@@ -25,8 +25,9 @@
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <vector>
#include <boost/function.hpp>
#include <functional>
namespace sd { namespace tools {
......@@ -91,7 +92,7 @@ public:
parameters are the name of key item (often of no further interest)
and the value of the item.
*/
typedef ::boost::function<void(
typedef ::std::function<void (
const OUString&,
const std::vector<css::uno::Any>&) > Functor;
......
......@@ -32,7 +32,8 @@
#include <svx/svdpagv.hxx>
#include <vcl/svapp.hxx>
#include <vcl/timer.hxx>
#include <boost/function.hpp>
#include <functional>
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
......@@ -51,7 +52,7 @@ class RequestQueue;
class QueueProcessor
{
public:
typedef ::boost::function<bool()> IdleDetectionCallback;
typedef ::std::function<bool ()> IdleDetectionCallback;
QueueProcessor (
RequestQueue& rQueue,
const ::boost::shared_ptr<BitmapCache>& rpCache,
......
......@@ -501,7 +501,7 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
bool ScrollBarManager::AutoScroll (
const Point& rMouseWindowPosition,
const ::boost::function<void()>& rAutoScrollFunctor)
const ::std::function<void ()>& rAutoScrollFunctor)
{
maAutoScrollFunctor = rAutoScrollFunctor;
CalcAutoScrollOffset(rMouseWindowPosition);
......@@ -546,7 +546,7 @@ bool ScrollBarManager::RepeatAutoScroll()
void ScrollBarManager::clearAutoScrollFunctor()
{
maAutoScrollFunctor = ::boost::function<void()>();
maAutoScrollFunctor = ::std::function<void ()>();
}
IMPL_LINK_NOARG_TYPED(ScrollBarManager, AutoScrollTimeoutHandler, Timer *, void)
......
......@@ -43,7 +43,7 @@ namespace {
SlideSorter& mrSlideSorter;
Point maStart;
const Point maEnd;
const ::boost::function<double(double)> maAccelerationFunction;
const ::std::function<double (double)> maAccelerationFunction;
};
} // end of anonymous namespace
......
......@@ -22,8 +22,10 @@
#include "model/SlsSharedPageDescriptor.hxx"
#include <basegfx/point/b2dpoint.hxx>
#include <boost/noncopyable.hpp>
#include <boost/function.hpp>
#include <functional>
#include <vector>
namespace sd { namespace slidesorter { namespace view {
......@@ -65,7 +67,7 @@ private:
class AnimationParametricFunction
{
public:
typedef ::boost::function<basegfx::B2DPoint(double)> ParametricFunction;
typedef ::std::function<basegfx::B2DPoint (double)> ParametricFunction;
AnimationParametricFunction (const ParametricFunction& rFunction);
double operator() (const double nX);
......
......@@ -26,12 +26,14 @@
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <sal/types.h>
#include <vector>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <functional>
#include <vector>
namespace sd { namespace slidesorter { namespace controller {
/** Experimental class for simple eye candy animations.
......@@ -57,8 +59,8 @@ public:
/** An animation object is called with values between 0 and 1 as single
argument to its operator() method.
*/
typedef ::boost::function1<void, double> AnimationFunctor;
typedef ::boost::function0<void> FinishFunctor;
typedef ::std::function<void (double)> AnimationFunctor;
typedef ::std::function<void ()> FinishFunctor;
typedef sal_Int32 AnimationId;
static const AnimationId NotAnAnimationId = -1;
......
......@@ -25,7 +25,8 @@
#include <tools/link.hxx>
#include <tools/gen.hxx>
#include <vcl/timer.hxx>
#include <boost/function.hpp>
#include <functional>
class ScrollBar;
class ScrollBarBox;
......@@ -144,7 +145,7 @@ public:
*/
bool AutoScroll (
const Point& rMouseWindowPosition,
const ::boost::function<void()>& rAutoScrollFunctor);
const ::std::function<void ()>& rAutoScrollFunctor);
void StopAutoScroll();
......@@ -207,7 +208,7 @@ private:
*/
VclPtr<sd::Window> mpContentWindow;
::boost::function<void()> maAutoScrollFunctor;
::std::function<void ()> maAutoScrollFunctor;
void SetWindowOrigin (
double nHorizontalPosition,
......
......@@ -21,8 +21,9 @@
#define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSTRANSFERABLEDATA_HXX
#include "sdxfer.hxx"
#include <boost/function.hpp>
#include <vector>
#include <functional>
class SdDrawDocument;
namespace sd { namespace slidesorter {
......@@ -78,7 +79,7 @@ public:
private:
SlideSorterViewShell* mpViewShell;
const ::std::vector<Representative> maRepresentatives;
typedef ::std::vector<boost::function<void(sal_uInt8)> > CallbackContainer;
typedef ::std::vector<std::function<void (sal_uInt8)> > CallbackContainer;
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint) SAL_OVERRIDE;
};
......
......@@ -27,7 +27,7 @@
#include "model/SlsEnumeration.hxx"
#include "model/SlsSharedPageDescriptor.hxx"
#include <boost/function.hpp>
#include <functional>
#include <memory>
namespace sd { namespace slidesorter { namespace model {
......@@ -54,7 +54,7 @@ public:
enumeration. Pages for which rPredicate returns <FALSE/> are
exclude.
*/
typedef ::boost::function<bool(const SharedPageDescriptor&)> PagePredicate;
typedef ::std::function<bool (const SharedPageDescriptor&)> PagePredicate;
static PageEnumeration Create (
const SlideSorterModel& rModel,
const PagePredicate& rPredicate);
......
......@@ -20,7 +20,6 @@
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageEnumeration.hxx"
#include "model/SlsPageDescriptor.hxx"
#include <boost/function.hpp>
namespace sd { namespace slidesorter { namespace model {
......
......@@ -97,7 +97,7 @@ public:
private:
controller::Animator::AnimationId mnAnimationId;
AnimatorAccess& mrAnimatorAccess;
::boost::function<double(double)> maAccelerationFunction;
::std::function<double (double)> maAccelerationFunction;
void RestartAnimation();
};
......@@ -395,14 +395,13 @@ void PageObjectRun::RestartAnimation()
// Restart the animation.
mrAnimatorAccess.AddRun(shared_from_this());
auto sharedThis(shared_from_this());
mnAnimationId = mrAnimatorAccess.GetAnimator()->AddAnimation(
::boost::ref(*this),
[this] (double const val) { (*this)(val); },
0,
300,
::boost::bind(
&AnimatorAccess::RemoveRun,
::boost::ref(mrAnimatorAccess),
shared_from_this()));
[sharedThis] () { sharedThis->mrAnimatorAccess.RemoveRun(sharedThis); }
);
}
void PageObjectRun::operator () (const double nGlobalTime)
......
......@@ -22,12 +22,13 @@
#include <vcl/window.hxx>
#include <vcl/virdev.hxx>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <tools/gen.hxx>
#include <tools/fract.hxx>
#include <boost/bind.hpp>
#include <functional>
namespace sd { namespace slidesorter { namespace view {
namespace {
......@@ -75,7 +76,7 @@ void DeviceCopy (
rSourceDevice);
}
void ForAllRectangles (const vcl::Region& rRegion, ::boost::function<void(const Rectangle&)> aFunction)
void ForAllRectangles (const vcl::Region& rRegion, ::std::function<void (const Rectangle&)> aFunction)
{
OSL_ASSERT(aFunction);
RectangleVector aRectangles;
......
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