sd/inc/pch/precompiled_sd.hxx | 1 sd/source/ui/inc/framework/FrameworkHelper.hxx | 11 ++--- sd/source/ui/inc/navigatr.hxx | 2 sd/source/ui/inc/sdtreelb.hxx | 1 sd/source/ui/inc/tools/AsynchronousCall.hxx | 5 +- sd/source/ui/inc/tools/ConfigurationAccess.hxx | 5 +- sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx | 5 +- sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx | 4 - sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx | 2 sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx | 6 +- sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx | 10 ++-- sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx | 7 +-- sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx | 5 +- sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx | 4 - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx | 1 sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx | 11 ++--- sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 9 ++-- sdext/inc/pch/precompiled_PresenterScreen.hxx | 1 sdext/source/presenter/PresenterAccessibility.cxx | 4 - sdext/source/presenter/PresenterConfigurationAccess.hxx | 9 ++-- sdext/source/presenter/PresenterFrameworkObserver.cxx | 8 +-- sdext/source/presenter/PresenterFrameworkObserver.hxx | 8 ++- sdext/source/presenter/PresenterPaintManager.cxx | 2 sdext/source/presenter/PresenterPaintManager.hxx | 5 +- sdext/source/presenter/PresenterPaneContainer.cxx | 6 +- sdext/source/presenter/PresenterPaneContainer.hxx | 12 +++-- sdext/source/presenter/PresenterScrollBar.cxx | 4 - sdext/source/presenter/PresenterScrollBar.hxx | 12 +++-- sdext/source/presenter/PresenterSlideSorter.cxx | 5 +- sdext/source/presenter/PresenterTextView.cxx | 10 ++-- sdext/source/presenter/PresenterTextView.hxx | 21 +++++----- sdext/source/presenter/PresenterTimer.cxx | 4 - sdext/source/presenter/PresenterTimer.hxx | 7 ++- sdext/source/presenter/PresenterToolBar.hxx | 6 +- slideshow/inc/pch/precompiled_slideshow.hxx | 1 slideshow/source/engine/delayevent.cxx | 4 - slideshow/source/engine/effectrewinder.cxx | 16 +++---- slideshow/source/engine/effectrewinder.hxx | 12 +++-- slideshow/source/engine/eventmultiplexer.cxx | 1 slideshow/source/inc/delayevent.hxx | 9 ++-- svx/source/gallery2/GallerySplitter.cxx | 2 svx/source/gallery2/GallerySplitter.hxx | 7 +-- svx/source/gallery2/galbrws1.cxx | 4 - svx/source/gallery2/galbrws1.hxx | 10 ++-- svx/source/sidebar/text/TextCharacterSpacingPopup.cxx | 2 svx/source/sidebar/text/TextCharacterSpacingPopup.hxx | 4 - svx/source/sidebar/text/TextUnderlinePopup.cxx | 2 svx/source/sidebar/text/TextUnderlinePopup.hxx | 6 +- toolkit/source/awt/vclxwindows.cxx | 1 vcl/workben/outdevgrind.cxx | 5 +- 50 files changed, 161 insertions(+), 138 deletions(-)
New commits: commit 5088ee99ce8a78b1f87052601cf8d6c7d2ff84db Author: Michael Stahl <mst...@redhat.com> Date: Mon Aug 3 13:12:34 2015 +0200 sd: replace boost::function with std::function Change-Id: If70426d6d93a8c3b7c585b1c69e9b1c58643d140 diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 0bf4d96..62ab27d 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -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> diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx index 2dd9aa0..8407203 100644 --- a/sd/source/ui/inc/framework/FrameworkHelper.hxx +++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx @@ -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; diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx index eac5126..33fd959 100644 --- a/sd/source/ui/inc/navigatr.hxx +++ b/sd/source/ui/inc/navigatr.hxx @@ -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 diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 7e91897..6b8c84b 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -31,7 +31,6 @@ #include "sdxfer.hxx" #include <vector> #include <boost/scoped_ptr.hpp> -#include <boost/function.hpp> class SdDrawDocument; class SfxMedium; diff --git a/sd/source/ui/inc/tools/AsynchronousCall.hxx b/sd/source/ui/inc/tools/AsynchronousCall.hxx index a95ad7f..d20a76f 100644 --- a/sd/source/ui/inc/tools/AsynchronousCall.hxx +++ b/sd/source/ui/inc/tools/AsynchronousCall.hxx @@ -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); diff --git a/sd/source/ui/inc/tools/ConfigurationAccess.hxx b/sd/source/ui/inc/tools/ConfigurationAccess.hxx index fa17a6a..c7bf620 100644 --- a/sd/source/ui/inc/tools/ConfigurationAccess.hxx +++ b/sd/source/ui/inc/tools/ConfigurationAccess.hxx @@ -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; diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx index 253bc11..40fd28b 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx @@ -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, diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index 6f2ac79..1efe989 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -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) diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx index 6ccc8af..3de85b3 100644 --- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx @@ -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 diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx index 2ac9ec9..8de015f 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx @@ -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); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx index d58511f..09135d9 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx @@ -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; diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx index 3c0761d..c6398a2 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx @@ -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, diff --git a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx index 1e60ac8..bc189e0 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx @@ -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; }; diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx index 247bfe2..2e30486 100644 --- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx +++ b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx @@ -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); diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx b/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx index fafeb9c..28bfeae 100644 --- a/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx +++ b/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx @@ -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 { diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index ad3a4a9..5e5ef85 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx @@ -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) diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index 72cecd6..ac660a8 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -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; commit 902d61bc7f2e0491b95798c2ece8595b3881b573 Author: Michael Stahl <mst...@redhat.com> Date: Mon Aug 3 12:50:28 2015 +0200 sdext: replace boost::function with std::function This one is a bit odd, wonder if that was a bug: - aAction(aPredicate); + aAction(aPredicate()); Change-Id: I0ddd565b65fe4778a297486805fa7f7a12702224 diff --git a/sdext/inc/pch/precompiled_PresenterScreen.hxx b/sdext/inc/pch/precompiled_PresenterScreen.hxx index 405e652..7183265 100644 --- a/sdext/inc/pch/precompiled_PresenterScreen.hxx +++ b/sdext/inc/pch/precompiled_PresenterScreen.hxx @@ -21,7 +21,6 @@ #include <algorithm> #include <boost/bind.hpp> #include <boost/enable_shared_from_this.hpp> -#include <boost/function.hpp> #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index 817b4a2..94d002c 100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -1874,9 +1874,9 @@ void AccessibleNotes::SetTextView ( if (mpTextView) { mpTextView->GetCaret()->SetCaretMotionBroadcaster( - ::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)>()); + ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)>()); mpTextView->SetTextChangeBroadcaster( - ::boost::function<void()>()); + ::std::function<void ()>()); } mpTextView = rpTextView; diff --git a/sdext/source/presenter/PresenterConfigurationAccess.hxx b/sdext/source/presenter/PresenterConfigurationAccess.hxx index ef2a6b4..a927368 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.hxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.hxx @@ -25,8 +25,9 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/uno/XComponentContext.hpp> + #include <vector> -#include <boost/function.hpp> +#include <functional> namespace sdext { namespace presenter { @@ -48,7 +49,7 @@ class PresenterConfigurationAccess { public: enum WriteMode { READ_WRITE, READ_ONLY }; - typedef ::boost::function<bool( + typedef ::std::function<bool ( const OUString&, const css::uno::Reference<css::beans::XPropertySet>&)> Predicate; static const OUString msPresenterScreenRootName; @@ -121,10 +122,10 @@ public: */ void CommitChanges(); - typedef ::boost::function<void( + typedef ::std::function<void ( const OUString&, const ::std::vector<css::uno::Any>&) > ItemProcessor; - typedef ::boost::function<void( + typedef ::std::function<void ( const OUString&, const css::uno::Reference<css::beans::XPropertySet>&) > PropertySetProcessor; diff --git a/sdext/source/presenter/PresenterFrameworkObserver.cxx b/sdext/source/presenter/PresenterFrameworkObserver.cxx index b3dc385..0a5f5e7 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.cxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.cxx @@ -82,7 +82,7 @@ bool PresenterFrameworkObserver::True() void SAL_CALL PresenterFrameworkObserver::disposing() { - if ( ! maAction.empty()) + if (maAction) maAction(false); Shutdown(); } @@ -108,7 +108,7 @@ void SAL_CALL PresenterFrameworkObserver::disposing (const lang::EventObject& rE if (rEvent.Source == mxConfigurationController) { mxConfigurationController = NULL; - if ( ! maAction.empty()) + if (maAction) maAction(false); } } @@ -124,7 +124,7 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange ( if (rEvent.Type == "ConfigurationUpdateEnd") { Shutdown(); - aAction(aPredicate); + aAction(aPredicate()); bDispose = true; } else if (aPredicate()) @@ -136,7 +136,7 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange ( if (bDispose) { - maAction.clear(); + maAction = nullptr; dispose(); } } diff --git a/sdext/source/presenter/PresenterFrameworkObserver.hxx b/sdext/source/presenter/PresenterFrameworkObserver.hxx index 3ebc2cb..edc9481 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.hxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.hxx @@ -24,9 +24,11 @@ #include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> -#include <boost/function.hpp> + #include <boost/noncopyable.hpp> +#include <functional> + namespace sdext { namespace presenter { typedef ::cppu::WeakComponentImplHelper1 < @@ -42,8 +44,8 @@ class PresenterFrameworkObserver public PresenterFrameworkObserverInterfaceBase { public: - typedef ::boost::function<bool()> Predicate; - typedef ::boost::function<void(bool)> Action; + typedef ::std::function<bool ()> Predicate; + typedef ::std::function<void (bool)> Action; static void RunOnUpdateEnd ( const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController, diff --git a/sdext/source/presenter/PresenterPaintManager.cxx b/sdext/source/presenter/PresenterPaintManager.cxx index 8c00b7d9..4f385e8 100644 --- a/sdext/source/presenter/PresenterPaintManager.cxx +++ b/sdext/source/presenter/PresenterPaintManager.cxx @@ -40,7 +40,7 @@ PresenterPaintManager::PresenterPaintManager ( { } -::boost::function<void(const css::awt::Rectangle& rRepaintBox)> +::std::function<void (const css::awt::Rectangle& rRepaintBox)> PresenterPaintManager::GetInvalidator ( const css::uno::Reference<css::awt::XWindow>& rxWindow, const bool bSynchronous) diff --git a/sdext/source/presenter/PresenterPaintManager.hxx b/sdext/source/presenter/PresenterPaintManager.hxx index 440d1dc..3ad0141 100644 --- a/sdext/source/presenter/PresenterPaintManager.hxx +++ b/sdext/source/presenter/PresenterPaintManager.hxx @@ -24,7 +24,8 @@ #include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/drawing/XPresenterHelper.hpp> #include <rtl/ref.hxx> -#include <boost/function.hpp> + +#include <functional> namespace sdext { namespace presenter { @@ -45,7 +46,7 @@ public: const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper, const rtl::Reference<PresenterPaneContainer>& rpPaneContainer); - ::boost::function<void(const css::awt::Rectangle& rRepaintBox)> + ::std::function<void (const css::awt::Rectangle& rRepaintBox)> GetInvalidator ( const css::uno::Reference<css::awt::XWindow>& rxWindow, const bool bSynchronous = false); diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx index 74dfb1c..6d0d595 100644 --- a/sdext/source/presenter/PresenterPaneContainer.cxx +++ b/sdext/source/presenter/PresenterPaneContainer.cxx @@ -196,11 +196,11 @@ PresenterPaneContainer::SharedPaneDescriptor pDescriptor->mxPane->SetBackground(rpViewBackground); try { - if ( ! pDescriptor->maViewInitialization.empty()) + if (pDescriptor->maViewInitialization) pDescriptor->maViewInitialization(rxView); // Activate or deactivate the pane/view. - if ( ! pDescriptor->maActivator.empty()) + if (pDescriptor->maActivator) pDescriptor->maActivator(pDescriptor->mbIsActive); } catch (RuntimeException&) @@ -376,7 +376,7 @@ void SAL_CALL PresenterPaneContainer::disposing ( void PresenterPaneContainer::PaneDescriptor::SetActivationState (const bool bIsActive) { mbIsActive = bIsActive; - if ( ! maActivator.empty()) + if (maActivator) maActivator(mbIsActive); } diff --git a/sdext/source/presenter/PresenterPaneContainer.hxx b/sdext/source/presenter/PresenterPaneContainer.hxx index c22eb27..03704b9 100644 --- a/sdext/source/presenter/PresenterPaneContainer.hxx +++ b/sdext/source/presenter/PresenterPaneContainer.hxx @@ -33,11 +33,13 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase1.hxx> #include <rtl/ref.hxx> -#include <vector> -#include <boost/function.hpp> + #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> +#include <vector> +#include <functional> + namespace sdext { namespace presenter { class PresenterPaneBase; @@ -65,7 +67,7 @@ public: virtual void SAL_CALL disposing() SAL_OVERRIDE; - typedef ::boost::function1<void, const css::uno::Reference<css::drawing::framework::XView>&> + typedef ::std::function<void (const css::uno::Reference<css::drawing::framework::XView>&)> ViewInitializationFunction; /** Each pane descriptor holds references to one pane and the view @@ -79,8 +81,8 @@ public: class PaneDescriptor { public: - typedef ::boost::function<void(bool)> Activator; - typedef ::boost::function<boost::shared_ptr<PresenterSprite>()> SpriteProvider; + typedef ::std::function<void (bool)> Activator; + typedef ::std::function<boost::shared_ptr<PresenterSprite> ()> SpriteProvider; css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId; OUString msViewURL; ::rtl::Reference<PresenterPaneBase> mxPane; diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index fcf708e..bd5f07b 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -72,7 +72,7 @@ PresenterScrollBar::PresenterScrollBar ( const Reference<XComponentContext>& rxComponentContext, const Reference<awt::XWindow>& rxParentWindow, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, - const ::boost::function<void(double)>& rThumbMotionListener) + const ::std::function<void (double)>& rThumbMotionListener) : PresenterScrollBarInterfaceBase(m_aMutex), mxComponentContext(rxComponentContext), mxParentWindow(rxParentWindow), @@ -630,7 +630,7 @@ PresenterVerticalScrollBar::PresenterVerticalScrollBar ( const Reference<XComponentContext>& rxComponentContext, const Reference<awt::XWindow>& rxParentWindow, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, - const ::boost::function<void(double)>& rThumbMotionListener) + const ::std::function<void (double)>& rThumbMotionListener) : PresenterScrollBar(rxComponentContext, rxParentWindow, rpPaintManager, rThumbMotionListener), mnScrollBarWidth(0) { diff --git a/sdext/source/presenter/PresenterScrollBar.hxx b/sdext/source/presenter/PresenterScrollBar.hxx index 0941358..5e91d20 100644 --- a/sdext/source/presenter/PresenterScrollBar.hxx +++ b/sdext/source/presenter/PresenterScrollBar.hxx @@ -28,11 +28,13 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase4.hxx> -#include <boost/function.hpp> + #include <boost/noncopyable.hpp> #include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> +#include <functional> + namespace sdext { namespace presenter { class PresenterCanvasHelper; @@ -55,7 +57,7 @@ class PresenterScrollBar public PresenterScrollBarInterfaceBase { public: - typedef ::boost::function<void(double)> ThumbMotionListener; + typedef ::std::function<void (double)> ThumbMotionListener; virtual ~PresenterScrollBar(); virtual void SAL_CALL disposing() SAL_OVERRIDE; @@ -171,7 +173,7 @@ protected: double mnThumbSize; double mnLineHeight; css::geometry::RealPoint2D maDragAnchor; - ::boost::function<void(double)> maThumbMotionListener; + ::std::function<void (double)> maThumbMotionListener; Area meButtonDownArea; Area meMouseMoveArea; css::geometry::RealRectangle2D maBox[__AreaCount__]; @@ -205,7 +207,7 @@ protected: const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext, const css::uno::Reference<css::awt::XWindow>& rxParentWindow, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, - const ::boost::function<void(double)>& rThumbMotionListener); + const ::std::function<void (double)>& rThumbMotionListener); void Repaint ( const css::geometry::RealRectangle2D& rBox, @@ -250,7 +252,7 @@ public: const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext, const css::uno::Reference<css::awt::XWindow>& rxParentWindow, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, - const ::boost::function<void(double)>& rThumbMotionListener); + const ::std::function<void (double)>& rThumbMotionListener); virtual ~PresenterVerticalScrollBar(); virtual sal_Int32 GetSize() const SAL_OVERRIDE; diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index c1024c6..e785f59 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -101,7 +101,7 @@ public: const sal_Int32 nRelativeHorizontalPosition, const sal_Int32 nRelativeVerticalPosition) const; css::awt::Rectangle GetBoundingBox (const sal_Int32 nSlideIndex) const; - void ForAllVisibleSlides (const ::boost::function<void(sal_Int32)>& rAction); + void ForAllVisibleSlides (const ::std::function<void (sal_Int32)>& rAction); sal_Int32 GetFirstVisibleSlideIndex() const; sal_Int32 GetLastVisibleSlideIndex() const; bool SetHorizontalOffset (const double nOffset); @@ -1394,7 +1394,8 @@ awt::Rectangle PresenterSlideSorter::Layout::GetBoundingBox (const sal_Int32 nSl aWindowPosition.Y + maPreviewSize.Height)); } -void PresenterSlideSorter::Layout::ForAllVisibleSlides (const ::boost::function<void(sal_Int32)>& rAction) +void PresenterSlideSorter::Layout::ForAllVisibleSlides( + const ::std::function<void (sal_Int32)>& rAction) { for (sal_Int32 nRow=mnFirstVisibleRow; nRow<=mnLastVisibleRow; ++nRow) { diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index e0b3838..310427e 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -64,7 +64,7 @@ namespace sdext { namespace presenter { PresenterTextView::PresenterTextView ( const Reference<XComponentContext>& rxContext, const Reference<rendering::XCanvas>& rxCanvas, - const ::boost::function<void(const css::awt::Rectangle&)>& rInvalidator) + const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator) : mxCanvas(rxCanvas), mbDoOuput(true), mxBreakIterator(), @@ -139,7 +139,7 @@ void PresenterTextView::SetText (const Reference<text::XText>& rxText) } void PresenterTextView::SetTextChangeBroadcaster ( - const ::boost::function<void()>& rBroadcaster) + const ::std::function<void ()>& rBroadcaster) { maTextChangeBroadcaster = rBroadcaster; } @@ -1084,8 +1084,8 @@ void PresenterTextParagraph::SetupCellArray ( //===== PresenterTextCaret ================================================---- PresenterTextCaret::PresenterTextCaret ( - const ::boost::function<css::awt::Rectangle(const sal_Int32,const sal_Int32)>& rCharacterBoundsAccess, - const ::boost::function<void(const css::awt::Rectangle&)>& rInvalidator) + const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)>& rCharacterBoundsAccess, + const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator) : mnParagraphIndex(-1), mnCharacterIndex(-1), mnCaretBlinkTaskId(0), @@ -1164,7 +1164,7 @@ void PresenterTextCaret::SetPosition ( void PresenterTextCaret::SetCaretMotionBroadcaster ( - const ::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster) + const ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster) { maBroadcaster = rBroadcaster; } diff --git a/sdext/source/presenter/PresenterTextView.hxx b/sdext/source/presenter/PresenterTextView.hxx index 1a47da0..3b5fea7 100644 --- a/sdext/source/presenter/PresenterTextView.hxx +++ b/sdext/source/presenter/PresenterTextView.hxx @@ -34,6 +34,7 @@ #include <cppuhelper/compbase1.hxx> #include <cppuhelper/basemutex.hxx> +#include <functional> namespace sdext { namespace presenter { @@ -41,9 +42,9 @@ class PresenterTextCaret { public: PresenterTextCaret ( - const ::boost::function<css::awt::Rectangle(const sal_Int32,const sal_Int32)>& + const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)>& rCharacterBoundsAccess, - const ::boost::function<void(const css::awt::Rectangle&)>& + const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator); ~PresenterTextCaret(); @@ -64,7 +65,7 @@ public: when the caret changes position. */ void SetCaretMotionBroadcaster ( - const ::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster); + const ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster); css::awt::Rectangle GetBounds() const; @@ -73,9 +74,9 @@ private: sal_Int32 mnCharacterIndex; sal_Int32 mnCaretBlinkTaskId; bool mbIsCaretVisible; - const ::boost::function<css::awt::Rectangle(const sal_Int32,const sal_Int32)> maCharacterBoundsAccess; - const ::boost::function<void(const css::awt::Rectangle&)> maInvalidator; - ::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)> maBroadcaster; + const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)> maCharacterBoundsAccess; + const ::std::function<void (const css::awt::Rectangle&)> maInvalidator; + ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)> maBroadcaster; css::awt::Rectangle maCaretBounds; void InvertCaret(); @@ -219,9 +220,9 @@ public: PresenterTextView ( const css::uno::Reference<css::uno::XComponentContext>& rxContext, const css::uno::Reference<css::rendering::XCanvas>& rxCanvas, - const ::boost::function<void(const css::awt::Rectangle&)>& rInvalidator); + const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator); void SetText (const css::uno::Reference<css::text::XText>& rxText); - void SetTextChangeBroadcaster (const ::boost::function<void()>& rBroadcaster); + void SetTextChangeBroadcaster(const ::std::function<void ()>& rBroadcaster); void SetLocation (const css::geometry::RealPoint2D& rLocation); void SetSize (const css::geometry::RealSize2D& rSize); @@ -264,10 +265,10 @@ private: SharedPresenterTextCaret mpCaret; double mnLeftOffset; double mnTopOffset; - const ::boost::function<void(const css::awt::Rectangle&)> maInvalidator; + const ::std::function<void (const css::awt::Rectangle&)> maInvalidator; bool mbIsFormatPending; sal_Int32 mnCharacterCount; - ::boost::function<void()> maTextChangeBroadcaster; + ::std::function<void ()> maTextChangeBroadcaster; void RequestFormat(); void Format(); diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx index 0af4482..dd0e671 100644 --- a/sdext/source/presenter/PresenterTimer.cxx +++ b/sdext/source/presenter/PresenterTimer.cxx @@ -23,7 +23,6 @@ #include <osl/doublecheckedlocking.h> #include <osl/thread.hxx> #include <boost/bind.hpp> -#include <boost/function.hpp> #include <boost/enable_shared_from_this.hpp> #include <set> #include <iterator> @@ -274,8 +273,7 @@ void SAL_CALL TimerScheduler::run() else { // Execute task. - if ( ! pTask->maTask.empty() - && ! pTask->mbIsCanceled) + if (pTask->maTask && !pTask->mbIsCanceled) { pTask->maTask(aCurrentTime); diff --git a/sdext/source/presenter/PresenterTimer.hxx b/sdext/source/presenter/PresenterTimer.hxx index 8e37a8b..e7bd616 100644 --- a/sdext/source/presenter/PresenterTimer.hxx +++ b/sdext/source/presenter/PresenterTimer.hxx @@ -28,7 +28,10 @@ #include <osl/time.h> #include <rtl/ref.hxx> #include <sal/types.h> -#include <boost/function.hpp> + +#include <boost/shared_ptr.hpp> + +#include <functional> #include <vector> namespace com { namespace sun { namespace star { namespace uno { @@ -45,7 +48,7 @@ class PresenterTimer public: /** A task is called with the current time. */ - typedef ::boost::function<void(const TimeValue&)> Task; + typedef ::std::function<void (const TimeValue&)> Task; static const sal_Int32 NotAValidTaskId = 0; diff --git a/sdext/source/presenter/PresenterToolBar.hxx b/sdext/source/presenter/PresenterToolBar.hxx index fabdbc5..a249d01 100644 --- a/sdext/source/presenter/PresenterToolBar.hxx +++ b/sdext/source/presenter/PresenterToolBar.hxx @@ -43,9 +43,11 @@ #include <com/sun/star/drawing/framework/XView.hpp> #include <com/sun/star/drawing/framework/XResourceId.hpp> #include <com/sun/star/frame/XController.hpp> -#include <boost/function.hpp> + #include <boost/noncopyable.hpp> +#include <functional> + namespace { typedef cppu::WeakComponentImplHelper5< css::awt::XWindowListener, @@ -76,7 +78,7 @@ class PresenterToolBar public CachablePresenterView { public: - typedef ::boost::function<void()> Action; + typedef ::std::function<void ()> Action; enum Anchor { Left, Center, Right }; commit 34d2a07a23f344b33f9b3ed7d2a70b405b392db6 Author: Michael Stahl <mst...@redhat.com> Date: Mon Aug 3 12:27:57 2015 +0200 slideshow: replace boost::function with std::function Change-Id: Ibcb0f40d327e3086b6493cf2052caf135aa89e10 diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx index ffdc8bb..96a8bb9 100644 --- a/slideshow/inc/pch/precompiled_slideshow.hxx +++ b/slideshow/inc/pch/precompiled_slideshow.hxx @@ -41,7 +41,6 @@ #include <boost/bind.hpp> #include <boost/current_function.hpp> #include <boost/enable_shared_from_this.hpp> -#include <boost/function.hpp> #include <boost/mem_fn.hpp> #include <boost/noncopyable.hpp> #include <boost/optional.hpp> diff --git a/slideshow/source/engine/delayevent.cxx b/slideshow/source/engine/delayevent.cxx index b33d8f0..78dd035 100644 --- a/slideshow/source/engine/delayevent.cxx +++ b/slideshow/source/engine/delayevent.cxx @@ -30,7 +30,7 @@ bool Delay::fire() if (isCharged()) { mbWasFired = true; maFunc(); - maFunc.clear(); // early release of payload + maFunc = nullptr; // early release of payload } return true; } @@ -50,7 +50,7 @@ void Delay::dispose() // don't clear unconditionally, because it may currently be executed: if (isCharged()) { mbWasFired = true; - maFunc.clear(); // release of payload + maFunc = nullptr; // release of payload } } diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 9498598..2b2bbfb 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -29,7 +29,7 @@ #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/animations/EventTrigger.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> -#include <boost/function.hpp> + #include <boost/bind.hpp> #include <boost/enable_shared_from_this.hpp> @@ -44,7 +44,7 @@ namespace { class RewinderEventHandler : public EventHandler { public: - typedef ::boost::function<bool()> Action; + typedef ::std::function<bool ()> Action; RewinderEventHandler (const Action& rAction) : maAction(rAction) {} virtual ~RewinderEventHandler() {} private: @@ -57,7 +57,7 @@ private: class RewinderAnimationEventHandler : public AnimationEventHandler { public: - typedef ::boost::function<bool(const AnimationNodeSharedPtr& rpNode)> Action; + typedef ::std::function<bool (const AnimationNodeSharedPtr& rpNode)> Action; RewinderAnimationEventHandler (const Action& rAction) : maAction(rAction) {} virtual ~RewinderAnimationEventHandler() {} private: @@ -170,8 +170,8 @@ void EffectRewinder::setRootAnimationNode ( bool EffectRewinder::rewind ( const ::boost::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, - const ::boost::function<void()>& rSlideRewindFunctor, - const ::boost::function<void()>& rPreviousSlideFunctor) + const ::std::function<void ()>& rSlideRewindFunctor, + const ::std::function<void ()>& rPreviousSlideFunctor) { mpPaintLock = rpPaintLock; @@ -243,7 +243,7 @@ void EffectRewinder::skipAllMainSequenceEffects() this, nTotalMainSequenceEffectCount, false, - ::boost::function<void()>()), + ::std::function<void ()>()), "EffectRewinder::asynchronousRewind"); mrEventQueue.addEvent(mpAsynchronousRewindEvent); } @@ -354,7 +354,7 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) void EffectRewinder::asynchronousRewind ( sal_Int32 nEffectCount, const bool bRedisplayCurrentSlide, - const boost::function<void()>& rSlideRewindFunctor) + const std::function<void ()>& rSlideRewindFunctor) { OSL_ASSERT(mpAsynchronousRewindEvent); @@ -398,7 +398,7 @@ void EffectRewinder::asynchronousRewind ( void EffectRewinder::asynchronousRewindToPreviousSlide ( - const ::boost::function<void()>& rSlideRewindFunctor) + const ::std::function<void ()>& rSlideRewindFunctor) { OSL_ASSERT(mpAsynchronousRewindEvent); diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index 2fba401..7132376 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -27,8 +27,10 @@ #include "screenupdater.hxx" #include <com/sun/star/presentation/XSlideShow.hpp> + #include <boost/scoped_ptr.hpp> -#include <boost/function.hpp> + +#include <functional> #include <vector> namespace slideshow { namespace internal { @@ -90,8 +92,8 @@ public: */ bool rewind ( const ::boost::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, - const ::boost::function<void()>& rSlideRewindFunctor, - const ::boost::function<void()>& rPreviousSlideFunctor); + const ::std::function<void ()>& rSlideRewindFunctor, + const ::std::function<void ()>& rPreviousSlideFunctor); /** Call this method after gotoPreviousEffect() triggered a slide change to the previous slide. @@ -152,7 +154,7 @@ private: void asynchronousRewind ( sal_Int32 nEffectCount, const bool bRedisplayCurrentSlide, - const boost::function<void()>& rSlideRewindFunctor); + const ::std::function<void ()>& rSlideRewindFunctor); /** Go to the previous slide and replay all of its main sequence effects (or effect groups). @@ -160,7 +162,7 @@ private: This functor is used to go to the previous slide. */ void asynchronousRewindToPreviousSlide ( - const ::boost::function<void()>& rPreviousSlideFunctor); + const ::std::function<void ()>& rPreviousSlideFunctor); }; } } // end of namespace ::slideshow::internal diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 0d3c391..d5c32fa 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -46,7 +46,6 @@ #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> -#include <boost/function.hpp> #include <boost/noncopyable.hpp> #include <boost/bind.hpp> diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index cbfd759..09efe7e 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -19,11 +19,12 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_DELAYEVENT_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_DELAYEVENT_HXX -#include <boost/function.hpp> - #include "event.hxx" + #include <boost/noncopyable.hpp> +#include <functional> + namespace slideshow { namespace internal { @@ -32,7 +33,7 @@ namespace internal { class Delay : public Event, private ::boost::noncopyable { public: - typedef ::boost::function0<void> FunctorT; + typedef ::std::function<void ()> FunctorT; template <typename FuncT> Delay( FuncT const& func, @@ -41,7 +42,7 @@ public: ) : Event(rsDescription), mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} - Delay( const boost::function0<void>& func, + Delay( const std::function<void ()>& func, double nTimeout , const OUString& rsDescription ) : Event(rsDescription), commit 81c6ae873d0b624f8f5113253180e796bdafd8d8 Author: Michael Stahl <mst...@redhat.com> Date: Mon Aug 3 12:21:19 2015 +0200 svx: replace boost::function with std::function Change-Id: I52def97b8dfa9e4dba5d47937de45e587a23b4de diff --git a/svx/source/gallery2/GallerySplitter.cxx b/svx/source/gallery2/GallerySplitter.cxx index f6857f8..21dc47c 100644 --- a/svx/source/gallery2/GallerySplitter.cxx +++ b/svx/source/gallery2/GallerySplitter.cxx @@ -22,7 +22,7 @@ GallerySplitter::GallerySplitter( vcl::Window* pParent, WinBits nStyle, - const ::boost::function<void()>& rDataChangeFunctor) + const ::std::function<void ()>& rDataChangeFunctor) : Splitter(pParent, nStyle) , maDataChangeFunctor(rDataChangeFunctor) { diff --git a/svx/source/gallery2/GallerySplitter.hxx b/svx/source/gallery2/GallerySplitter.hxx index 179ffbe..751444e 100644 --- a/svx/source/gallery2/GallerySplitter.hxx +++ b/svx/source/gallery2/GallerySplitter.hxx @@ -20,7 +20,8 @@ #define INCLUDED_SVX_SOURCE_GALLERY2_GALLERYSPLITTER_HXX #include <vcl/split.hxx> -#include <boost/function.hpp> + +#include <functional> class GallerySplitter : public Splitter { @@ -28,13 +29,13 @@ public: GallerySplitter( vcl::Window* pParent, WinBits nStyle, - const ::boost::function<void()>& rDataChangeFunctor); + const ::std::function<void ()>& rDataChangeFunctor); protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; private: - ::boost::function<void()> maDataChangeFunctor; + ::std::function<void ()> maDataChangeFunctor; }; diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index faa108d..53faca3 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -107,8 +107,8 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt ) GalleryBrowser1::GalleryBrowser1( vcl::Window* pParent, Gallery* pGallery, - const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler, - const ::boost::function<void()>& rThemeSlectionHandler) + const ::std::function<sal_Bool (const KeyEvent&,Window*)>& rKeyInputHandler, + const ::std::function<void ()>& rThemeSlectionHandler) : Control ( pParent, WB_TABSTOP ), maNewTheme ( VclPtr<GalleryButton>::Create(this, WB_3DLOOK) ), diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 4c5bc44..2a35853 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -26,7 +26,7 @@ #include <svl/lstner.hxx> #include <vector> -#include <boost/function.hpp> +#include <functional> class GalleryBrowser1; @@ -91,8 +91,8 @@ private: Image aImgReadOnly; Image aImgImported; - ::boost::function<sal_Bool(const KeyEvent&,Window*)> maKeyInputHandler; - ::boost::function<void()> maThemeSlectionHandler; + ::std::function<sal_Bool (const KeyEvent&,Window*)> maKeyInputHandler; + ::std::function<void ()> maThemeSlectionHandler; void ImplAdjustControls(); sal_uIntPtr ImplInsertThemeEntry( const GalleryThemeEntry* pEntry ); @@ -122,8 +122,8 @@ public: GalleryBrowser1( vcl::Window* pParent, Gallery* pGallery, - const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler, - const ::boost::function<void()>& rThemeSlectionHandler); + const ::std::function<sal_Bool (const KeyEvent&,Window*)>& rKeyInputHandler, + const ::std::function<void ()>& rThemeSlectionHandler); virtual ~GalleryBrowser1(); virtual void dispose() SAL_OVERRIDE; diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx index 1570125..b8840b0 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx @@ -25,7 +25,7 @@ namespace svx { namespace sidebar { TextCharacterSpacingPopup::TextCharacterSpacingPopup ( vcl::Window* pParent, - const ::boost::function<VclPtr<PopupControl>(PopupContainer*)>& rControlCreator) + const ::std::function<VclPtr<PopupControl>(PopupContainer*)>& rControlCreator) : Popup( pParent, rControlCreator, diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.hxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.hxx index 7cf5bcd..548a9d9 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.hxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.hxx @@ -21,7 +21,7 @@ #include "svx/sidebar/Popup.hxx" -#include <boost/function.hpp> +#include <functional> namespace svx { namespace sidebar { @@ -31,7 +31,7 @@ class TextCharacterSpacingPopup public: TextCharacterSpacingPopup ( vcl::Window* pParent, - const ::boost::function<VclPtr<PopupControl>(PopupContainer*)>& rControlCreator); + const ::std::function<VclPtr<PopupControl> (PopupContainer*)>& rControlCreator); virtual ~TextCharacterSpacingPopup(); void Rearrange (bool bLBAvailable,bool bAvailable, long nKerning); diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx index 7777244..a7c1754 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.cxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx @@ -23,7 +23,7 @@ namespace svx { namespace sidebar { TextUnderlinePopup::TextUnderlinePopup ( vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator) + const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator) : Popup( pParent, rControlCreator, diff --git a/svx/source/sidebar/text/TextUnderlinePopup.hxx b/svx/source/sidebar/text/TextUnderlinePopup.hxx index 6eea294..b9da641 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.hxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.hxx @@ -21,8 +21,10 @@ #include "svx/sidebar/Popup.hxx" -#include <boost/function.hpp> #include <vcl/vclenum.hxx> + +#include <functional> + namespace svx { namespace sidebar { class TextUnderlinePopup @@ -31,7 +33,7 @@ class TextUnderlinePopup public: TextUnderlinePopup ( vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator); + const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator); virtual ~TextUnderlinePopup(); void Rearrange (FontUnderline eLine); commit 300b4fa81a924a4a30fc231574b469db82ea42e6 Author: Michael Stahl <mst...@redhat.com> Date: Mon Aug 3 12:17:31 2015 +0200 vcl:: replace boost::function with std::function Change-Id: Ibcc536558f26ed15c59263c25bfeb690950dd3d0 diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index ad9f9d2..af22717 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -55,7 +55,6 @@ #include <tools/diagnose_ex.h> #include <boost/bind.hpp> -#include <boost/function.hpp> #include <vcl/group.hxx> diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index aad7dec..91dc116 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -44,9 +44,10 @@ #include <osl/time.h> -#include <boost/function.hpp> #include <boost/bind.hpp> +#include <functional> + #include <stdio.h> using namespace ::com::sun::star; @@ -75,7 +76,7 @@ class TestWindow : public Dialog virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; }; -typedef boost::function1<void, OutputDevice*> functor_type; +typedef std::function<void (OutputDevice*)> functor_type; typedef std::vector< std::pair<const char*, functor_type> > functor_vector_type; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits