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 /editeng/source | |
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 'editeng/source')
-rw-r--r-- | editeng/source/accessibility/AccessibleParaManager.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 12 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/editundo.cxx | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx index 4d77ba95698d..6acfee2abd8c 100644 --- a/editeng/source/accessibility/AccessibleParaManager.cxx +++ b/editeng/source/accessibility/AccessibleParaManager.cxx @@ -266,7 +266,7 @@ namespace accessibility } // not generic yet, no arguments... - class AccessibleParaManager_DisposeChildren : public std::unary_function< ::accessibility::AccessibleEditableTextPara&, void > + class AccessibleParaManager_DisposeChildren { public: AccessibleParaManager_DisposeChildren() {} @@ -285,7 +285,7 @@ namespace accessibility } // not generic yet, too many method arguments... - class StateChangeEvent : public std::unary_function< ::accessibility::AccessibleEditableTextPara&, void > + class StateChangeEvent { public: typedef void return_type; @@ -335,7 +335,7 @@ namespace accessibility } } - class ReleaseChild : public std::unary_function< const AccessibleParaManager::WeakChild&, AccessibleParaManager::WeakChild > + class ReleaseChild { public: AccessibleParaManager::WeakChild operator()( const AccessibleParaManager::WeakChild& rPara ) diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 28c2641d43c4..cdd538a39f23 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -464,7 +464,7 @@ void TextPortionList::Remove(sal_Int32 nPos) namespace { -class FindTextPortionByAddress : public std::unary_function<std::unique_ptr<TextPortion>, bool> +class FindTextPortionByAddress { const TextPortion* mp; public: @@ -1990,7 +1990,7 @@ EditDoc::~EditDoc() namespace { -class RemoveEachItemFromPool : public std::unary_function<std::unique_ptr<ContentNode>, void> +class RemoveEachItemFromPool { EditDoc& mrDoc; public: @@ -2001,7 +2001,7 @@ public: } }; -struct ClearSpellErrorsHandler : std::unary_function<std::unique_ptr<ContentNode>, void> +struct ClearSpellErrorsHandler { void operator() (std::unique_ptr<ContentNode>& rNode) { @@ -2920,7 +2920,7 @@ bool CharAttribList::HasAttrib( sal_Int32 nStartPos, sal_Int32 nEndPos ) const namespace { -class FindByAddress : public std::unary_function<std::unique_ptr<EditCharAttrib>, bool> +class FindByAddress { const EditCharAttrib* mpAttr; public: @@ -2985,7 +2985,7 @@ EditCharAttrib* CharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_Int32 nP namespace { -class FindByStartPos : public std::unary_function<std::unique_ptr<EditCharAttrib>, bool> +class FindByStartPos { sal_Int32 mnPos; public: @@ -3015,7 +3015,7 @@ const EditCharAttrib* CharAttribList::FindFeature( sal_Int32 nPos ) const namespace { -class RemoveEmptyAttrItem : public std::unary_function<std::unique_ptr<EditCharAttrib>, void> +class RemoveEmptyAttrItem { SfxItemPool& mrItemPool; public: diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 6c51e587b5be..f8358514f43a 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -881,7 +881,7 @@ bool EditTextObjectImpl::RemoveCharAttribs( sal_uInt16 _nWhich ) namespace { -class FindByParagraph : public std::unary_function<editeng::Section, bool> +class FindByParagraph { sal_Int32 mnPara; public: @@ -892,7 +892,7 @@ public: } }; -class FindBySectionStart : public std::unary_function<editeng::Section, bool> +class FindBySectionStart { sal_Int32 mnPara; sal_Int32 mnStart; @@ -1090,7 +1090,7 @@ void EditTextObjectImpl::ChangeStyleSheetName( SfxStyleFamily eFamily, namespace { -class FindAttribByChar : public std::unary_function<std::unique_ptr<XEditAttribute>, bool> +class FindAttribByChar { sal_uInt16 mnWhich; sal_Int32 mnChar; diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 271a29cd62f4..a3dfdbe9c445 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -510,7 +510,7 @@ EditUndoSetAttribs::EditUndoSetAttribs(EditEngine* pEE, const ESelection& rESel, namespace { -struct RemoveAttribsFromPool : std::unary_function<std::unique_ptr<ContentAttribsInfo>, void> +struct RemoveAttribsFromPool { SfxItemPool& mrPool; public: |