From db4741043d09437af871fa8ea9849ec37e946f9b Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Sun, 2 Jul 2017 17:10:53 +0200 Subject: C++11 remove std::binary_function bases from functors std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/core/txtnode/modeltoviewhelper.cxx | 3 +-- sw/source/filter/inc/msfilter.hxx | 4 +--- sw/source/filter/ww8/writerhelper.cxx | 4 +--- sw/source/filter/ww8/writerhelper.hxx | 1 - sw/source/filter/ww8/wrtw8nds.cxx | 6 ++---- sw/source/uibase/docvw/edtwin.cxx | 1 - 6 files changed, 5 insertions(+), 14 deletions(-) (limited to 'sw') diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index 5d5cd6db54e5..496d92a54c1a 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -43,8 +43,7 @@ struct FieldResult { } }; -class sortfieldresults : - public std::binary_function +class sortfieldresults { public: bool operator()(const FieldResult &rOne, const FieldResult &rTwo) const diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index 1a1713982625..366094394e11 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -350,9 +350,7 @@ namespace sw SetEndIfOpen& operator=(const SetEndIfOpen&) = delete; }; - class CompareRedlines: - public std::binary_function + class CompareRedlines { public: bool operator()(const SwFltStackEntry *pOneE, const SwFltStackEntry *pTwoE) diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index c6621ddf5ce5..6c0fda0756ac 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -78,8 +77,7 @@ namespace // #i98791# - adjust sorting // Utility to sort SwTextFormatColl's by their assigned outline style list level - class outlinecmp : public - std::binary_function + class outlinecmp { public: bool operator()(const SwTextFormatColl *pA, const SwTextFormatColl *pB) const diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index e97a9e5d025b..380a957ccb70 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -54,7 +54,6 @@ namespace sw namespace util { class ItemSort - : public std::binary_function { public: bool operator()(sal_uInt16 nA, sal_uInt16 nB) const; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index d7bc33290396..248f354a8f82 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -158,8 +157,7 @@ MSWordAttrIter::~MSWordAttrIter() m_rExport.m_pChpIter = pOld; } -class sortswflys : - public std::binary_function +class sortswflys { public: bool operator()(const ww8::Frame &rOne, const ww8::Frame &rTwo) const @@ -1879,7 +1877,7 @@ bool MSWordExportBase::GetAnnotationMarks( const SwTextNode& rNd, sal_Int32 nStt return ( rArr.size() > 0 ); } -class CompareMarksEnd : public std::binary_function < const IMark *, const IMark *, bool > +class CompareMarksEnd { public: bool operator() ( const IMark * pOneB, const IMark * pTwoB ) const diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 922d5ec72166..7a6dc4ab5bce 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -6118,7 +6118,6 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord ) namespace { class CompareIgnoreCaseAsciiFavorExact - : public std::binary_function { const OUString &m_rOrigWord; public: -- cgit