diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-28 21:48:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-03 12:21:03 +0200 |
commit | c4ddf6cd6d97e7ce7c2e63e4d393bbeffcb34e4d (patch) | |
tree | 128225fc91bd7da687f965337a49b9b64fbe8a79 | |
parent | Translate German comments and debug strings (leftovers in dirs sal to sc) (diff) | |
download | core-c4ddf6cd6d97e7ce7c2e63e4d393bbeffcb34e4d.tar.gz core-c4ddf6cd6d97e7ce7c2e63e4d393bbeffcb34e4d.zip |
C++11 remove std::unary_function bases from functors
std::unary_function is deprecated since C++11 and removed in C++17
90% done with regexp magic.
removed obsolete <functional> includes.
The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
is used in a std::not1 function helper who uses the members
return_type and argument_type.
- replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
lcl_weakReferenceToSame used the argument_type member in the
operator() parameter.
- inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
used result_type and argument_type in operator().
- inline the types
Also fix compile error with gcc about finding std::for_each.
Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
152 files changed, 322 insertions, 399 deletions
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: /** This functor can be used to search for a shell in an STL container when the id of the shell is given. */ -class IsId : public ::std::unary_function<ShellDescriptor,bool> +class IsId { public: explicit IsId (ShellId nId) : mnId(nId) {} diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index f6771e2e15cf..9bd048d6ae1c 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -159,7 +159,7 @@ namespace sfx2 } - struct CreateEmptyClassRememberPos : public ::std::unary_function< FilterName, void > + struct CreateEmptyClassRememberPos { protected: FilterClassList& m_rClassList; @@ -186,7 +186,7 @@ namespace sfx2 }; - struct ReadGlobalFilter : public ::std::unary_function< FilterName, void > + struct ReadGlobalFilter { protected: OConfigurationNode m_aClassesNode; @@ -263,7 +263,7 @@ namespace sfx2 } - struct ReadLocalFilter : public ::std::unary_function< FilterName, void > + struct ReadLocalFilter { protected: OConfigurationNode m_aClassesNode; @@ -332,7 +332,7 @@ namespace sfx2 // a struct which adds helps remembering a reference to a class entry - struct ReferToFilterEntry : public ::std::unary_function< FilterName, void > + struct ReferToFilterEntry { protected: FilterGroupEntryReferrer& m_rEntryReferrer; @@ -357,7 +357,7 @@ namespace sfx2 }; - struct FillClassGroup : public ::std::unary_function< FilterClass, void > + struct FillClassGroup { protected: FilterGroup& m_rClassGroup; @@ -403,7 +403,7 @@ namespace sfx2 } - struct CheckAppendSingleWildcard : public ::std::unary_function< OUString, void > + struct CheckAppendSingleWildcard { OUString& _rToBeExtended; @@ -440,7 +440,7 @@ namespace sfx2 // a helper struct which adds a fixed (Sfx-)filter to a filter group entry given by iterator - struct AppendWildcardToDescriptor : public ::std::unary_function< FilterGroupEntryReferrer::value_type, void > + struct AppendWildcardToDescriptor { protected: ::std::vector< OUString > aWildCards; @@ -524,7 +524,7 @@ namespace sfx2 MapGroupEntry2GroupEntry; // this is not really a map - it's just called this way because it is used as a map - struct FindGroupEntry : public ::std::unary_function< MapGroupEntry2GroupEntry::value_type, sal_Bool > + struct FindGroupEntry { FilterGroupEntryReferrer::mapped_type aLookingFor; explicit FindGroupEntry( FilterGroupEntryReferrer::mapped_type const & _rLookingFor ) : aLookingFor( _rLookingFor ) { } @@ -535,7 +535,7 @@ namespace sfx2 } }; - struct CopyGroupEntryContent : public ::std::unary_function< MapGroupEntry2GroupEntry::value_type, void > + struct CopyGroupEntryContent { void operator() ( const MapGroupEntry2GroupEntry::value_type& _rMapEntry ) { @@ -544,7 +544,7 @@ namespace sfx2 }; - struct CopyNonEmptyFilter : public ::std::unary_function< FilterDescriptor, void > + struct CopyNonEmptyFilter { FilterGroup& rTarget; explicit CopyNonEmptyFilter( FilterGroup& _rTarget ) :rTarget( _rTarget ) { } @@ -716,7 +716,7 @@ namespace sfx2 } - struct AppendFilter : public ::std::unary_function< FilterDescriptor, void > + struct AppendFilter { protected: Reference< XFilterManager > m_xFilterManager; @@ -786,7 +786,7 @@ namespace sfx2 // = filling an XFilterManager - struct AppendFilterGroup : public ::std::unary_function< FilterGroup, void > + struct AppendFilterGroup { protected: Reference< XFilterManager > m_xFilterManager; diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx index b1dc8c21ab7d..c50034e8ab7a 100644 --- a/sfx2/source/doc/sfxmodelfactory.cxx +++ b/sfx2/source/doc/sfxmodelfactory.cxx @@ -30,7 +30,6 @@ #include <osl/diagnose.h> #include <algorithm> -#include <functional> namespace sfx2 @@ -121,7 +120,7 @@ namespace sfx2 namespace { - struct IsSpecialArgument : public ::std::unary_function< Any, bool > + struct IsSpecialArgument { static bool isSpecialArgumentName( const OUString& _rValueName ) { diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index d33500735977..3bff687982dc 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -25,7 +25,6 @@ #include <malloc.h> #include <algorithm> -#include <functional> #include <memory> #include <string.h> @@ -325,7 +324,7 @@ bool isZipStream(StreamInterface *stream) namespace internal { /* for case in-sensitive string comparison */ -struct stricmp : public std::unary_function<std::string, bool> +struct stricmp { explicit stricmp(const std::string &str) : str_(str) {} diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index 30449a965d09..607e79b973af 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -36,8 +36,6 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <functional> - using namespace ::com::sun::star; @@ -578,7 +576,7 @@ namespace slideshow }; //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/slideshow/source/inc/eventqueue.hxx b/slideshow/source/inc/eventqueue.hxx index 613135b0d1c0..76c7eecbda3c 100644 --- a/slideshow/source/inc/eventqueue.hxx +++ b/slideshow/source/inc/eventqueue.hxx @@ -25,7 +25,6 @@ #include "event.hxx" -#include <functional> #include <queue> #include <vector> @@ -121,7 +120,7 @@ namespace slideshow private: mutable ::osl::Mutex maMutex; - struct EventEntry : public ::std::unary_function<EventEntry, bool> + struct EventEntry { EventSharedPtr pEvent; double nTime; diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx index 0b8337764857..646c646e7d62 100644 --- a/slideshow/source/inc/tools.hxx +++ b/slideshow/source/inc/tools.hxx @@ -38,7 +38,6 @@ #include "hslcolor.hxx" #include <memory> -#include <functional> #include <cstdlib> #include <string.h> #include <algorithm> @@ -78,7 +77,7 @@ namespace slideshow // xxx todo: remove with boost::hash when 1.33 is available template <typename T> - struct hash : ::std::unary_function<T, ::std::size_t> + struct hash { ::std::size_t operator()( T const& val ) const { return hash_value(val); diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 0c4fe1e7a53d..516f19ed98f6 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -270,7 +270,7 @@ namespace svl { namespace undo { namespace impl typedef void ( SfxUndoListener::*UndoListenerVoidMethod )(); typedef void ( SfxUndoListener::*UndoListenerStringMethod )( const OUString& ); - struct NotifyUndoListener : public ::std::unary_function< SfxUndoListener*, void > + struct NotifyUndoListener { explicit NotifyUndoListener( UndoListenerVoidMethod i_notificationMethod ) :m_notificationMethod( i_notificationMethod ) diff --git a/svtools/source/brwbox/brwimpl.hxx b/svtools/source/brwbox/brwimpl.hxx index ed1de0cec294..e494a7bd400e 100644 --- a/svtools/source/brwbox/brwimpl.hxx +++ b/svtools/source/brwbox/brwimpl.hxx @@ -23,7 +23,6 @@ #include <com/sun/star/lang/XComponent.hpp> #include <map> -#include <functional> namespace svt { @@ -33,7 +32,7 @@ namespace svt public: typedef ::std::map< sal_Int32, css::uno::Reference< css::accessibility::XAccessible > > THeaderCellMap; - struct THeaderCellMapFunctorDispose : ::std::unary_function<THeaderCellMap::value_type,void> + struct THeaderCellMapFunctorDispose { void operator()(const THeaderCellMap::value_type& _aType) { diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 76fb434aaa6c..43eaf9aadba1 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -183,7 +183,7 @@ bool SvTreeList::IsChild(const SvTreeListEntry* pParent, const SvTreeListEntry* namespace { -class FindByPointer : public std::unary_function<SvTreeListEntry, bool> +class FindByPointer { const SvTreeListEntry* mpEntry; public: diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx index dbc04f23c7f7..3e71eceac0f2 100644 --- a/svtools/source/contnr/treelistentry.cxx +++ b/svtools/source/contnr/treelistentry.cxx @@ -165,7 +165,7 @@ SvLBoxItem& SvTreeListEntry::GetItem( size_t nPos ) namespace { -class FindByType : public std::unary_function<SvLBoxItem, void> +class FindByType { SvLBoxItemType meType; public: @@ -176,7 +176,7 @@ public: } }; -class FindByPointer : public std::unary_function<SvLBoxItem, void> +class FindByPointer { const SvLBoxItem* mpItem; public: diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index a02890d5cfbe..ee034242c89a 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -360,7 +360,7 @@ std::vector<double> GetDashing( SvxBorderLineStyle nDashing ) namespace { -class ApplyScale : public std::unary_function<double, void> +class ApplyScale { double mfScale; public: diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx index 8e1c15016da4..4766e3540feb 100644 --- a/svtools/source/misc/dialogcontrolling.cxx +++ b/svtools/source/misc/dialogcontrolling.cxx @@ -21,7 +21,6 @@ #include <vcl/window.hxx> #include <algorithm> -#include <functional> namespace svt @@ -144,7 +143,7 @@ namespace svt namespace { - struct ResetDialogController : public ::std::unary_function< const std::shared_ptr<DialogController>&, void > + struct ResetDialogController { void operator()( const std::shared_ptr<DialogController>& _pController ) { diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index c2a1dee516ad..140a63c0850d 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -172,7 +172,7 @@ namespace svt /// sorts the sib contents of a TemplateFolderContent - struct SubContentSort : public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > + struct SubContentSort { void operator() ( TemplateFolderContent& _rFolder ) const { @@ -254,9 +254,7 @@ namespace svt }; - struct StoreContentURL - :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > - ,public StorageHelper + struct StoreContentURL : public StorageHelper { uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; @@ -279,9 +277,7 @@ namespace svt /// functor which stores the complete content of a TemplateContent - struct StoreFolderContent - :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > - ,public StorageHelper + struct StoreFolderContent : public StorageHelper { uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; @@ -327,9 +323,7 @@ namespace svt /// functor which reads a complete TemplateContent instance - struct ReadFolderContent - :public ::std::unary_function< ::rtl::Reference< TemplateContent >, void > - ,public StorageHelper + struct ReadFolderContent : public StorageHelper { uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs; diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index f933056909d1..d38b26a68319 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -332,7 +332,7 @@ namespace accessibility } // functor for sending child events (no stand-alone function, they are maybe not inlined) - class AccessibleTextHelper_OffsetChildIndex : public ::std::unary_function< ::accessibility::AccessibleEditableTextPara&, void > + class AccessibleTextHelper_OffsetChildIndex { public: explicit AccessibleTextHelper_OffsetChildIndex( sal_Int32 nDifference ) : mnDifference(nDifference) {} @@ -828,8 +828,7 @@ namespace accessibility } // functor for checking changes in paragraph bounding boxes (no stand-alone function, maybe not inlined) - class AccessibleTextHelper_UpdateChildBounds : public ::std::unary_function< const ::accessibility::AccessibleParaManager::WeakChild&, - ::accessibility::AccessibleParaManager::WeakChild > + class AccessibleTextHelper_UpdateChildBounds { public: explicit AccessibleTextHelper_UpdateChildBounds() {} @@ -880,7 +879,7 @@ namespace accessibility #endif // functor for sending child events (no stand-alone function, they are maybe not inlined) - class AccessibleTextHelper_LostChildEvent : public ::std::unary_function< const ::accessibility::AccessibleParaManager::WeakChild&, void > + class AccessibleTextHelper_LostChildEvent { public: explicit AccessibleTextHelper_LostChildEvent( AccessibleTextHelper_Impl& rImpl ) : mrImpl(rImpl) {} @@ -975,7 +974,7 @@ namespace accessibility } // functor for sending child events (no stand-alone function, they are maybe not inlined) - class AccessibleTextHelper_ChildrenTextChanged : public ::std::unary_function< ::accessibility::AccessibleEditableTextPara&, void > + class AccessibleTextHelper_ChildrenTextChanged { public: void operator()( ::accessibility::AccessibleEditableTextPara& rPara ) @@ -989,7 +988,7 @@ namespace accessibility Reacts on SfxHintId::TextParaInserted/REMOVED events and stores their content */ - class AccessibleTextHelper_QueueFunctor : public ::std::unary_function< const SfxHint*, void > + class AccessibleTextHelper_QueueFunctor { public: AccessibleTextHelper_QueueFunctor() : diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 54777d9ebe8d..89518e9de4ac 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -499,7 +499,7 @@ IMPL_LINK_NOARG( FormController, OnActivateTabOrder, Timer*, void ) } -struct UpdateAllListeners : public ::std::unary_function< Reference< XDispatch >, bool > +struct UpdateAllListeners { bool operator()( const Reference< XDispatch >& _rxDispatcher ) const { @@ -699,7 +699,7 @@ Sequence< OUString> const & FormController::getSupportedServiceNames_Static() namespace { - struct ResetComponentText : public ::std::unary_function< Reference< XTextComponent >, void > + struct ResetComponentText { void operator()( const Reference< XTextComponent >& _rxText ) { @@ -707,7 +707,7 @@ namespace } }; - struct RemoveComponentTextListener : public ::std::unary_function< Reference< XTextComponent >, void > + struct RemoveComponentTextListener { explicit RemoveComponentTextListener( const Reference< XTextListener >& _rxListener ) :m_xListener( _rxListener ) diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index ccfde930f8a4..30996bfd7062 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -35,7 +35,6 @@ #include <cppuhelper/exc_hlp.hxx> #include <osl/diagnose.h> -#include <functional> #include <algorithm> @@ -117,7 +116,7 @@ namespace svx namespace { - struct MatchFeatureDescriptionByURL : public ::std::unary_function< FeatureDescription, bool > + struct MatchFeatureDescriptionByURL { const OUString& m_rURL; explicit MatchFeatureDescriptionByURL( const OUString& _rURL ) :m_rURL( _rURL ) { } @@ -129,7 +128,7 @@ namespace svx }; - struct MatchFeatureDescriptionBySlotId : public ::std::unary_function< FeatureDescription, bool > + struct MatchFeatureDescriptionBySlotId { sal_Int32 m_nSlotId; explicit MatchFeatureDescriptionBySlotId( sal_Int32 _nSlotId ) :m_nSlotId( _nSlotId ) { } @@ -141,7 +140,7 @@ namespace svx }; - struct MatchFeatureDescriptionByFormFeature : public ::std::unary_function< FeatureDescription, bool > + struct MatchFeatureDescriptionByFormFeature { sal_Int32 m_nFormFeature; explicit MatchFeatureDescriptionByFormFeature( sal_Int32 _nFormFeature ) :m_nFormFeature( _nFormFeature ) { } @@ -153,7 +152,7 @@ namespace svx }; - struct FormFeatureToSlotId : public ::std::unary_function< sal_Int16, sal_Int32 > + struct FormFeatureToSlotId { sal_Int32 operator()( sal_Int16 FormFeature ) { diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx index d837d841fbb9..98914d73e9fa 100644 --- a/sw/source/core/unocore/XMLRangeHelper.cxx +++ b/sw/source/core/unocore/XMLRangeHelper.cxx @@ -23,7 +23,6 @@ #include <osl/diagnose.h> #include <algorithm> -#include <functional> namespace { @@ -31,7 +30,7 @@ namespace array (which you can get from an OUString with getStr()) and puts the result into the OUStringBuffer given in the CTOR */ -class lcl_Escape : public std::unary_function< sal_Unicode, void > +class lcl_Escape { public: explicit lcl_Escape( OUStringBuffer & aResultBuffer ) : m_aResultBuffer( aResultBuffer ) {} @@ -54,7 +53,7 @@ private: you can get from an OUString with getStr()) and puts the result into the OUStringBuffer given in the CTOR */ -class lcl_UnEscape : public std::unary_function< sal_Unicode, void > +class lcl_UnEscape { public: explicit lcl_UnEscape( OUStringBuffer & aResultBuffer ) : m_aResultBuffer( aResultBuffer ) {} diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index c12f5ef6817a..c6621ddf5ce5 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -151,7 +151,7 @@ namespace } //Utility to test if a frame is anchored at a given node index - class anchoredto: public std::unary_function<const ww8::Frame&, bool> + class anchoredto { private: sal_uLong mnNode; @@ -720,8 +720,7 @@ namespace sw maStack.push_back(new SwFltStackEntry(rPos,rAttr.Clone())); } - class SameOpenRedlineType : - public std::unary_function<const SwFltStackEntry*, bool> + class SameOpenRedlineType { private: RedlineType_t meType; diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 199e6f88107c..dcc9aaaabe75 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -24,7 +24,6 @@ #include <IDocumentStylePoolAccess.hxx> #include <algorithm> -#include <functional> #include <rtl/tencinfo.h> @@ -322,7 +321,6 @@ namespace myImplHelpers //Utility to remove entries before a given starting position class IfBeforeStart - : public std::unary_function<const sw::util::CharRunEntry&, bool> { private: sal_Int32 mnStart; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 536c1dc99783..c732c0831786 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -35,7 +35,6 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <algorithm> -#include <functional> #include <hintids.hxx> #include <editeng/fontitem.hxx> #include <editeng/lrspitem.hxx> @@ -442,7 +441,7 @@ SprmResult WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, return maSprmParser.findSprmData(nId, &rSprms, nLen); } -class ListWithId : public std::unary_function<const WW8LSTInfo *, bool> +class ListWithId { private: sal_uInt32 mnIdLst; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index e8b63c9352c8..0341eb26eb80 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -24,7 +24,6 @@ #include <cassert> #include <cstddef> #include <cstring> -#include <functional> #include <algorithm> #include <i18nlangtag/mslangid.hxx> @@ -2795,8 +2794,7 @@ void WW8PLCFx::SetIdx2(sal_uInt32) { } -class SamePos : - public std::unary_function<const WW8PLCFx_Fc_FKP::WW8Fkp *, bool> +class SamePos { private: long mnPo; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 4848aeccc645..1c23d54cb857 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1335,7 +1335,7 @@ void SwPostItMgr::RemoveSidebarWin() PreparePageContainer(); } -class FilterFunctor : public std::unary_function<const SwFormatField*, bool> +class FilterFunctor { public: virtual bool operator()(const SwFormatField* pField) const = 0; diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 1589c8e3ff12..dadeeac23c6d 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -55,7 +55,6 @@ #include <map> #include <algorithm> -#include <functional> #include "tools/urlobj.hxx" #include "osl/file.hxx" #include "toolkit/controls/dialogcontrol.hxx" @@ -98,7 +97,7 @@ namespace // functor for disposing a control model -struct DisposeControlModel : public ::std::unary_function< Reference< XControlModel >, void > +struct DisposeControlModel { void operator()( Reference< XControlModel >& _rxModel ) { @@ -115,7 +114,7 @@ struct DisposeControlModel : public ::std::unary_function< Reference< XControlMo // functor for searching control model by name -struct FindControlModel : public ::std::unary_function< ControlModelContainerBase::UnoControlModelHolder, bool > +struct FindControlModel { private: const OUString& m_rName; @@ -131,7 +130,7 @@ public: // functor for cloning a control model, and insertion into a target list -struct CloneControlModel : public ::std::unary_function< ControlModelContainerBase::UnoControlModelHolder, void > +struct CloneControlModel { private: ControlModelContainerBase::UnoControlModelHolderList& m_rTargetList; @@ -154,7 +153,7 @@ public: // functor for comparing a XControlModel with a given reference -struct CompareControlModel : public ::std::unary_function< ControlModelContainerBase::UnoControlModelHolder, bool > +struct CompareControlModel { private: Reference< XControlModel > m_xReference; diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index 5cd187c2fd42..e7824d416f5c 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -501,7 +501,7 @@ }; - struct PropertyNameEqual : public ::std::unary_function< Property, bool > + struct PropertyNameEqual { const OUString& m_rCompare; explicit PropertyNameEqual( const OUString& _rCompare ) : m_rCompare( _rCompare ) { } @@ -584,7 +584,7 @@ } - struct Int32Equal : public ::std::unary_function< sal_Int32, bool > + struct Int32Equal { sal_Int32 m_nCompare; explicit Int32Equal( sal_Int32 _nCompare ) : m_nCompare( _nCompare ) { } diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index bf131832726e..a173d18afb39 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -59,7 +59,6 @@ #include <tools/time.hxx> #include <algorithm> -#include <functional> #include "helper/imagealign.hxx" #include "helper/unopropertyarrayhelper.hxx" @@ -2067,7 +2066,7 @@ struct ListItem typedef beans::Pair< OUString, OUString > UnoListItem; -struct StripItemData : public ::std::unary_function< ListItem, UnoListItem > +struct StripItemData { UnoListItem operator()( const ListItem& i_rItem ) { @@ -2221,7 +2220,7 @@ uno::Reference< beans::XPropertySetInfo > UnoControlListBoxModel::getPropertySet namespace { - struct CreateListItem : public ::std::unary_function< OUString, ListItem > + struct CreateListItem { ListItem operator()( const OUString& i_rItemText ) { diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 378c402db518..2c561322aec8 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -99,7 +99,7 @@ namespace ucb { namespace ucp { namespace ext } - struct SelectPropertyName : public ::std::unary_function< Property, OUString > + struct SelectPropertyName { const OUString& operator()( const Property& i_rProperty ) const { diff --git a/unotools/source/config/configvaluecontainer.cxx b/unotools/source/config/configvaluecontainer.cxx index 60d0cfe081ea..d19c87c7b9c5 100644 --- a/unotools/source/config/configvaluecontainer.cxx +++ b/unotools/source/config/configvaluecontainer.cxx @@ -141,7 +141,7 @@ namespace utl //= functors on NodeValueAccessor instances /// base class for functors synchronizing between exchange locations and config sub nodes - struct SubNodeAccess : public ::std::unary_function< NodeValueAccessor, void > + struct SubNodeAccess { protected: const OConfigurationNode& m_rRootNode; diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 920c52aa1327..1b2fa29c2fe5 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -25,7 +25,6 @@ #include <memory> #include <set> #include <iterator> -#include <functional> #include <algorithm> #include <boost/optional.hpp> @@ -584,7 +583,7 @@ librdf_QuerySelectResult::hasMoreElements() return !librdf_query_results_finished(m_pQueryResult.get()); } -class NodeArrayDeleter : public std::unary_function<librdf_node**, void> +class NodeArrayDeleter { const int m_Count; diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx index 6abae73f4826..9dac8f81b913 100644 --- a/vcl/source/app/IconThemeInfo.cxx +++ b/vcl/source/app/IconThemeInfo.cxx @@ -154,8 +154,7 @@ IconThemeInfo::ThemeIdToDisplayName(const OUString& themeId) namespace { - class SameTheme : - public std::unary_function<const vcl::IconThemeInfo &, bool> + class SameTheme { private: const OUString& m_rThemeId; diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx index 6eca72f41f86..4d45a915d012 100644 --- a/vcl/source/app/IconThemeScanner.cxx +++ b/vcl/source/app/IconThemeScanner.cxx @@ -175,8 +175,7 @@ IconThemeScanner::~IconThemeScanner() namespace { - class SameTheme : - public std::unary_function<const vcl::IconThemeInfo &, bool> + class SameTheme { private: const OUString& m_rThemeId; diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx index 95ee517b6f21..2f976d9cb8c0 100644 --- a/vcl/source/app/IconThemeSelector.cxx +++ b/vcl/source/app/IconThemeSelector.cxx @@ -20,8 +20,7 @@ namespace vcl { namespace { - class SameTheme : - public std::unary_function<const vcl::IconThemeInfo &, bool> + class SameTheme { private: const OUString& m_rThemeId; diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index e14af356bdb8..b913028f9ca4 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -439,7 +439,7 @@ dialog_remove_buttons( GtkDialog *pDialog ) namespace { - struct FilterTitleMatch : public ::std::unary_function< FilterEntry, bool > + struct FilterTitleMatch { protected: const OUString& rTitle; diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 5d1752058a26..2e76077521fc 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -78,7 +78,7 @@ namespace { "PIXMAP", "image/bmp" } }; - class DataFlavorEq : public std::unary_function<const css::datatransfer::DataFlavor&, bool> + class DataFlavorEq { private: const css::datatransfer::DataFlavor& m_rData; diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 74ff16fb6d31..aad2d6539569 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -273,7 +273,7 @@ public: namespace { -class lcl_MatchesRole : public ::std::unary_function< Reference< chart2::data::XLabeledDataSequence >, bool > +class lcl_MatchesRole { public: explicit lcl_MatchesRole( const OUString & aRole ) : @@ -702,12 +702,10 @@ struct lcl_TableData typedef ::std::map< sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair > lcl_DataSequenceMap; -struct lcl_SequenceToMapElement : - public ::std::unary_function< lcl_DataSequenceMap::mapped_type, lcl_DataSequenceMap::value_type > +struct lcl_SequenceToMapElement { - lcl_SequenceToMapElement() - {} - result_type operator() ( const argument_type & rContent ) + std::pair<const sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair> + operator() (const SchXMLExportHelper_Impl::tLabelValuesDataPair& rContent) { sal_Int32 nIndex = -1; if( rContent.second.is()) //has values @@ -717,7 +715,7 @@ struct lcl_SequenceToMapElement : } else if( rContent.first.is()) //has labels nIndex = rContent.first->getSourceRangeRepresentation().copy( sizeof("label ")).toInt32(); - return result_type( nIndex, rContent ); + return std::make_pair(nIndex, rContent); } }; diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 10d8fc105b39..8c44d3f65702 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -60,7 +60,7 @@ using ::com::sun::star::uno::Sequence; namespace { -class lcl_MatchesChartType : public ::std::unary_function< Reference< chart2::XChartType >, bool > +class lcl_MatchesChartType { public: explicit lcl_MatchesChartType( const OUString & aChartTypeName ) : diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 9fe693cd0bb0..ba69c3a50456 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -65,7 +65,7 @@ using com::sun::star::uno::Reference; namespace { -struct lcl_AxisHasCategories : public ::std::unary_function< SchXMLAxis, bool > +struct lcl_AxisHasCategories { bool operator() ( const SchXMLAxis & rAxis ) { diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index ae92040a00c2..0d42dcebc3a9 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -63,7 +63,7 @@ const char aCategoriesRange[] = "categories"; typedef ::std::multimap< OUString, OUString > lcl_tOriginalRangeToInternalRangeMap; -struct lcl_ApplyCellToData : public ::std::unary_function< SchXMLCell, void > +struct lcl_ApplyCellToData { explicit lcl_ApplyCellToData( Sequence< double > & rOutData ) : m_rData( rOutData ), diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index a4234a0b9056..322297d81672 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -50,7 +50,6 @@ #include <comphelper/sequence.hxx> #include <algorithm> -#include <functional> namespace xmloff { @@ -1404,7 +1403,7 @@ namespace xmloff simulateDefaultedAttribute(OAttributeMetaData::getDatabaseAttributeName(DAFlags::ConvertEmpty), PROPERTY_EMPTY_IS_NULL, "false"); } - struct EqualHandle : public ::std::unary_function< PropertyValue, bool > + struct EqualHandle { const sal_Int32 m_nHandle; explicit EqualHandle( sal_Int32 _nHandle ) : m_nHandle( _nHandle ) { } @@ -1457,7 +1456,7 @@ namespace xmloff // since this is the default of this property, anyway. } - struct EqualName : public ::std::unary_function< PropertyValue, bool > + struct EqualName { const OUString & m_sName; explicit EqualName( const OUString& _rName ) : m_sName( _rName ) { } diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index f81142640929..cd673bc58965 100644 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.cxx @@ -34,7 +34,6 @@ #include "strings.hxx" #include <osl/diagnose.h> -#include <functional> #include <algorithm> namespace xmloff @@ -80,7 +79,7 @@ namespace return getTypedModelNode< XModel >( _rxModelNode ); } - struct StringCompare : public ::std::unary_function< OUString, bool > + struct StringCompare { private: const OUString & m_sReference; diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index 496a929b5cc8..3a8c8dabea28 100644 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -123,7 +123,7 @@ namespace xmloff { namespace metadata return s_reverseTokenLookup; } - struct AttributeHash : public ::std::unary_function< AttributeDescription, size_t > + struct AttributeHash { size_t operator()( const AttributeDescription& i_attribute ) const { diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index b1f8b60c50dc..9829030d9d17 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -151,7 +151,6 @@ namespace }; struct FrameRefHash - : public unary_function<Reference<XTextFrame>, size_t> { size_t operator()(const Reference<XTextFrame>& rFrame) const { return sal::static_int_cast<size_t>(reinterpret_cast<sal_uIntPtr>(rFrame.get())); } |