diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-28 21:48:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-03 12:21:03 +0200 |
commit | c4ddf6cd6d97e7ce7c2e63e4d393bbeffcb34e4d (patch) | |
tree | 128225fc91bd7da687f965337a49b9b64fbe8a79 /sw | |
parent | 5034e8217c9844293dc94e5dff0bdc865ad7a91a (diff) |
C++11 remove std::unary_function bases from functors
std::unary_function is deprecated since C++11 and removed in C++17
90% done with regexp magic.
removed obsolete <functional> includes.
The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
is used in a std::not1 function helper who uses the members
return_type and argument_type.
- replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
lcl_weakReferenceToSame used the argument_type member in the
operator() parameter.
- inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
used result_type and argument_type in operator().
- inline the types
Also fix compile error with gcc about finding std::for_each.
Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/XMLRangeHelper.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerwordglue.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 2 |
6 files changed, 7 insertions, 14 deletions
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx index d837d841fbb9..98914d73e9fa 100644 --- a/sw/source/core/unocore/XMLRangeHelper.cxx +++ b/sw/source/core/unocore/XMLRangeHelper.cxx @@ -23,7 +23,6 @@ #include <osl/diagnose.h> #include <algorithm> -#include <functional> namespace { @@ -31,7 +30,7 @@ namespace array (which you can get from an OUString with getStr()) and puts the result into the OUStringBuffer given in the CTOR */ -class lcl_Escape : public std::unary_function< sal_Unicode, void > +class lcl_Escape { public: explicit lcl_Escape( OUStringBuffer & aResultBuffer ) : m_aResultBuffer( aResultBuffer ) {} @@ -54,7 +53,7 @@ private: you can get from an OUString with getStr()) and puts the result into the OUStringBuffer given in the CTOR */ -class lcl_UnEscape : public std::unary_function< sal_Unicode, void > +class lcl_UnEscape { public: explicit lcl_UnEscape( OUStringBuffer & aResultBuffer ) : m_aResultBuffer( aResultBuffer ) {} diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index c12f5ef6817a..c6621ddf5ce5 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -151,7 +151,7 @@ namespace } //Utility to test if a frame is anchored at a given node index - class anchoredto: public std::unary_function<const ww8::Frame&, bool> + class anchoredto { private: sal_uLong mnNode; @@ -720,8 +720,7 @@ namespace sw maStack.push_back(new SwFltStackEntry(rPos,rAttr.Clone())); } - class SameOpenRedlineType : - public std::unary_function<const SwFltStackEntry*, bool> + class SameOpenRedlineType { private: RedlineType_t meType; diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 199e6f88107c..dcc9aaaabe75 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -24,7 +24,6 @@ #include <IDocumentStylePoolAccess.hxx> #include <algorithm> -#include <functional> #include <rtl/tencinfo.h> @@ -322,7 +321,6 @@ namespace myImplHelpers //Utility to remove entries before a given starting position class IfBeforeStart - : public std::unary_function<const sw::util::CharRunEntry&, bool> { private: sal_Int32 mnStart; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 536c1dc99783..c732c0831786 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -35,7 +35,6 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <algorithm> -#include <functional> #include <hintids.hxx> #include <editeng/fontitem.hxx> #include <editeng/lrspitem.hxx> @@ -442,7 +441,7 @@ SprmResult WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, return maSprmParser.findSprmData(nId, &rSprms, nLen); } -class ListWithId : public std::unary_function<const WW8LSTInfo *, bool> +class ListWithId { private: sal_uInt32 mnIdLst; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index e8b63c9352c8..0341eb26eb80 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -24,7 +24,6 @@ #include <cassert> #include <cstddef> #include <cstring> -#include <functional> #include <algorithm> #include <i18nlangtag/mslangid.hxx> @@ -2795,8 +2794,7 @@ void WW8PLCFx::SetIdx2(sal_uInt32) { } -class SamePos : - public std::unary_function<const WW8PLCFx_Fc_FKP::WW8Fkp *, bool> +class SamePos { private: long mnPo; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 4848aeccc645..1c23d54cb857 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1335,7 +1335,7 @@ void SwPostItMgr::RemoveSidebarWin() PreparePageContainer(); } -class FilterFunctor : public std::unary_function<const SwFormatField*, bool> +class FilterFunctor { public: virtual bool operator()(const SwFormatField* pField) const = 0; |