From 7ee228a108d1e5d4ffa9121e0890e23982f8ecb5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 31 Jul 2015 18:28:55 +0200 Subject: [PATCH] svtools: replace boost::function with std::function Change-Id: Ic60190814a19e03341de3678f35c4ac69624ca4c --- include/svtools/filechangedchecker.hxx | 9 ++++++--- svtools/source/misc/filechangedchecker.cxx | 11 ++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/svtools/filechangedchecker.hxx b/include/svtools/filechangedchecker.hxx index a91642dd55db..480dae53c302 100644 --- a/include/svtools/filechangedchecker.hxx +++ b/include/svtools/filechangedchecker.hxx @@ -11,11 +11,13 @@ #define INCLUDED_SVTOOLS_FILECHANGEDCHECKER_HXX #include -#include + #include #include #include +#include + /** Periodically checks if a file has been modified Instances of this class setup a vcl timer to occasionally wake up @@ -27,7 +29,7 @@ private: Idle mIdle; OUString mFileName; TimeValue mLastModTime; - ::boost::function0 mpCallback; + ::std::function mpCallback; bool SVT_DLLPRIVATE getCurrentModTime(TimeValue& o_rValue) const; DECL_LINK_TYPED(TimerHandler, Idle *, void); @@ -35,7 +37,8 @@ private: public: void resetTimer(); bool hasFileChanged(); - FileChangedChecker(const OUString& rFilename, const ::boost::function0& rCallback); + FileChangedChecker(const OUString& rFilename, + const ::std::function& rCallback); }; #endif diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx index ea35296baa9c..2f2434d8b459 100644 --- a/svtools/source/misc/filechangedchecker.cxx +++ b/svtools/source/misc/filechangedchecker.cxx @@ -11,11 +11,12 @@ #include -FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost::function0& rCallback) : - mIdle(), - mFileName(rFilename), - mLastModTime(), - mpCallback(rCallback) +FileChangedChecker::FileChangedChecker(const OUString& rFilename, + const ::std::function& rCallback) + : mIdle() + , mFileName(rFilename) + , mLastModTime() + , mpCallback(rCallback) { // Get the curren last file modified Status getCurrentModTime(mLastModTime);