chart2/source/controller/dialogs/DataBrowserModel.cxx | 6 +- chart2/source/controller/dialogs/DialogModel.cxx | 3 - chart2/source/controller/main/ObjectHierarchy.cxx | 2 chart2/source/inc/CloneHelper.hxx | 3 - chart2/source/inc/CommonFunctors.hxx | 11 ++-- chart2/source/inc/EventListenerHelper.hxx | 5 -- chart2/source/inc/ModifyListenerHelper.hxx | 9 +--- chart2/source/model/main/ChartModel_Persistence.cxx | 3 - chart2/source/model/template/DataInterpreter.cxx | 2 chart2/source/tools/DataSeriesHelper.cxx | 7 +-- chart2/source/tools/ImplOPropertySet.cxx | 10 +--- chart2/source/tools/InternalDataProvider.cxx | 12 ++--- chart2/source/tools/ModifyListenerHelper.cxx | 10 +--- chart2/source/tools/PropertyHelper.cxx | 7 +-- chart2/source/tools/XMLRangeHelper.cxx | 5 -- comphelper/source/misc/asyncnotification.cxx | 3 - comphelper/source/misc/namedvaluecollection.cxx | 5 -- comphelper/source/property/opropertybag.cxx | 4 - comphelper/source/property/opropertybag.hxx | 2 comphelper/source/property/propertycontainerhelper.cxx | 2 connectivity/source/cpool/ZConnectionPool.cxx | 5 -- connectivity/source/manager/mdrivermanager.cxx | 8 +-- connectivity/source/sdbcx/VDescriptor.cxx | 5 -- cppu/source/uno/lbenv.cxx | 3 - cppu/source/uno/lbmap.cxx | 2 dbaccess/source/core/dataaccess/databasedocument.cxx | 2 dbaccess/source/core/dataaccess/datasource.cxx | 4 - dbaccess/source/core/inc/composertools.hxx | 4 - dbaccess/source/core/misc/DatabaseDataProvider.cxx | 4 - dbaccess/source/ui/app/subcomponentmanager.cxx | 5 -- dbaccess/source/ui/browser/genericcontroller.cxx | 2 dbaccess/source/ui/browser/sbagrid.cxx | 2 dbaccess/source/ui/browser/unodatbr.cxx | 2 dbaccess/source/ui/control/tabletree.cxx | 2 dbaccess/source/ui/inc/TableCopyHelper.hxx | 5 -- dbaccess/source/ui/inc/WCopyTable.hxx | 3 - dbaccess/source/ui/querydesign/TableFieldDescription.cxx | 4 - desktop/source/deployment/registry/package/dp_package.cxx | 2 editeng/source/accessibility/AccessibleParaManager.cxx | 6 +- editeng/source/editeng/editdoc.cxx | 12 ++--- editeng/source/editeng/editobj.cxx | 6 +- editeng/source/editeng/editundo.cxx | 2 extensions/source/bibliography/formcontrolcontainer.cxx | 3 - extensions/source/propctrlr/cellbindinghelper.cxx | 3 - extensions/source/propctrlr/composeduiupdate.cxx | 10 ++-- extensions/source/propctrlr/eformshelper.cxx | 3 - extensions/source/propctrlr/formbrowsertools.hxx | 4 - extensions/source/propctrlr/propertycomposer.cxx | 3 - filter/source/config/cache/typedetection.cxx | 2 forms/source/component/ListBox.cxx | 8 +-- forms/source/component/propertybaghelper.cxx | 6 +- forms/source/misc/InterfaceContainer.cxx | 2 fpicker/source/aqua/FilterHelper.mm | 3 - fpicker/source/office/OfficeFilePicker.cxx | 3 - framework/source/uielement/statusbarmanager.cxx | 5 -- include/comphelper/make_shared_from_uno.hxx | 3 - include/connectivity/FValue.hxx | 8 +-- include/editeng/AccessibleParaManager.hxx | 5 -- include/osl/diagnose.hxx | 3 - include/svl/urlfilter.hxx | 3 - oox/source/export/chartexport.cxx | 2 reportdesign/source/ui/report/ViewsWindow.cxx | 2 sal/qa/osl/process/osl_process.cxx | 2 sc/inc/dptabres.hxx | 2 sc/inc/typedstrdata.hxx | 2 sc/qa/unit/subsequent_filters-test.cxx | 2 sc/source/core/data/column.cxx | 4 - sc/source/core/data/column2.cxx | 4 - sc/source/core/data/column3.cxx | 2 sc/source/core/data/documen7.cxx | 2 sc/source/core/data/document.cxx | 4 - sc/source/core/data/document10.cxx | 2 sc/source/core/data/dpcache.cxx | 12 ++--- sc/source/core/data/dpdimsave.cxx | 2 sc/source/core/data/dpgroup.cxx | 2 sc/source/core/data/dpobject.cxx | 21 ++++----- sc/source/core/data/dpsave.cxx | 2 sc/source/core/data/dptabsrc.cxx | 2 sc/source/core/data/table1.cxx | 2 sc/source/core/data/table3.cxx | 10 ++-- sc/source/core/tool/chartlis.cxx | 5 -- sc/source/core/tool/compiler.cxx | 2 sc/source/core/tool/dbdata.cxx | 19 ++++---- sc/source/core/tool/grouparealistener.cxx | 2 sc/source/core/tool/interpr4.cxx | 3 - sc/source/core/tool/interpr5.cxx | 2 sc/source/core/tool/queryparam.cxx | 4 - sc/source/core/tool/rangelst.cxx | 12 ++--- sc/source/core/tool/rangenam.cxx | 3 - sc/source/core/tool/scmatrix.cxx | 31 ++++++-------- sc/source/core/tool/userlist.cxx | 2 sc/source/filter/excel/xestring.cxx | 2 sc/source/filter/orcus/interface.cxx | 2 sc/source/filter/orcus/xmlcontext.cxx | 4 - sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 4 - sc/source/filter/xml/pivotsource.cxx | 8 +-- sc/source/filter/xml/xmlimprt.cxx | 2 sc/source/ui/Accessibility/AccessibleFilterMenu.cxx | 2 sc/source/ui/dbgui/dbnamdlg.cxx | 2 sc/source/ui/docshell/autostyl.cxx | 6 +- sc/source/ui/docshell/externalrefmgr.cxx | 16 +++---- sc/source/ui/undo/undoblk.cxx | 2 sc/source/ui/unoobj/chart2uno.cxx | 15 +++--- sc/source/ui/view/drawvie4.cxx | 4 - sc/source/ui/view/gridwin.cxx | 4 - sc/source/ui/xmlsource/xmlsourcedlg.cxx | 2 sc/workben/dpcache/perf-test.cpp | 4 - sd/source/core/CustomAnimationEffect.cxx | 2 sd/source/ui/animations/CustomAnimationList.cxx | 2 sd/source/ui/animations/SlideTransitionPane.cxx | 4 - sd/source/ui/view/ViewShellManager.cxx | 4 - sfx2/source/dialog/filtergrouping.cxx | 24 +++++----- sfx2/source/doc/sfxmodelfactory.cxx | 3 - shell/source/win32/zipfile/zipfile.cxx | 3 - slideshow/source/engine/animationfactory.cxx | 4 - slideshow/source/inc/eventqueue.hxx | 3 - slideshow/source/inc/tools.hxx | 3 - svl/source/undo/undo.cxx | 2 svtools/source/brwbox/brwimpl.hxx | 3 - svtools/source/contnr/treelist.cxx | 2 svtools/source/contnr/treelistentry.cxx | 4 - svtools/source/control/ctrlbox.cxx | 2 svtools/source/misc/dialogcontrolling.cxx | 3 - svtools/source/misc/templatefoldercache.cxx | 14 +----- svx/source/accessibility/AccessibleTextHelper.cxx | 11 ++-- svx/source/form/formcontroller.cxx | 6 +- svx/source/form/formcontrolling.cxx | 9 +--- sw/source/core/unocore/XMLRangeHelper.cxx | 5 -- sw/source/filter/ww8/writerhelper.cxx | 5 -- sw/source/filter/ww8/writerwordglue.cxx | 2 sw/source/filter/ww8/ww8par3.cxx | 3 - sw/source/filter/ww8/ww8scan.cxx | 4 - sw/source/uibase/docvw/PostItMgr.cxx | 2 toolkit/source/controls/controlmodelcontainerbase.cxx | 9 +--- toolkit/source/controls/geometrycontrolmodel.cxx | 4 - toolkit/source/controls/unocontrols.cxx | 5 -- ucb/source/ucp/ext/ucpext_content.cxx | 2 unotools/source/config/configvaluecontainer.cxx | 2 unoxml/source/rdf/librdf_repository.cxx | 3 - vcl/source/app/IconThemeInfo.cxx | 3 - vcl/source/app/IconThemeScanner.cxx | 3 - vcl/source/app/IconThemeSelector.cxx | 3 - vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2 vcl/unx/gtk3/gtk3gtkinst.cxx | 2 xmloff/source/chart/SchXMLExport.cxx | 12 ++--- xmloff/source/chart/SchXMLImport.cxx | 2 xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 xmloff/source/chart/SchXMLTableContext.cxx | 2 xmloff/source/forms/elementimport.cxx | 5 -- xmloff/source/forms/formcellbinding.cxx | 3 - xmloff/source/forms/property_meta_data.cxx | 2 xmloff/source/text/txtparae.cxx | 1 152 files changed, 322 insertions(+), 399 deletions(-)
New commits: commit c4ddf6cd6d97e7ce7c2e63e4d393bbeffcb34e4d Author: Jochen Nitschke <[email protected]> Date: Wed Jun 28 21:48:22 2017 +0200 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 <[email protected]> Tested-by: Stephan Bergmann <[email protected]> diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index f1d4c9dccf2d..9dc2478f76f9 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -171,7 +171,7 @@ sal_Int32 lcl_getValuesRepresentationIndex( return nResult; } -struct lcl_RepresentationsOfLSeqMatch : public std::unary_function< Reference< chart2::data::XLabeledDataSequence >, bool > +struct lcl_RepresentationsOfLSeqMatch { explicit lcl_RepresentationsOfLSeqMatch( const Reference< chart2::data::XLabeledDataSequence > & xLSeq ) : m_aValuesRep( xLSeq.is() ? @@ -189,7 +189,7 @@ private: OUString m_aValuesRep; }; -struct lcl_RolesOfLSeqMatch : public std::unary_function< Reference< chart2::data::XLabeledDataSequence >, bool > +struct lcl_RolesOfLSeqMatch { explicit lcl_RolesOfLSeqMatch( const Reference< chart2::data::XLabeledDataSequence > & xLSeq ) : m_aRole(DataSeriesHelper::getRole(xLSeq)) {} @@ -262,7 +262,7 @@ DataBrowserModel::~DataBrowserModel() namespace { -struct lcl_DataSeriesOfHeaderMatches : public std::unary_function< ::chart::DataBrowserModel::tDataHeader, bool > +struct lcl_DataSeriesOfHeaderMatches { explicit lcl_DataSeriesOfHeaderMatches( const Reference< chart2::XDataSeries > & xSeriesToCompareWith ) : diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 8bfc3113ecc8..438fab7d7e61 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -59,8 +59,7 @@ namespace { const OUString lcl_aLabelRole( "label" ); -struct lcl_ChartTypeToSeriesCnt : std::unary_function< - Reference< XChartType >, Reference< XDataSeriesContainer > > +struct lcl_ChartTypeToSeriesCnt { Reference< XDataSeriesContainer > operator() ( const Reference< XChartType > & xChartType ) diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 7889d679b107..ba54572d5c33 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -54,7 +54,7 @@ using ::com::sun::star::uno::Sequence; namespace { -struct lcl_ObjectToOID : public std::unary_function< Reference< uno::XInterface >, ::chart::ObjectIdentifier > +struct lcl_ObjectToOID { explicit lcl_ObjectToOID( const Reference< chart2::XChartDocument > & xChartDoc ) : m_xModel( xChartDoc, uno::UNO_QUERY ) diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx index ee625666ab9d..ae739bbc6ab6 100644 --- a/chart2/source/inc/CloneHelper.hxx +++ b/chart2/source/inc/CloneHelper.hxx @@ -22,7 +22,6 @@ #include <com/sun/star/util/XCloneable.hpp> #include <map> -#include <functional> #include <algorithm> #include <iterator> @@ -33,7 +32,7 @@ namespace CloneHelper /// functor that clones a UNO-Reference template< class Interface > - struct CreateRefClone : public std::unary_function< Interface, Interface > + struct CreateRefClone { css::uno::Reference<Interface> operator() ( const css::uno::Reference<Interface> & xOther ) { diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx index 4e0eeb680631..8b11df32f3ea 100644 --- a/chart2/source/inc/CommonFunctors.hxx +++ b/chart2/source/inc/CommonFunctors.hxx @@ -20,7 +20,6 @@ #define INCLUDED_CHART2_SOURCE_INC_COMMONFUNCTORS_HXX #include <algorithm> -#include <functional> #include <o3tl/any.hxx> #include <rtl/math.hxx> #include <com/sun/star/uno/Any.hxx> @@ -38,7 +37,7 @@ namespace CommonFunctors (via mem_fun_ptr)</p> */ template< typename T > - struct makeAny : public std::unary_function< T, css::uno::Any > + struct makeAny { css::uno::Any operator() ( const T & aVal ) { @@ -51,7 +50,7 @@ template< typename T > <p>In case no number can be generated from the Any, NaN (see rtl::math::SetNAN()) is returned.</p> */ -struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble : public std::unary_function< css::uno::Any, double > +struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble { double operator() ( const css::uno::Any & rAny ) { @@ -65,7 +64,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble : public std::unary_function< css::u /** unary function to convert css::uno::Any into an OUString. */ -struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public std::unary_function< css::uno::Any, OUString > +struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString { OUString operator() ( const css::uno::Any & rAny ) { @@ -94,7 +93,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public std::unary_function< css::u <p>For conversion rtl::math::StringToDouble is used.</p> */ -struct OOO_DLLPUBLIC_CHARTTOOLS OUStringToDouble : public std::unary_function< OUString, double > +struct OOO_DLLPUBLIC_CHARTTOOLS OUStringToDouble { double operator() ( const OUString & rStr ) { @@ -112,7 +111,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS OUStringToDouble : public std::unary_function< O <p>For conversion rtl::math::DoubleToOUString is used.</p> */ -struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString : public std::unary_function< double, OUString > +struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString { OUString operator() ( double fNumber ) { diff --git a/chart2/source/inc/EventListenerHelper.hxx b/chart2/source/inc/EventListenerHelper.hxx index 7e951a3df3ab..8b9c1ec6c47f 100644 --- a/chart2/source/inc/EventListenerHelper.hxx +++ b/chart2/source/inc/EventListenerHelper.hxx @@ -24,7 +24,6 @@ #include <list> #include <algorithm> -#include <functional> #include <utility> namespace chart @@ -36,7 +35,7 @@ namespace impl { template< class InterfaceRef > -struct addListenerFunctor : public std::unary_function< InterfaceRef, void > +struct addListenerFunctor { explicit addListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) : m_xListener( xListener ) @@ -54,7 +53,7 @@ private: }; template< class InterfaceRef > -struct removeListenerFunctor : public std::unary_function< InterfaceRef, void > +struct removeListenerFunctor { explicit removeListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) : m_xListener( xListener ) diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx index 4fe9e178ff9e..48f2e0b149b0 100644 --- a/chart2/source/inc/ModifyListenerHelper.hxx +++ b/chart2/source/inc/ModifyListenerHelper.hxx @@ -32,7 +32,6 @@ #include <list> #include <algorithm> -#include <functional> #include <utility> namespace chart @@ -103,7 +102,7 @@ namespace impl { template< class InterfaceRef > -struct addListenerFunctor : public std::unary_function< InterfaceRef, void > +struct addListenerFunctor { explicit addListenerFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) : m_xListener( xListener ) @@ -121,7 +120,7 @@ private: }; template< class InterfaceRef > -struct removeListenerFunctor : public std::unary_function< InterfaceRef, void > +struct removeListenerFunctor { explicit removeListenerFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) : m_xListener( xListener ) @@ -139,7 +138,7 @@ private: }; template< class Pair > -struct addListenerToMappedElementFunctor : public std::unary_function< Pair, void > +struct addListenerToMappedElementFunctor { explicit addListenerToMappedElementFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) : m_xListener( xListener ) @@ -157,7 +156,7 @@ private: }; template< class Pair > -struct removeListenerFromMappedElementFunctor : public std::unary_function< Pair, void > +struct removeListenerFromMappedElementFunctor { explicit removeListenerFromMappedElementFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) : m_xListener( xListener ) diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 834e05c9861c..77aba167c4c6 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -59,7 +59,6 @@ #include <vcl/settings.hxx> #include <algorithm> -#include <functional> using namespace ::com::sun::star; @@ -69,7 +68,7 @@ using ::osl::MutexGuard; namespace { -struct lcl_PropNameEquals : public std::unary_function< beans::PropertyValue, bool > +struct lcl_PropNameEquals { explicit lcl_PropNameEquals( const OUString & rStrToCompareWith ) : m_aStr( rStrToCompareWith ) diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx index 57f03562e85d..0ca15b013069 100644 --- a/chart2/source/model/template/DataInterpreter.cxx +++ b/chart2/source/model/template/DataInterpreter.cxx @@ -212,7 +212,7 @@ sal_Bool SAL_CALL DataInterpreter::isDataCompatible( namespace { -struct lcl_LabeledSequenceEquals : public std::unary_function< Reference< data::XLabeledDataSequence >, bool > +struct lcl_LabeledSequenceEquals { explicit lcl_LabeledSequenceEquals( const Reference< data::XLabeledDataSequence > & xLSeqToCmp ) : m_bHasLabels ( false ), diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 849612de0e54..a8a84deb5a67 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -39,7 +39,6 @@ #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <rtl/ustrbuf.hxx> -#include <functional> #include <algorithm> #include <iterator> #include <vector> @@ -54,7 +53,7 @@ using ::com::sun::star::uno::Sequence; namespace { -class lcl_MatchesRole : public std::unary_function< Reference< chart2::data::XLabeledDataSequence >, bool > +class lcl_MatchesRole { public: explicit lcl_MatchesRole( const OUString & aRole, bool bMatchPrefix ) : @@ -233,7 +232,9 @@ std::vector< Reference< chart2::data::XLabeledDataSequence > > std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVec; std::remove_copy_if( aDataSequences.getConstArray(), aDataSequences.getConstArray() + aDataSequences.getLength(), std::back_inserter( aResultVec ), - std::not1( lcl_MatchesRole( aRole, bMatchPrefix ))); + [&aRole, bMatchPrefix](const Reference< chart2::data::XLabeledDataSequence > & xSeq) + {return !(lcl_MatchesRole(aRole, bMatchPrefix).operator()(xSeq));}); + //TODO replace lambda with std::not_fn(lcl_MatchesRole(aRole, bMatchPrefix) in C++17 return aResultVec; } diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx index bfe6fdb296a0..8dee149c3f21 100644 --- a/chart2/source/tools/ImplOPropertySet.cxx +++ b/chart2/source/tools/ImplOPropertySet.cxx @@ -22,7 +22,6 @@ #include <algorithm> #include <iterator> -#include <functional> #include <com/sun/star/beans/XFastPropertySet.hpp> using namespace ::com::sun::star; @@ -34,8 +33,7 @@ using ::com::sun::star::uno::Any; namespace { -struct lcl_getPropertyStateByHandle : - public std::unary_function< sal_Int32, beans::PropertyState > +struct lcl_getPropertyStateByHandle { explicit lcl_getPropertyStateByHandle( const ::property::impl::ImplOPropertySet::tPropertyMap & rMap ) @@ -54,8 +52,7 @@ private: }; template< typename K, typename V > -struct lcl_eraseMapEntry : - public std::unary_function< K, void > +struct lcl_eraseMapEntry { explicit lcl_eraseMapEntry( std::map< K, V > & rMap ) : m_rMap( rMap ) @@ -70,8 +67,7 @@ private: std::map< K, V > m_rMap; }; -struct lcl_replaceInterfacePropertiesByClones : - public std::unary_function< ::property::impl::ImplOPropertySet::tPropertyMap::value_type, void > +struct lcl_replaceInterfacePropertiesByClones { void operator() ( ::property::impl::ImplOPropertySet::tPropertyMap::value_type & rProp ) { diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index dad11d5d573f..384420c0681a 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -89,7 +89,7 @@ std::vector< uno::Any > lcl_StringToAnyVector( const css::uno::Sequence< OUStrin return aResult; } -struct lcl_setModified : public std::unary_function< lcl_tSequenceMap, void > +struct lcl_setModified { void operator() ( const lcl_tSequenceMap::value_type & rMapEntry ) { @@ -104,7 +104,7 @@ struct lcl_setModified : public std::unary_function< lcl_tSequenceMap, void > } }; -struct lcl_internalizeSeries : public std::unary_function< Reference< chart2::XDataSeries >, void > +struct lcl_internalizeSeries { lcl_internalizeSeries( InternalData & rInternalData, InternalDataProvider & rProvider, @@ -181,7 +181,7 @@ private: bool m_bDataInColumns; }; -struct lcl_copyFromLevel : public std::unary_function< vector< uno::Any >, uno::Any > +struct lcl_copyFromLevel { public: @@ -200,7 +200,7 @@ private: sal_Int32 m_nLevel; }; -struct lcl_getStringFromLevelVector : public std::unary_function< vector< uno::Any >, OUString > +struct lcl_getStringFromLevelVector { public: @@ -259,7 +259,7 @@ private: sal_Int32 m_nLevel; }; -struct lcl_insertAnyAtLevel : public std::unary_function< vector< uno::Any >, void > +struct lcl_insertAnyAtLevel { public: @@ -282,7 +282,7 @@ private: sal_Int32 m_nLevel; }; -struct lcl_removeAnyAtLevel : public std::unary_function< vector< uno::Any >, void > +struct lcl_removeAnyAtLevel { public: diff --git a/chart2/source/tools/ModifyListenerHelper.cxx b/chart2/source/tools/ModifyListenerHelper.cxx index 87a8f356073a..c6fd1d604773 100644 --- a/chart2/source/tools/ModifyListenerHelper.cxx +++ b/chart2/source/tools/ModifyListenerHelper.cxx @@ -57,17 +57,15 @@ void lcl_fireModifyEvent( } } -struct lcl_weakReferenceToSame : public std::unary_function< - std::pair< - css::uno::WeakReference< css::util::XModifyListener >, - css::uno::Reference< css::util::XModifyListener > >, - bool > +struct lcl_weakReferenceToSame { explicit lcl_weakReferenceToSame( const Reference< util::XModifyListener > & xModListener ) : m_xHardRef( xModListener ) {} - bool operator() ( const argument_type & xElem ) + // argument type is same as tListenerMap::value_type& + bool operator() ( const std::pair<css::uno::WeakReference< css::util::XModifyListener>, + css::uno::Reference< css::util::XModifyListener> > & xElem ) { Reference< util::XModifyListener > xWeakAsHard( xElem.first ); if( xWeakAsHard.is()) diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx index 8741037b6014..3b0f71839830 100644 --- a/chart2/source/tools/PropertyHelper.cxx +++ b/chart2/source/tools/PropertyHelper.cxx @@ -27,7 +27,6 @@ #include <vector> #include <algorithm> #include <iterator> -#include <functional> using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -36,7 +35,7 @@ using ::com::sun::star::uno::Reference; namespace { -struct lcl_EqualsElement : public std::unary_function< OUString, bool > +struct lcl_EqualsElement { explicit lcl_EqualsElement( const Any & rValue, const Reference< container::XNameAccess > & xAccess ) : m_aValue( rValue ), m_xAccess( xAccess ) @@ -62,7 +61,7 @@ private: Reference< container::XNameAccess > m_xAccess; }; -struct lcl_StringMatches : public std::unary_function< OUString ,bool > +struct lcl_StringMatches { explicit lcl_StringMatches( const OUString & rCmpStr ) : m_aCmpStr( rCmpStr ) @@ -77,7 +76,7 @@ private: OUString m_aCmpStr; }; -struct lcl_OUStringRestToInt32 : public std::unary_function< OUString, sal_Int32 > +struct lcl_OUStringRestToInt32 { explicit lcl_OUStringRestToInt32( sal_Int32 nPrefixLength ) : m_nPrefixLength( nPrefixLength ) diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx index 1a484dbb6db5..e89b1a074f5b 100644 --- a/chart2/source/tools/XMLRangeHelper.cxx +++ b/chart2/source/tools/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/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index bb53b096a5d7..88489ec65e3a 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -27,7 +27,6 @@ #include <deque> #include <stdexcept> #include <vector> -#include <functional> #include <algorithm> namespace comphelper @@ -60,7 +59,7 @@ namespace comphelper typedef std::deque< ProcessableEvent > EventQueue; - struct EqualProcessor : public std::unary_function< ProcessableEvent, bool > + struct EqualProcessor { const ::rtl::Reference< IEventProcessor >& rProcessor; explicit EqualProcessor( const ::rtl::Reference< IEventProcessor >& _rProcessor ) :rProcessor( _rProcessor ) { } diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index 84e705f8b287..a6f732937b4e 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -28,7 +28,6 @@ #include <sal/log.hxx> #include <algorithm> -#include <functional> #include <unordered_map> namespace comphelper @@ -311,7 +310,7 @@ namespace comphelper namespace { - struct Value2PropertyValue : public std::unary_function< NamedValueRepository::value_type, PropertyValue > + struct Value2PropertyValue { PropertyValue operator()( const NamedValueRepository::value_type& _rValue ) { @@ -320,7 +319,7 @@ namespace comphelper } }; - struct Value2NamedValue : public std::unary_function< NamedValueRepository::value_type, NamedValue > + struct Value2NamedValue { NamedValue operator()( const NamedValueRepository::value_type& _rValue ) { diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index e36507a599ed..740de1ca2df4 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -359,7 +359,7 @@ namespace comphelper }; template< typename CLASS > - struct TransformPropertyToName : public std::unary_function< CLASS, OUString > + struct TransformPropertyToName { const OUString& operator()( const CLASS& _rProp ) { @@ -367,7 +367,7 @@ namespace comphelper } }; - struct ExtractPropertyValue : public std::unary_function< PropertyValue, Any > + struct ExtractPropertyValue { const Any& operator()( const PropertyValue& _rProp ) { diff --git a/comphelper/source/property/opropertybag.hxx b/comphelper/source/property/opropertybag.hxx index 650f981852ed..95736d7923db 100644 --- a/comphelper/source/property/opropertybag.hxx +++ b/comphelper/source/property/opropertybag.hxx @@ -44,7 +44,7 @@ namespace comphelper { - struct UnoTypeLess : public std::unary_function< css::uno::Type, bool > + struct UnoTypeLess { bool operator()( const css::uno::Type& _rLHS, const css::uno::Type& _rRHS ) const { diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index dcde4190d495..7a57de445f98 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -49,7 +49,7 @@ namespace } }; // comparing two property descriptions (by name) - struct PropertyDescriptionNameMatch : public std::unary_function< PropertyDescription, bool > + struct PropertyDescriptionNameMatch { OUString m_rCompare; explicit PropertyDescriptionNameMatch( const OUString& _rCompare ) : m_rCompare( _rCompare ) { } diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index 0e6be4f36039..ce485b45cd75 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -77,8 +77,7 @@ OConnectionPool::~OConnectionPool() clear(false); } -struct TRemoveEventListenerFunctor : std::unary_function<TPooledConnections::value_type,void> - ,std::unary_function<TActiveConnectionMap::value_type,void> +struct TRemoveEventListenerFunctor { OConnectionPool* m_pConnectionPool; bool m_bDispose; @@ -113,7 +112,7 @@ struct TRemoveEventListenerFunctor : std::unary_function<TPooledConnections::val } }; -struct TConnectionPoolFunctor : std::unary_function<TConnectionMap::value_type,void> +struct TConnectionPoolFunctor { OConnectionPool* m_pConnectionPool; diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index bbc6314d5e32..3905932fed85 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -103,7 +103,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) /// an STL functor which ensures that a SdbcDriver described by a DriverAccess is loaded - struct EnsureDriver : public std::unary_function< DriverAccess, DriverAccess > + struct EnsureDriver { explicit EnsureDriver( const Reference< XComponentContext > &rxContext ) : mxContext( rxContext ) {} @@ -138,7 +138,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) }; /// an STL functor which extracts a SdbcDriver from a DriverAccess - struct ExtractDriverFromAccess : public std::unary_function< DriverAccess, const Reference<XDriver>& > + struct ExtractDriverFromAccess { const Reference<XDriver>& operator()( const DriverAccess& _rAccess ) const { @@ -146,7 +146,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) } }; - struct ExtractDriverFromCollectionElement : public std::unary_function< DriverCollection::value_type, const Reference<XDriver>& > + struct ExtractDriverFromCollectionElement { const Reference<XDriver>& operator()( const DriverCollection::value_type& _rElement ) const { @@ -155,7 +155,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) }; // predicate for checking whether or not a driver accepts a given URL - class AcceptsURL : public std::unary_function< Reference<XDriver>, bool > + class AcceptsURL { protected: const OUString& m_rURL; diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index fa0bb3fe2459..5c9c899f7991 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -20,7 +20,6 @@ #include <connectivity/sdbcx/VDescriptor.hxx> #include <cppuhelper/queryinterface.hxx> -#include <functional> #include <algorithm> #include <string.h> @@ -64,14 +63,14 @@ namespace connectivity namespace { - struct ResetROAttribute : public std::unary_function< Property, void > + struct ResetROAttribute { void operator ()( Property& _rProperty ) const { _rProperty.Attributes &= ~PropertyAttribute::READONLY; } }; - struct SetROAttribute : public std::unary_function< Property, void > + struct SetROAttribute { void operator ()( Property& _rProperty ) const { diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index db32cec51d08..0439a242e5a4 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -93,8 +93,7 @@ struct ObjectEntry }; -struct FctPtrHash : - public std::unary_function< const void *, std::size_t > +struct FctPtrHash { std::size_t operator () ( const void * pKey ) const { return reinterpret_cast< std::size_t>( pKey ); } diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index e8dcc574e58a..c1b52f4f27a3 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -130,7 +130,7 @@ struct MappingEntry {} }; -struct FctPtrHash : public std::unary_function< uno_Mapping *, size_t > +struct FctPtrHash { size_t operator()( uno_Mapping * pKey ) const { return reinterpret_cast<size_t>(pKey); } diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index ee3109b5e2b4..dc917cf7a72f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -2033,7 +2033,7 @@ Reference< XInterface > ODatabaseDocument::getThis() const return *const_cast< ODatabaseDocument* >( this ); } -struct CreateAny : public std::unary_function< Reference<XController>, Any> +struct CreateAny { Any operator() (const Reference<XController>& lhs) const { diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index c56f67b90f18..81df15a36620 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -442,7 +442,7 @@ namespace typedef std::map< OUString, sal_Int32 > PropertyAttributeCache; - struct IsDefaultAndNotRemoveable : public std::unary_function< PropertyValue, bool > + struct IsDefaultAndNotRemoveable { private: const PropertyAttributeCache& m_rAttribs; @@ -796,7 +796,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & namespace { - struct SelectPropertyName : public std::unary_function< PropertyValue, OUString > + struct SelectPropertyName { public: const OUString& operator()( const PropertyValue& _lhs ) diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx index 986f23948a66..91f790495948 100644 --- a/dbaccess/source/core/inc/composertools.hxx +++ b/dbaccess/source/core/inc/composertools.hxx @@ -23,13 +23,11 @@ #include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> -#include <functional> - namespace dbaccess { // TokenComposer - struct TokenComposer : public std::unary_function< OUString, void > + struct TokenComposer { private: #ifdef DBG_UTIL diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index eaa8afec3cd8..ef6345f0b024 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -634,7 +634,7 @@ namespace } }; - struct CreateColumnDescription : public std::unary_function< OUString, ColumnDescription > + struct CreateColumnDescription { ColumnDescription operator()( const OUString& i_rName ) { @@ -642,7 +642,7 @@ namespace } }; - struct SelectColumnName : public std::unary_function< ColumnDescription, OUString > + struct SelectColumnName { const OUString& operator()( const ColumnDescription& i_rColumn ) { diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 851c67cf79a1..bb66c221b918 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -37,7 +37,6 @@ #include <osl/mutex.hxx> #include <algorithm> -#include <functional> namespace dbaui { @@ -157,7 +156,7 @@ namespace dbaui } }; - struct SelectSubComponent : public std::unary_function< SubComponentDescriptor, Reference< XComponent > > + struct SelectSubComponent { Reference< XComponent > operator()( const SubComponentDescriptor &_desc ) const { @@ -170,7 +169,7 @@ namespace dbaui typedef std::vector< SubComponentDescriptor > SubComponents; - struct SubComponentMatch : public std::unary_function< SubComponentDescriptor, bool > + struct SubComponentMatch { public: SubComponentMatch( const OUString& i_rName, const sal_Int32 i_nComponentType, diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 4dc69a4830df..5e5d83a5e8fd 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -1260,7 +1260,7 @@ Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroup namespace { //Current c++0x draft (apparently) has std::identity, but not operator() - template<typename T> struct SGI_identity : public std::unary_function<T,T> + template<typename T> struct SGI_identity { T& operator()(T& x) const { return x; } const T& operator()(const T& x) const { return x; } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index ad7439446c1f..f40df7404bdd 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1215,7 +1215,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) } /// unary_function Functor object for class ZZ returntype is void - struct SbaGridControlPrec : std::unary_function<DataFlavorExVector::value_type,bool> + struct SbaGridControlPrec { bool operator()(const DataFlavorExVector::value_type& _aType) { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 241fa9aa19ad..782bfdbea876 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -386,7 +386,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent) namespace { - struct SelectValueByName : public std::unary_function< OUString, Any > + struct SelectValueByName { const Any& operator()( OUString const& i_name ) const { diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index cdaddb7069b5..b29cba9d1328 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -178,7 +178,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn namespace { - struct OViewSetter : public std::unary_function< OTableTreeListBox::TNames::value_type, bool> + struct OViewSetter { const Sequence< OUString> m_aViews; ::comphelper::UStringMixEqual m_aEqualFunctor; diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx index 187f2fcb46c7..376dd600e785 100644 --- a/dbaccess/source/ui/inc/TableCopyHelper.hxx +++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx @@ -26,14 +26,13 @@ #include <svtools/transfer.hxx> #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> -#include <functional> class SvTreeListEntry; namespace dbaui { class OGenericUnoController; - /// unary_function Functor object for class DataFlavorExVector::value_type returntype is bool - struct TAppSupportedSotFunctor : std::unary_function<DataFlavorExVector::value_type,bool> + /// Functor object for class DataFlavorExVector::value_type returntype is bool + struct TAppSupportedSotFunctor { ElementType eEntryType; TAppSupportedSotFunctor(const ElementType& _eEntryType) diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index f8042af896e9..68981577cc6c 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -45,8 +45,7 @@ namespace dbaui { - typedef std::unary_function< OUString,bool> TColumnFindFunctorType; - class TColumnFindFunctor : public TColumnFindFunctorType + class TColumnFindFunctor { public: virtual bool operator()(const OUString& _sColumnName) const = 0; diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx index bd08fe05087f..bcde5918a1f7 100644 --- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx @@ -24,8 +24,6 @@ #include <comphelper/namedvaluecollection.hxx> #include <vcl/window.hxx> -#include <functional> - using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -119,7 +117,7 @@ OUString OTableFieldDesc::GetCriteria( sal_uInt16 nIdx ) const namespace { - struct SelectPropertyValueAsString : public std::unary_function< PropertyValue, OUString > + struct SelectPropertyValueAsString { OUString operator()( const PropertyValue& i_rPropValue ) const { diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index cc060c4f0b31..950a478b6ec1 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -249,7 +249,7 @@ public: }; //Used to find a XPackage with a particular URL -class XPackage_eq : public std::unary_function<Reference<deployment::XPackage>, bool> +class XPackage_eq { OUString m_URL; public: 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: diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx index 8019a772bdb0..ecae8048537c 100644 --- a/extensions/source/bibliography/formcontrolcontainer.cxx +++ b/extensions/source/bibliography/formcontrolcontainer.cxx @@ -21,7 +21,6 @@ #include <osl/diagnose.h> #include <algorithm> -#include <functional> namespace bib { @@ -71,7 +70,7 @@ namespace bib m_xForm = _rxForm; } - struct ControlModeSwitch : public std::unary_function< Reference< XControl >, void > + struct ControlModeSwitch { bool bDesign; explicit ControlModeSwitch( bool _bDesign ) : bDesign( _bDesign ) { } diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx index 47b146b0bc9c..42304b077df6 100644 --- a/extensions/source/propctrlr/cellbindinghelper.cxx +++ b/extensions/source/propctrlr/cellbindinghelper.cxx @@ -37,7 +37,6 @@ #include <tools/diagnose_ex.h> #include "formstrings.hxx" -#include <functional> #include <algorithm> @@ -60,7 +59,7 @@ namespace pcr namespace { - struct StringCompare : public std::unary_function< OUString, bool > + struct StringCompare { private: OUString m_sReference; diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx index c438f3207400..e39932925d81 100644 --- a/extensions/source/propctrlr/composeduiupdate.cxx +++ b/extensions/source/propctrlr/composeduiupdate.cxx @@ -393,7 +393,7 @@ namespace pcr { // an STL-compatible structure which collects strings from a CachedInspectorUI instances - struct StringBagCollector : public std::unary_function< ImplMapHandlerToUI::value_type, void > + struct StringBagCollector { private: StringBag& m_rBag; @@ -416,7 +416,7 @@ namespace pcr // an STL-compatible structure which cleans a certain string bag in a CachedInspectorUI instances - struct StringBagClearer : public std::unary_function< ImplMapHandlerToUI::value_type, void > + struct StringBagClearer { private: CachedInspectorUI::FGetStringBag m_pGetter; @@ -441,7 +441,7 @@ namespace pcr // an STL-compatible struct which calls a certain member method (taking a string) at a // given ->XObjectInspectorUI instance - struct PropertyUIOperator : public std::unary_function< OUString, void > + struct PropertyUIOperator { private: Reference< XObjectInspectorUI > m_xUpdater; @@ -541,7 +541,7 @@ namespace pcr // an STL-compatible structure which applies a ->IStringKeyBooleanUIUpdate::updateUIForKey // operation with a fixed boolean value, for a given string value - struct BooleanUIAspectUpdate : public std::unary_function< OUString, void > + struct BooleanUIAspectUpdate { private: const IStringKeyBooleanUIUpdate& m_rUpdater; @@ -569,7 +569,7 @@ namespace pcr // BooleanUIAspectUpdate // an STL-compatible structure subtracting a given string from a fixed ->StringBag - struct StringBagComplement : public std::unary_function< OUString, void > + struct StringBagComplement { private: StringBag& m_rMinuend; diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index c468edd23fa2..19b64557c5f4 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -33,7 +33,6 @@ #include <tools/diagnose_ex.h> #include <rtl/ustrbuf.hxx> -#include <functional> #include <algorithm> #include <o3tl/functional.hxx> @@ -571,7 +570,7 @@ namespace pcr namespace { - struct PropertyBagInserter : public std::unary_function< Property, void > + struct PropertyBagInserter { private: PropertyBag& m_rProperties; diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx index eba6ee1155fb..6abc42d7a477 100644 --- a/extensions/source/propctrlr/formbrowsertools.hxx +++ b/extensions/source/propctrlr/formbrowsertools.hxx @@ -36,7 +36,7 @@ namespace pcr sal_Int16 classifyComponent( const css::uno::Reference< css::uno::XInterface >& _rxComponent ); - struct FindPropertyByHandle : public std::unary_function< css::beans::Property, bool > + struct FindPropertyByHandle { private: sal_Int32 m_nId; @@ -50,7 +50,7 @@ namespace pcr }; - struct FindPropertyByName : public std::unary_function< css::beans::Property, bool > + struct FindPropertyByName { private: OUString m_sName; diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx index 4c51d017dafe..04c9bd82995c 100644 --- a/extensions/source/propctrlr/propertycomposer.cxx +++ b/extensions/source/propctrlr/propertycomposer.cxx @@ -25,7 +25,6 @@ #include <osl/diagnose.h> #include <tools/diagnose_ex.h> -#include <functional> #include <algorithm> #include <iterator> #include <map> @@ -46,7 +45,7 @@ namespace pcr namespace { - struct SetPropertyValue : public std::unary_function< Reference< XPropertyHandler >, void > + struct SetPropertyValue { OUString sPropertyName; const Any& rValue; diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 38065bce28e3..edb991294a67 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -337,7 +337,7 @@ struct EqualByType : public std::binary_function<FlatDetectionInfo, FlatDetectio } }; -class FindByType : public std::unary_function<FlatDetectionInfo, bool> +class FindByType { OUString maType; public: diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 958258327049..3e50047e1803 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -87,7 +87,7 @@ namespace frm namespace { - struct RowSetValueToString : public ::std::unary_function< ORowSetValue, OUString > + struct RowSetValueToString { OUString operator()( const ORowSetValue& _value ) const { @@ -96,7 +96,7 @@ namespace frm }; - struct AppendRowSetValueString : public ::std::unary_function< OUString, void > + struct AppendRowSetValueString { explicit AppendRowSetValueString( OUString& _string ) :m_string( _string ) @@ -1473,7 +1473,7 @@ namespace frm namespace { - struct ExtractStringFromSequence_Safe : public ::std::unary_function< sal_Int16, OUString > + struct ExtractStringFromSequence_Safe { protected: const std::vector< OUString >& m_rList; @@ -1544,7 +1544,7 @@ namespace frm } - struct ExtractAnyFromValueList_Safe : public ::std::unary_function< sal_Int16, Any > + struct ExtractAnyFromValueList_Safe { protected: const ValueList& m_rList; diff --git a/forms/source/component/propertybaghelper.cxx b/forms/source/component/propertybaghelper.cxx index c9f5ca0e4016..130008fd6ae2 100644 --- a/forms/source/component/propertybaghelper.cxx +++ b/forms/source/component/propertybaghelper.cxx @@ -222,19 +222,19 @@ namespace frm namespace { - struct SelectNameOfProperty : public ::std::unary_function< Property, OUString > + struct SelectNameOfProperty { const OUString& operator()( const Property& _rProp ) const { return _rProp.Name; } }; - struct SelectNameOfPropertyValue : public ::std::unary_function< PropertyValue, OUString > + struct SelectNameOfPropertyValue { const OUString& operator()( const PropertyValue& _rProp ) const { return _rProp.Name; } }; - struct SelectValueOfPropertyValue : public ::std::unary_function< PropertyValue, Any > + struct SelectValueOfPropertyValue { const Any& operator()( const PropertyValue& _rProp ) const { return _rProp.Value; } }; diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 7b796e3d10fe..c251c17d3587 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -356,7 +356,7 @@ void SAL_CALL OInterfaceContainer::writeEvents(const Reference<XObjectOutputStre } -struct TransformEventTo52Format : public ::std::unary_function< ScriptEventDescriptor, void > +struct TransformEventTo52Format { void operator()( ScriptEventDescriptor& _rDescriptor ) { diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm index f71ea106dcfa..0454c6ef977b 100644 --- a/fpicker/source/aqua/FilterHelper.mm +++ b/fpicker/source/aqua/FilterHelper.mm @@ -19,7 +19,6 @@ #include "sal/config.h" -#include <functional> #include <algorithm> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -126,7 +125,7 @@ shrinkFilterName( const rtl::OUString& aFilterName, bool bAllowNoStar = false ) namespace { - struct FilterTitleMatch : public ::std::unary_function< FilterEntry, bool > + struct FilterTitleMatch { protected: const rtl::OUString rTitle; diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index c3ec876ce6d4..fc9a65b8e7e0 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -23,7 +23,6 @@ #include "RemoteFilesDialog.hxx" #include <list> -#include <functional> #include <algorithm> #include <tools/urlobj.hxx> #include <com/sun/star/uno/Any.hxx> @@ -331,7 +330,7 @@ void SvtFilePicker::notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) namespace { - struct FilterTitleMatch : public ::std::unary_function< FilterEntry, bool > + struct FilterTitleMatch { protected: const OUString& rTitle; diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 4b7c4319d573..176f0d5b33a3 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -49,7 +49,6 @@ #include <vcl/commandinfoprovider.hxx> #include <cassert> -#include <functional> using namespace ::com::sun::star; @@ -60,7 +59,7 @@ namespace { template< class MAP > -struct lcl_UpdateController : public std::unary_function< typename MAP::value_type, void > +struct lcl_UpdateController { void operator()( typename MAP::value_type &rElement ) const { @@ -76,7 +75,7 @@ struct lcl_UpdateController : public std::unary_function< typename MAP::value_ty }; template< class MAP > -struct lcl_RemoveController : public std::unary_function< typename MAP::value_type, void > +struct lcl_RemoveController { void operator()( typename MAP::value_type &rElement ) const { diff --git a/include/comphelper/make_shared_from_uno.hxx b/include/comphelper/make_shared_from_uno.hxx index 17496eeb4aa4..b30dde09d115 100644 --- a/include/comphelper/make_shared_from_uno.hxx +++ b/include/comphelper/make_shared_from_uno.hxx @@ -19,7 +19,6 @@ #ifndef INCLUDED_COMPHELPER_MAKE_SHARED_FROM_UNO_HXX #define INCLUDED_COMPHELPER_MAKE_SHARED_FROM_UNO_HXX -#include <functional> #include <memory> namespace comphelper { @@ -27,7 +26,7 @@ namespace comphelper { /// @internal namespace detail { /// @internal -template <typename T> struct ReleaseFunc : ::std::unary_function<T *, void> { +template <typename T> struct ReleaseFunc { void operator()( T * p ) const { p->release(); } }; } // namespace detail diff --git a/include/connectivity/FValue.hxx b/include/connectivity/FValue.hxx index dfde6cab9342..2c3645ea2ae8 100644 --- a/include/connectivity/FValue.hxx +++ b/include/connectivity/FValue.hxx @@ -471,8 +471,8 @@ namespace connectivity typedef ::rtl::Reference<ORowSetValueDecorator> ORowSetValueDecoratorRef; - /// TSetBound is a unary_function to set the bound value with e.q. for_each call - struct OOO_DLLPUBLIC_DBTOOLS TSetBound : ::std::unary_function<ORowSetValue,void> + /// TSetBound is a functor to set the bound value with e.q. for_each call + struct OOO_DLLPUBLIC_DBTOOLS TSetBound { bool m_bBound; TSetBound(bool _bBound) : m_bBound(_bBound){} @@ -481,8 +481,8 @@ namespace connectivity }; - /// TSetBound is a unary_function to set the bound value with e.q. for_each call - struct OOO_DLLPUBLIC_DBTOOLS TSetRefBound : ::std::unary_function<ORowSetValueDecoratorRef,void> + /// TSetBound is a functor to set the bound value with e.q. for_each call + struct OOO_DLLPUBLIC_DBTOOLS TSetRefBound { bool m_bBound; TSetRefBound(bool _bBound) : m_bBound(_bBound){} diff --git a/include/editeng/AccessibleParaManager.hxx b/include/editeng/AccessibleParaManager.hxx index af4687581f06..30d02dd846dc 100644 --- a/include/editeng/AccessibleParaManager.hxx +++ b/include/editeng/AccessibleParaManager.hxx @@ -22,7 +22,6 @@ #include <vector> #include <algorithm> -#include <functional> #include <utility> #include <tools/gen.hxx> #include <com/sun/star/awt/Rectangle.hpp> @@ -190,7 +189,7 @@ namespace accessibility void operator() ( AccessibleEditablePara& ) */ - template < typename Functor > class WeakChildAdapter : public ::std::unary_function< const WeakChild&, void > + template < typename Functor > class WeakChildAdapter { public: WeakChildAdapter( Functor& rFunctor ) : mrFunctor(rFunctor) {} @@ -216,7 +215,7 @@ namespace accessibility Create with pointer to member function of AccessibleEditableTextPara and the corresponding argument. */ - template < typename Argument > class MemFunAdapter : public ::std::unary_function< const WeakChild&, void > + template < typename Argument > class MemFunAdapter { public: typedef void (::accessibility::AccessibleEditableTextPara::*FunctionPointer)( Argument ); diff --git a/include/osl/diagnose.hxx b/include/osl/diagnose.hxx index c515eaf54827..0472ea42ea66 100644 --- a/include/osl/diagnose.hxx +++ b/include/osl/diagnose.hxx @@ -24,7 +24,6 @@ #include <sal/config.h> #include <cstddef> -#include <functional> #include <typeinfo> #include <unordered_set> @@ -85,7 +84,7 @@ namespace osl { namespace detail { -struct VoidPtrHash : ::std::unary_function<void const*, ::std::size_t> { +struct VoidPtrHash { ::std::size_t operator()( void const* p ) const { ::std::size_t const d = static_cast< ::std::size_t >( reinterpret_cast< ::std::ptrdiff_t >(p) ); diff --git a/include/svl/urlfilter.hxx b/include/svl/urlfilter.hxx index c607dd32c711..d7d9d1d106fd 100644 --- a/include/svl/urlfilter.hxx +++ b/include/svl/urlfilter.hxx @@ -21,10 +21,9 @@ #define INCLUDED_SVL_URLFILTER_HXX #include <tools/wldcrd.hxx> -#include <functional> #include <vector> -struct FilterMatch : public ::std::unary_function< bool, WildCard > +struct FilterMatch { private: const OUString& m_rCompareString; diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 2d2d5fdd3536..196bf9264928 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -127,7 +127,7 @@ bool isPrimaryAxes(sal_Int32 nIndex) } -class lcl_MatchesRole : public ::std::unary_function< Reference< chart2::data::XLabeledDataSequence >, bool > +class lcl_MatchesRole { public: explicit lcl_MatchesRole( const OUString & aRole ) : diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 44459a0d60ea..ecb71d622272 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -952,7 +952,7 @@ namespace eForceToAnotherPage, eBreakAction }; - class ApplySectionViewAction : public ::std::unary_function< OViewsWindow::TSectionsMap::value_type, void > + class ApplySectionViewAction { private: SectionViewAction m_eAction; diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index fa1b1c4905de..917fca1a89f2 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -91,7 +91,7 @@ typedef std::vector<OString> string_container_t; #if !defined _WIN32 -class exclude : public std::unary_function<OString, bool> +class exclude { public: diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index 5f778da68e43..5abd47579ef0 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -220,7 +220,7 @@ class ScDPDataMember; #define SC_DPMEASURE_ALL -1 #define SC_DPMEASURE_ANY -2 -struct MemberHashIndexFunc : public std::unary_function< const SCROW &, size_t > +struct MemberHashIndexFunc { size_t operator() (SCROW rDataIndex) const { return rDataIndex; } }; diff --git a/sc/inc/typedstrdata.hxx b/sc/inc/typedstrdata.hxx index d0cb0d9fa4ad..e7c47a47c9e1 100644 --- a/sc/inc/typedstrdata.hxx +++ b/sc/inc/typedstrdata.hxx @@ -65,7 +65,7 @@ private: bool mbIsDate; }; -class FindTypedStrData : public std::unary_function<ScTypedStrData, bool> +class FindTypedStrData { ScTypedStrData maVal; bool mbCaseSens; diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index d41e0eb0a912..4c786f210545 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -1777,7 +1777,7 @@ void ScFiltersTest::testCellAnchoredHiddenShapesXLSX() namespace { -class FindDimByName : public std::unary_function<const ScDPSaveDimension*, bool> +class FindDimByName { OUString maName; public: diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 8456b872f70e..ecb0d5e8ab03 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1982,7 +1982,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol) namespace { -class SharedTopFormulaCellPicker : public std::unary_function<sc::CellStoreType::value_type, void> +class SharedTopFormulaCellPicker { public: virtual ~SharedTopFormulaCellPicker() {} @@ -2056,7 +2056,7 @@ public: } }; -class UpdateRefOnNonCopy : public std::unary_function<sc::FormulaGroupEntry, void> +class UpdateRefOnNonCopy { SCCOL mnCol; SCROW mnTab; diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index d08b9a559f8b..7a7591f3b032 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1569,7 +1569,7 @@ namespace { #define DUMP_FORMULA_RESULTS 0 -struct ColumnStorageDumper : std::unary_function<sc::CellStoreType::value_type, void> +struct ColumnStorageDumper { const ScDocument* mpDoc; @@ -2614,7 +2614,7 @@ copyFirstFormulaBlock( return rCxt.setCachedColArray(nTab, nCol, pNumArray, pStrArray); } -struct NonNullStringFinder : std::unary_function<const rtl_uString*, bool> +struct NonNullStringFinder { bool operator() (const rtl_uString* p) const { return p != nullptr; } }; diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 112afef0a14a..3afc14dd15d4 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -799,7 +799,7 @@ void ScColumn::InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) cons namespace { -class CopyAttrArrayByRange : public std::unary_function<sc::RowSpan, void> +class CopyAttrArrayByRange { ScAttrArray& mrDestAttrArray; ScAttrArray& mrSrcAttrArray; diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index 8ab7e6014266..dd4134965ad8 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -129,7 +129,7 @@ void ScDocument::BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bB namespace { -class RefMovedNotifier : public std::unary_function<SvtListener*, void> +class RefMovedNotifier { const sc::RefMovedHint& mrHint; public: diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 27e7eb9cf5d8..c78e1db3acf9 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1230,7 +1230,7 @@ bool ScDocument::CanInsertRow( const ScRange& rRange ) const namespace { -struct SetDirtyIfPostponedHandler : std::unary_function<ScTable*, void> +struct SetDirtyIfPostponedHandler { void operator() (ScTable* p) { @@ -1239,7 +1239,7 @@ struct SetDirtyIfPostponedHandler : std::unary_function<ScTable*, void> } }; -struct BroadcastRecalcOnRefMoveHandler : std::unary_function<ScTable*, void> +struct BroadcastRecalcOnRefMoveHandler { void operator() (ScTable* p) { diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index fddc029dc815..4768bfeadf10 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -463,7 +463,7 @@ void ScDocument::SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArra namespace { -class StartNeededListenersHandler : public std::unary_function<ScTable*, void> +class StartNeededListenersHandler { std::shared_ptr<sc::StartListeningContext> mpCxt; public: diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 67d586a94484..9cc82795d3da 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -77,7 +77,7 @@ ScDPCache::ScDPCache(ScDocument* pDoc) : namespace { -struct ClearObjectSource : std::unary_function<ScDPObject*, void> +struct ClearObjectSource { void operator() (ScDPObject* p) const { @@ -185,7 +185,7 @@ struct Bucket using std::cout; using std::endl; -struct PrintBucket : std::unary_function<Bucket, void> +struct PrintBucket { void operator() (const Bucket& v) const { @@ -227,7 +227,7 @@ struct EqualByOrderIndex : std::binary_function<Bucket, Bucket, bool> } }; -class PushBackValue : public std::unary_function<Bucket, void> +class PushBackValue { ScDPCache::ScDPItemDataVec& mrItems; public: @@ -238,7 +238,7 @@ public: } }; -class PushBackOrderIndex : public std::unary_function<Bucket, void> +class PushBackOrderIndex { ScDPCache::IndexArrayType& mrData; public: @@ -336,7 +336,7 @@ struct InitDocData typedef std::unordered_set<OUString, OUStringHash> LabelSet; -class InsertLabel : public std::unary_function<OUString, void> +class InsertLabel { LabelSet& mrNames; public: @@ -1378,7 +1378,7 @@ void ScDPCache::GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const namespace { -struct ClearGroupItems : std::unary_function<std::unique_ptr<ScDPCache::Field>, void> +struct ClearGroupItems { void operator() (std::unique_ptr<ScDPCache::Field>& r) const { diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 3ecc2ee04e75..564b56e93f02 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -659,7 +659,7 @@ void ScDPDimensionSaveData::WriteToData( ScDPGroupTableData& rData ) const namespace { -class AddGroupDimToCache : public std::unary_function<ScDPSaveGroupDimension, void> +class AddGroupDimToCache { ScDPCache& mrCache; public: diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index d0d75bca5c2f..f4dab854015b 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -634,7 +634,7 @@ void ScDPGroupTableData::CreateCacheTable() namespace { -class FindCaseInsensitive : public std::unary_function<ScDPItemData, bool> +class FindCaseInsensitive { ScDPItemData maValue; public: diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index baddcf5e9e5b..fdba353ca7ed 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -82,7 +82,6 @@ using namespace com::sun::star; using ::std::vector; -using ::std::unary_function; using ::std::shared_ptr; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; @@ -584,7 +583,7 @@ public: } }; -class FindIntersectingTable : public std::unary_function<std::unique_ptr<ScDPObject>, bool> +class FindIntersectingTable { ScRange maRange; public: @@ -596,7 +595,7 @@ public: } }; -class FindIntersectingTableByColumns : public std::unary_function<std::unique_ptr<ScDPObject>, bool> +class FindIntersectingTableByColumns { SCCOL mnCol1; SCCOL mnCol2; @@ -630,7 +629,7 @@ public: } }; -class FindIntersectingTableByRows : public std::unary_function<std::unique_ptr<ScDPObject>, bool> +class FindIntersectingTableByRows { SCCOL mnCol; SCROW mnRow1; @@ -664,7 +663,7 @@ public: } }; -class AccumulateOutputRanges : public std::unary_function<std::unique_ptr<ScDPObject>, void> +class AccumulateOutputRanges { ScRangeList maRanges; SCTAB mnTab; @@ -1326,7 +1325,7 @@ void ScDPObject::GetHeaderPositionData(const ScAddress& rPos, DataPilotTableHead namespace { -class FindByName : public std::unary_function<const ScDPSaveDimension*, bool> +class FindByName { OUString maName; // must be all uppercase. public: @@ -2144,7 +2143,7 @@ static PivotFunc lcl_FirstSubTotal( const uno::Reference<beans::XPropertySet>& x namespace { -class FindByColumn : public std::unary_function<ScPivotField, bool> +class FindByColumn { SCCOL mnCol; PivotFunc mnMask; @@ -2614,7 +2613,7 @@ bool hasFieldColumn(const vector<ScPivotField>* pRefFields, SCCOL nCol) return false; } -class FindByOriginalDim : public std::unary_function<ScPivotField, bool> +class FindByOriginalDim { long mnDim; public: @@ -2902,7 +2901,7 @@ ScDPCollection::SheetCaches::SheetCaches(ScDocument* pDoc) : mpDoc(pDoc) {} namespace { -struct FindInvalidRange : public std::unary_function<ScRange, bool> +struct FindInvalidRange { bool operator() (const ScRange& r) const { @@ -3388,7 +3387,7 @@ namespace { /** * Unary predicate to match DP objects by the table ID. */ -class MatchByTable : public unary_function<std::unique_ptr<ScDPObject>, bool> +class MatchByTable { SCTAB mnTab; public: @@ -3857,7 +3856,7 @@ bool ScDPCollection::HasTable( const ScRange& rRange ) const namespace { -struct DumpTable : std::unary_function<std::unique_ptr<ScDPObject>, void> +struct DumpTable { void operator() (const std::unique_ptr<ScDPObject>& rObj) const { diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 323eb34b431d..7715eed721bb 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -847,7 +847,7 @@ const OUString* ScDPSaveData::GetGrandTotalName() const namespace { -class DimOrderInserter : public std::unary_function<const ScDPSaveDimension*, void> +class DimOrderInserter { ScDPSaveData::DimOrderType& mrNames; public: diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 7c92e59d3745..5610ed70d22e 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -662,7 +662,7 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool namespace { -class CategoryDimInserter : public std::unary_function<long, void> +class CategoryDimInserter { ScDPSource& mrSource; std::unordered_set<sal_Int32>& mrCatDims; diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 464e33d545e5..713c26086844 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1957,7 +1957,7 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d namespace { -class SetTableIndex : public ::std::unary_function<ScRange, void> +class SetTableIndex { SCTAB mnTab; public: diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 9e33ccb4aee4..cda78f27dd2b 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -652,7 +652,7 @@ void ScTable::DestroySortCollator() namespace { template<typename Hint, typename ReorderMap, typename Index> -class ReorderNotifier : public std::unary_function<SvtListener*, void> +class ReorderNotifier { Hint maHint; public: @@ -665,7 +665,7 @@ public: } }; -class StartListeningNotifier : public std::unary_function<SvtListener*, void> +class StartListeningNotifier { sc::RefStartListeningHint maHint; public: @@ -677,7 +677,7 @@ public: } }; -class StopListeningNotifier : public std::unary_function<SvtListener*, void> +class StopListeningNotifier { sc::RefStopListeningHint maHint; public: @@ -689,7 +689,7 @@ public: } }; -class FormulaGroupPosCollector : public std::unary_function<SvtListener*, void> +class FormulaGroupPosCollector { sc::RefQueryFormulaGroup& mrQuery; @@ -2880,7 +2880,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam ) namespace { -class PrepareQueryItem : public std::unary_function<ScQueryEntry::Item, void> +class PrepareQueryItem { const ScDocument& mrDoc; public: diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 04fa263ec723..75010c572b54 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -27,7 +27,6 @@ using namespace com::sun::star; using ::std::vector; -using ::std::unary_function; using ::std::for_each; // Update chart listeners quickly, to get a similar behavior to loaded charts @@ -237,7 +236,7 @@ void ScChartListener::SetRangeList( const ScRangeListRef& rNew ) namespace { -class StartEndListening : public unary_function<ScTokenRef, void> +class StartEndListening { public: StartEndListening(ScDocument* pDoc, ScChartListener& rParent, bool bStart) : @@ -503,7 +502,7 @@ void ScChartListenerCollection::ChangeListening( const OUString& rName, namespace { -class InsertChartListener : public std::unary_function<ScChartListener*, void> +class InsertChartListener { ScChartListenerCollection::ListenersType& mrListeners; public: diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index e8284bc8fa37..7b83cc6fcdfc 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4337,7 +4337,7 @@ void ScCompiler::CreateStringFromXMLTokenArray( OUString& rFormula, OUString& rF namespace { -class ExternalFileInserter : public std::unary_function<sal_uInt16, void> +class ExternalFileInserter { ScAddress maPos; ScExternalRefManager& mrRefMgr; diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 202ec4edfb3a..a6580a5a8e24 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -41,7 +41,6 @@ #include <utility> using ::std::unique_ptr; -using ::std::unary_function; using ::std::for_each; using ::std::find_if; using ::std::remove_if; @@ -724,7 +723,7 @@ void ScDBData::InvalidateTableColumnNames( bool bSwapToEmptyNames ) } namespace { -class TableColumnNameSearch : public unary_function<ScDBData, bool> +class TableColumnNameSearch { public: explicit TableColumnNameSearch( const OUString& rSearchName ) : @@ -933,7 +932,7 @@ void ScDBData::GetFilterSelCount( SCSIZE& nSelected, SCSIZE& nTotal ) namespace { -class FindByTable : public unary_function<std::unique_ptr<ScDBData>, bool> +class FindByTable { SCTAB mnTab; public: @@ -947,7 +946,7 @@ public: } }; -class UpdateRefFunc : public unary_function<std::unique_ptr<ScDBData>, void> +class UpdateRefFunc { ScDocument* mpDoc; UpdateRefMode meMode; @@ -977,7 +976,7 @@ public: } }; -class UpdateMoveTabFunc : public unary_function<std::unique_ptr<ScDBData>, void> +class UpdateMoveTabFunc { SCTAB mnOldTab; SCTAB mnNewTab; @@ -989,7 +988,7 @@ public: } }; -class FindByCursor : public unary_function<std::unique_ptr<ScDBData>, bool> +class FindByCursor { SCCOL mnCol; SCROW mnRow; @@ -1005,7 +1004,7 @@ public: } }; -class FindByRange : public unary_function<std::unique_ptr<ScDBData>, bool> +class FindByRange { const ScRange& mrRange; public: @@ -1018,7 +1017,7 @@ public: } }; -class FindByIndex : public unary_function<std::unique_ptr<ScDBData>, bool> +class FindByIndex { sal_uInt16 mnIndex; public: @@ -1029,7 +1028,7 @@ public: } }; -class FindByUpperName : public unary_function<std::unique_ptr<ScDBData>, bool> +class FindByUpperName { const OUString& mrName; public: @@ -1040,7 +1039,7 @@ public: } }; -class FindByPointer : public unary_function<std::unique_ptr<ScDBData>, bool> +class FindByPointer { const ScDBData* mpDBData; public: diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx index 031d53000870..888d0efdbf73 100644 --- a/sc/source/core/tool/grouparealistener.cxx +++ b/sc/source/core/tool/grouparealistener.cxx @@ -22,7 +22,7 @@ namespace sc { namespace { -class Notifier : public std::unary_function<ScFormulaCell*, void> +class Notifier { const SfxHint& mrHint; public: diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 5df85fad9e75..9ee855897f2a 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -71,7 +71,6 @@ #include <float.h> #include <map> #include <algorithm> -#include <functional> #include <basic/basmgr.hxx> #include <vbahelper/vbaaccesshelper.hxx> #include <memory> @@ -3556,7 +3555,7 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos ) namespace { -class FindByPointer : public ::std::unary_function<ScInterpreterTableOpParams, bool> +class FindByPointer { const ScInterpreterTableOpParams* mpTableOp; public: diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 90c447e59eb8..75e3f8dd5da1 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1659,7 +1659,7 @@ void ScInterpreter::ScPow() namespace { -class SumValues : public std::unary_function<double, void> +class SumValues { double mfSum; bool mbError; diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 2406ca523e0d..72fa4919537e 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -33,7 +33,7 @@ namespace { const size_t MAXQUERY = 8; -class FindByField : public std::unary_function<ScQueryEntry, bool> +class FindByField { SCCOLROW mnField; public: @@ -44,7 +44,7 @@ public: } }; -struct FindUnused : public std::unary_function<ScQueryEntry, bool> +struct FindUnused { bool operator() (const std::unique_ptr<ScQueryEntry>& rpEntry) const { diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index f475ba16adb4..cb5c8e831458 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -38,7 +38,7 @@ using ::formula::FormulaGrammar; namespace { template<typename T> -class FindEnclosingRange : public ::std::unary_function<ScRange*, bool> +class FindEnclosingRange { public: explicit FindEnclosingRange(const T& rTest) : mrTest(rTest) {} @@ -52,7 +52,7 @@ private: }; template<typename T> -class FindRangeIn : public ::std::unary_function<ScRange*, bool> +class FindRangeIn { public: FindRangeIn(const T& rTest) : mrTest(rTest) {} @@ -66,7 +66,7 @@ private: }; template<typename T> -class FindIntersectingRange : public ::std::unary_function<ScRange*, bool> +class FindIntersectingRange { public: explicit FindIntersectingRange(const T& rTest) : mrTest(rTest) {} @@ -79,7 +79,7 @@ private: const T& mrTest; }; -class AppendToList : public ::std::unary_function<const ScRange*, void> +class AppendToList { public: explicit AppendToList(vector<ScRange*>& rRanges) : mrRanges(rRanges) {} @@ -92,7 +92,7 @@ private: vector<ScRange*>& mrRanges; }; -class CountCells : public ::std::unary_function<const ScRange*, void> +class CountCells { public: CountCells() : mnCellCount(0) {} @@ -112,7 +112,7 @@ private: size_t mnCellCount; }; -class FormatString : public ::std::unary_function<const ScRange*, void> +class FormatString { public: FormatString(OUString& rStr, ScRefFlags nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim) : diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index b9c6f9a77f8d..db12ebe0f6d2 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -41,7 +41,6 @@ using namespace formula; using ::std::pair; -using ::std::unary_function; // ScRangeData @@ -652,7 +651,7 @@ namespace { /** * Predicate to check if the name references the specified range. */ -class MatchByRange : public unary_function<ScRangeData, bool> +class MatchByRange { const ScRange& mrRange; public: diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 812c956bae05..8a33b34e64df 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -52,7 +52,6 @@ using std::endl; using ::std::pair; using ::std::advance; -using ::std::unary_function; /** * Custom string trait struct to tell mdds::multi_type_matrix about the @@ -87,7 +86,7 @@ double convertStringToValue( ScInterpreter* pErrorInterpreter, const OUString& r return CreateDoubleError( FormulaError::NoValue); } -struct ElemEqualZero : public unary_function<double, double> +struct ElemEqualZero { double operator() (double val) const { @@ -97,7 +96,7 @@ struct ElemEqualZero : public unary_function<double, double> } }; -struct ElemNotEqualZero : public unary_function<double, double> +struct ElemNotEqualZero { double operator() (double val) const { @@ -107,7 +106,7 @@ struct ElemNotEqualZero : public unary_function<double, double> } }; -struct ElemGreaterZero : public unary_function<double, double> +struct ElemGreaterZero { double operator() (double val) const { @@ -117,7 +116,7 @@ struct ElemGreaterZero : public unary_function<double, double> } }; -struct ElemLessZero : public unary_function<double, double> +struct ElemLessZero { double operator() (double val) const { @@ -127,7 +126,7 @@ struct ElemLessZero : public unary_function<double, double> } }; -struct ElemGreaterEqualZero : public unary_function<double, double> +struct ElemGreaterEqualZero { double operator() (double val) const { @@ -137,7 +136,7 @@ struct ElemGreaterEqualZero : public unary_function<double, double> } }; -struct ElemLessEqualZero : public unary_function<double, double> +struct ElemLessEqualZero { double operator() (double val) const { @@ -148,7 +147,7 @@ struct ElemLessEqualZero : public unary_function<double, double> }; template<typename Comp> -class CompareMatrixElemFunc : public std::unary_function<MatrixImplType::element_block_node_type, void> +class CompareMatrixElemFunc { static Comp maComp; @@ -1217,7 +1216,7 @@ public: } }; -class CountElements : public std::unary_function<MatrixImplType::element_block_node_type, void> +class CountElements { size_t mnCount; bool mbCountString; @@ -1264,7 +1263,7 @@ public: const size_t ResultNotSet = std::numeric_limits<size_t>::max(); template<typename Type> -class WalkAndMatchElements : public std::unary_function<MatrixImplType::element_block_node_type, void> +class WalkAndMatchElements { Type maMatchValue; MatrixImplType::size_pair_type maSize; @@ -1455,7 +1454,7 @@ struct Gcd }; template<typename Op> -class CalcMaxMinValue : public std::unary_function<MatrixImplType::element_block_type, void> +class CalcMaxMinValue { double mfVal; bool mbTextAsZero; @@ -1514,7 +1513,7 @@ public: }; template<typename Op> -class CalcGcdLcm : public std::unary_function<MatrixImplType::element_block_type,void> +class CalcGcdLcm { double mfval; @@ -1594,7 +1593,7 @@ inline double evaluate( double fVal, ScQueryOp eOp ) return CreateDoubleError( FormulaError::UnknownState); } -class CompareMatrixFunc : public std::unary_function<MatrixImplType::element_block_type, void> +class CompareMatrixFunc { sc::Compare& mrComp; size_t mnMatPos; @@ -1689,7 +1688,7 @@ public: /** * Left-hand side is a matrix while the right-hand side is a numeric value. */ -class CompareMatrixToNumericFunc : public std::unary_function<MatrixImplType::element_block_type, void> +class CompareMatrixToNumericFunc { sc::Compare& mrComp; double mfRightValue; @@ -1778,7 +1777,7 @@ public: } }; -class ToDoubleArray : public std::unary_function<MatrixImplType::element_block_type, void> +class ToDoubleArray { std::vector<double> maArray; std::vector<double>::iterator miPos; @@ -1852,7 +1851,7 @@ struct ArrayMul : public std::binary_function<double, double, double> }; template<typename Op> -class MergeDoubleArrayFunc : public std::unary_function<MatrixImplType::element_block_type, void> +class MergeDoubleArrayFunc { std::vector<double>& mrArray; std::vector<double>::iterator miPos; diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index 0f542a9ed777..4a49e65dfe36 100644 --- a/sc/source/core/tool/userlist.cxx +++ b/sc/source/core/tool/userlist.cxx @@ -31,7 +31,7 @@ namespace { -class FindByName : public ::std::unary_function<ScUserListData::SubStr, bool> +class FindByName { const OUString& mrName; bool mbUpper; diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx index 442395596b0e..b02ec636d449 100644 --- a/sc/source/filter/excel/xestring.cxx +++ b/sc/source/filter/excel/xestring.cxx @@ -58,7 +58,7 @@ int lclCompareVectors( const ::std::vector< Type >& rLeft, const ::std::vector< /** Base class for value hashers. @descr These function objects are used to hash any value to a sal_uInt32 value. */ template< typename Type > -struct XclHasher : public ::std::unary_function< Type, sal_uInt32 > {}; +struct XclHasher {}; template< typename Type > struct XclDirectHasher : public XclHasher< Type > diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 9efb60cc80c7..35e9ffacfafa 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -95,7 +95,7 @@ orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(const char return maSheets.back().get(); } -class FindSheetByIndex : public std::unary_function< std::unique_ptr<ScOrcusSheet>, bool> +class FindSheetByIndex { SCTAB mnTab; public: diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx index 606456563a4d..cdbde68f81ee 100644 --- a/sc/source/filter/orcus/xmlcontext.cxx +++ b/sc/source/filter/orcus/xmlcontext.cxx @@ -141,7 +141,7 @@ public: } }; -class InsertFieldPath : public std::unary_function<OString, void> +class InsertFieldPath { orcus::orcus_xml& mrFilter; public: @@ -214,7 +214,7 @@ void ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXM namespace { -class SetNamespaceAlias : public std::unary_function<size_t, void> +class SetNamespaceAlias { orcus::orcus_xml& mrFilter; orcus::xmlns_repository& mrNsRepo; diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index 77d2711bbe2f..b388df8cc8b7 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -113,7 +113,7 @@ ScMyEmptyDatabaseRangesContainer ScXMLExportDatabaseRanges::GetEmptyDatabaseRang namespace { -class WriteDatabaseRange : public ::std::unary_function<ScDBData, void> +class WriteDatabaseRange { ScXMLExport& mrExport; ScDocument* mpDoc; @@ -420,7 +420,7 @@ private: return OUString("="); } - class WriteSetItem : public std::unary_function<ScQueryEntry::Item, void> + class WriteSetItem { ScXMLExport& mrExport; public: diff --git a/sc/source/filter/xml/pivotsource.cxx b/sc/source/filter/xml/pivotsource.cxx index 633b8c5b1abe..322459239320 100644 --- a/sc/source/filter/xml/pivotsource.cxx +++ b/sc/source/filter/xml/pivotsource.cxx @@ -54,7 +54,7 @@ void PivotTableSources::appendSelectedPages( ScDPObject* pObj, const SelectedPag namespace { -struct SelectedPageProcessor : std::unary_function<PivotTableSources::SelectedPages, void> +struct SelectedPageProcessor { void operator() ( PivotTableSources::SelectedPages& rItem ) { @@ -81,7 +81,7 @@ struct SelectedPageProcessor : std::unary_function<PivotTableSources::SelectedPa } }; -struct PivotSheetDescSetter : std::unary_function<sc::PivotTableSources::SheetSource, void> +struct PivotSheetDescSetter { void operator() ( sc::PivotTableSources::SheetSource& rSrc ) { @@ -90,7 +90,7 @@ struct PivotSheetDescSetter : std::unary_function<sc::PivotTableSources::SheetSo } }; -struct PivotDBDescSetter : std::unary_function<sc::PivotTableSources::DBSource, void> +struct PivotDBDescSetter { void operator() ( sc::PivotTableSources::DBSource& rSrc ) { @@ -99,7 +99,7 @@ struct PivotDBDescSetter : std::unary_function<sc::PivotTableSources::DBSource, } }; -struct PivotServiceDataSetter : std::unary_function<sc::PivotTableSources::ServiceSource, void> +struct PivotServiceDataSetter { void operator() ( sc::PivotTableSources::ServiceSource& rSrc ) { diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index abd40755e83c..0425953e7826 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -3178,7 +3178,7 @@ void ScXMLImport::SetLabelRanges() namespace { -class RangeNameInserter : public ::std::unary_function<ScMyNamedExpression, void> +class RangeNameInserter { ScDocument* mpDoc; ScRangeName& mrRangeName; diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index 76c96eb554e4..2aa8ba93c3e3 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -50,7 +50,7 @@ using ::std::for_each; namespace { -class AddRemoveEventListener : public ::std::unary_function<void, Reference<XAccessible> > +class AddRemoveEventListener { public: explicit AddRemoveEventListener(const Reference<XAccessibleEventListener>& rListener, bool bAdd) : diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 1955934d4430..0b2155e1ac3a 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -496,7 +496,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl, Button*, void) namespace { -class FindByName : public ::std::unary_function<std::unique_ptr<ScDBData>, bool> +class FindByName { const OUString& mrName; public: diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index 30a1fb16c93d..d3fb83763b1a 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -31,7 +31,7 @@ static inline sal_uLong TimeNow() // seconds namespace { -class FindByRange : public ::std::unary_function<ScAutoStyleData, bool> +class FindByRange { ScRange maRange; public: @@ -39,7 +39,7 @@ public: bool operator() (const ScAutoStyleData& rData) const { return rData.aRange == maRange; } }; -class FindByTimeout : public ::std::unary_function<ScAutoStyleData, bool> +class FindByTimeout { sal_uLong mnTimeout; public: @@ -47,7 +47,7 @@ public: bool operator() (const ScAutoStyleData& rData) const { return rData.nTimeout >= mnTimeout; } }; -struct FindNonZeroTimeout : public ::std::unary_function<ScAutoStyleData, bool> +struct FindNonZeroTimeout { bool operator() (const ScAutoStyleData& rData) const { diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index a395daf2dd24..e90e0e5af690 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -65,10 +65,10 @@ using ::com::sun::star::uno::Any; using ::std::vector; using ::std::find; using ::std::find_if; +using ::std::for_each; using ::std::distance; using ::std::pair; using ::std::list; -using ::std::unary_function; using namespace formula; #define SRCDOC_LIFE_SPAN 30000 // 5 minutes (in 100th of a sec) @@ -76,7 +76,7 @@ using namespace formula; namespace { -class TabNameSearchPredicate : public unary_function<ScExternalRefCache::TableName, bool> +class TabNameSearchPredicate { public: explicit TabNameSearchPredicate(const OUString& rSearchName) : @@ -94,7 +94,7 @@ private: OUString maSearchName; }; -class FindSrcFileByName : public unary_function<ScExternalRefManager::SrcFileData, bool> +class FindSrcFileByName { public: explicit FindSrcFileByName(const OUString& rMatchName) : @@ -111,7 +111,7 @@ private: const OUString& mrMatchName; }; -class NotifyLinkListener : public unary_function<ScExternalRefManager::LinkListener*, void> +class NotifyLinkListener { public: NotifyLinkListener(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType) : @@ -129,7 +129,7 @@ private: ScExternalRefManager::LinkUpdateType meType; }; -struct UpdateFormulaCell : public unary_function<ScFormulaCell*, void> +struct UpdateFormulaCell { void operator() (ScFormulaCell* pCell) const { @@ -152,7 +152,7 @@ struct UpdateFormulaCell : public unary_function<ScFormulaCell*, void> } }; -class RemoveFormulaCell : public unary_function<pair<const sal_uInt16, ScExternalRefManager::RefCellSet>, void> +class RemoveFormulaCell { public: explicit RemoveFormulaCell(ScFormulaCell* p) : mpCell(p) {} @@ -164,7 +164,7 @@ private: ScFormulaCell* mpCell; }; -class ConvertFormulaToStatic : public unary_function<ScFormulaCell*, void> +class ConvertFormulaToStatic { public: explicit ConvertFormulaToStatic(ScDocument* pDoc) : mpDoc(pDoc) {} @@ -215,7 +215,7 @@ bool hasRefsToSrcDoc(ScRangeData& rData, sal_uInt16 nFileId) return false; } -class EraseRangeByIterator : public unary_function<ScRangeName::iterator, void> +class EraseRangeByIterator { ScRangeName& mrRanges; public: diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 53d6212aeb88..c62b497c9748 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1261,7 +1261,7 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) namespace { -class DataChangeNotifier : public std::unary_function<SvtListener*, void> +class DataChangeNotifier { ScHint maHint; public: diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 5593feed2a74..f50a852202ac 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -76,7 +76,6 @@ using ::std::unique_ptr; using ::std::vector; using ::std::list; using ::std::distance; -using ::std::unary_function; using ::std::shared_ptr; namespace @@ -104,7 +103,7 @@ const SfxItemPropertyMapEntry* lcl_GetDataSequencePropertyMap() return aDataSequencePropertyMap_Impl; } -struct lcl_appendTableNumber : public ::std::unary_function< SCTAB, void > +struct lcl_appendTableNumber { explicit lcl_appendTableNumber( OUStringBuffer & rBuffer ) : m_rBuffer( rBuffer ) @@ -828,7 +827,7 @@ void Chart2Positioner::createPositionMap() /** * Function object to create a range string from a token list. */ -class Tokens2RangeString : public unary_function<ScTokenRef, void> +class Tokens2RangeString { public: Tokens2RangeString(ScDocument* pDoc, FormulaGrammar::Grammar eGram, sal_Unicode cRangeSep) : @@ -882,7 +881,7 @@ private: * * and each address doesn't include any '$' symbols. */ -class Tokens2RangeStringXML : public unary_function<ScTokenRef, void> +class Tokens2RangeStringXML { public: explicit Tokens2RangeStringXML(ScDocument* pDoc) : @@ -1357,7 +1356,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens, #define SHRINK_RANGE_THRESHOLD 10000 -class ShrinkRefTokenToDataRange : public std::unary_function<ScTokenRef, void> +class ShrinkRefTokenToDataRange { ScDocument* mpDoc; public: @@ -1605,7 +1604,7 @@ namespace /** * Function object to create a list of table numbers from a token list. */ -class InsertTabNumber : public unary_function<ScTokenRef, void> +class InsertTabNumber { public: InsertTabNumber() : @@ -3037,7 +3036,7 @@ namespace { * This function object is used to accumulatively count the numbers of * columns and rows in all reference tokens. */ -class AccumulateRangeSize : public unary_function<ScTokenRef, void> +class AccumulateRangeSize { public: AccumulateRangeSize() : @@ -3067,7 +3066,7 @@ private: * This function object is used to generate label strings from a list of * reference tokens. */ -class GenerateLabelStrings : public unary_function<ScTokenRef, void> +class GenerateLabelStrings { public: GenerateLabelStrings(sal_Int32 nSize, chart2::data::LabelOrigin eOrigin, bool bColumn) : diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 5a5ac3de2b23..6c567dcc080a 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -282,7 +282,7 @@ void getChartSourceRanges(ScDocument* pDoc, const SdrMarkList& rObjs, std::vecto } } -class InsertTabIndex : public std::unary_function<ScRange, void> +class InsertTabIndex { std::vector<SCTAB>& mrTabs; public: @@ -293,7 +293,7 @@ public: } }; -class CopyRangeData : public std::unary_function<ScRange, void> +class CopyRangeData { ScDocument* mpSrc; ScDocument* mpDest; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index a7a9e9b72ac7..59cd5d61cefe 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -582,7 +582,7 @@ public: } }; -class AddItemToEntry : public std::unary_function<OUString, void> +class AddItemToEntry { ScQueryEntry::QueryItemsType& mrItems; svl::SharedStringPool& mrPool; @@ -602,7 +602,7 @@ public: } }; -class AddSelectedItemString : public std::unary_function<ScQueryEntry::Item, void> +class AddSelectedItemString { std::unordered_set<OUString, OUStringHash>& mrSet; public: diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 09bd3dbabc09..b9bc6b9d147b 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -238,7 +238,7 @@ void ScXMLSourceDlg::HandleGetFocus(Control* pCtrl) namespace { -class UnhighlightEntry : public std::unary_function<SvTreeListEntry*, void> +class UnhighlightEntry { SvTreeListBox& mrTree; public: diff --git a/sc/workben/dpcache/perf-test.cpp b/sc/workben/dpcache/perf-test.cpp index 8bc5026c0aca..d93630e6ac56 100644 --- a/sc/workben/dpcache/perf-test.cpp +++ b/sc/workben/dpcache/perf-test.cpp @@ -278,7 +278,7 @@ struct equal_by_value : std::binary_function<bucket, bucket, bool> } }; -class push_back_value : std::unary_function<bucket, void> +class push_back_value { std::vector<int>& items; public: @@ -289,7 +289,7 @@ public: } }; -class push_back_order_index : std::unary_function<bucket, void> +class push_back_order_index { std::vector<size_t>& data_indices; public: diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index cc78e33da1b0..be8f7da7b81f 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -2746,7 +2746,7 @@ void EffectSequenceHelper::removeListener( ISequenceListener* pListener ) maListeners.remove( pListener ); } -struct stl_notify_listeners_func : public std::unary_function<ISequenceListener*, void> +struct stl_notify_listeners_func { stl_notify_listeners_func() {} void operator()(ISequenceListener* pListener) { pListener->notify_change(); } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 88a5393495d3..32553c5a4ca7 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -538,7 +538,7 @@ void CustomAnimationList::update( const MainSequencePtr& pMainSequence ) mpMainSequence->addListener( this ); } -struct stl_append_effect_func : public std::unary_function<CustomAnimationEffectPtr, void> +struct stl_append_effect_func { explicit stl_append_effect_func( CustomAnimationList& rList ) : mrList( rList ) {} void operator()(const CustomAnimationEffectPtr& pEffect); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index b1d803a53078..7f5b85598462 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -260,7 +260,7 @@ void lcl_CreateUndoForPages( pManager->LeaveListAction(); } -struct lcl_EqualsSoundFileName : public ::std::unary_function< OUString, bool > +struct lcl_EqualsSoundFileName { explicit lcl_EqualsSoundFileName( const OUString & rStr ) : maStr( rStr ) @@ -319,7 +319,7 @@ OUString lcl_getSoundFileURL( return OUString(); } -struct lcl_AppendSoundToListBox : public ::std::unary_function< OUString, void > +struct lcl_AppendSoundToListBox { explicit lcl_AppendSoundToListBox( ListBox* rListBox ) : mrListBox( rListBox ) diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index 9762e8d90f4b..a1968d06b84a 100644 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -65,7 +65,7 @@ public: /** This functor can be used to search for a shell in an STL container when the shell pointer is given. */ -class IsShell : public ::std::unary_function<ShellDescriptor,bool> +class IsShell { public: explicit IsShell (const SfxShell* pShell) : mpShell(pShell) {} @@ -78,7 +78,7 @@ private: ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
