diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-08 17:39:27 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-02-08 17:41:57 +0100 |
commit | 4d94306389349a57b50523a692f261de7e2489d4 (patch) | |
tree | 0a7a8ab9dda4ee3cfe51473d45fbeb85af0ff462 | |
parent | c3f695ed034e09014fee0604b749d7da2fb11045 (diff) |
Port stuff to our private implementation of SGI extensions
-rw-r--r-- | connectivity/source/commontools/TSortIndex.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/commontools/TTableHelper.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AColumn.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AColumns.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AConnection.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 10 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HStorageMap.cxx | 10 | ||||
-rw-r--r-- | connectivity/source/drivers/odbcbase/OResultSet.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/manager/mdrivermanager.cxx | 9 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 11 | ||||
-rw-r--r-- | ucb/source/ucp/odma/odma_provider.cxx | 6 |
11 files changed, 51 insertions, 32 deletions
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 6f9022dd0b8a..58fc536cee49 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -30,7 +30,8 @@ #include "precompiled_connectivity.hxx" #include "TSortIndex.hxx" #include <algorithm> -#include <functional> + +#include <o3tl/compat_functional.hxx> using namespace connectivity; //------------------------------------------------------------------ @@ -95,7 +96,7 @@ struct TKeyValueFunc : ::std::binary_function<OSortIndex::TIntValuePairVector::v ::std::transform(m_aKeyValues.begin() ,m_aKeyValues.end() ,::std::back_inserter(pKeySet->get()) - ,::std::select1st<TIntValuePairVector::value_type>()); + ,::o3tl::select1st<TIntValuePairVector::value_type>()); pKeySet->setFrozen(); return pKeySet; } diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index e7041a5ea05b..6a8161da314b 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -45,6 +45,8 @@ #include <unotools/sharedunocomponent.hxx> #include "TConnection.hxx" +#include <o3tl/compat_functional.hxx> + using namespace ::comphelper; using namespace connectivity; using namespace ::com::sun::star::uno; @@ -302,7 +304,7 @@ void OTableHelper::refreshColumns() aSortedColumns.begin(), aSortedColumns.end(), ::std::insert_iterator< TStringVector >( aVector, aVector.begin() ), - ::std::select2nd< ::std::map< OrdinalPosition, ::rtl::OUString >::value_type >() + ::o3tl::select2nd< ::std::map< OrdinalPosition, ::rtl::OUString >::value_type >() ); } diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index a16747632c8b..7ac506d99cae 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -38,6 +38,8 @@ #include <comphelper/types.hxx> #include "ado/ACatalog.hxx" +#include <o3tl/compat_functional.hxx> + using namespace ::comphelper; using namespace connectivity::ado; @@ -225,11 +227,11 @@ void OAdoColumn::fillPropertyValues() ::comphelper::TStringMixEqualFunctor aCase(sal_False); OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(), pTypeInfoMap->end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(aCase, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VarBinary"))), - ::std::compose1( + ::o3tl::compose1( ::std::mem_fun(&OExtendedTypeInfo::getDBName), - ::std::select2nd<OTypeInfoMap::value_type>()) + ::o3tl::select2nd<OTypeInfoMap::value_type>()) ) ); diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx index 377667bc863b..f2b7d0f146c1 100644 --- a/connectivity/source/drivers/ado/AColumns.cxx +++ b/connectivity/source/drivers/ado/AColumns.cxx @@ -44,6 +44,8 @@ #endif #include "resource/ado_res.hrc" +#include <o3tl/compat_functional.hxx> + using namespace connectivity::ado; using namespace connectivity; using namespace comphelper; @@ -95,11 +97,11 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString&, const Referenc // search for typeinfo where the typename is equal sTypeName OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(), pTypeInfoMap->end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(aCase, sTypeName), - ::std::compose1( + ::o3tl::compose1( ::std::mem_fun(&OExtendedTypeInfo::getDBName), - ::std::select2nd<OTypeInfoMap::value_type>()) + ::o3tl::select2nd<OTypeInfoMap::value_type>()) ) ); diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 87e7c927a9e9..058ad8094703 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -44,6 +44,8 @@ #include <osl/file.hxx> #include "resource/ado_res.hrc" +#include <o3tl/compat_functional.hxx> + using namespace dbtools; using namespace connectivity::ado; using namespace com::sun::star::uno; @@ -605,11 +607,11 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r // search for typeinfo where the typename is equal _sTypeName OTypeInfoMap::const_iterator aFind = ::std::find_if(_rTypeInfo.begin(), _rTypeInfo.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(aCase, _sTypeName), - ::std::compose1( + ::o3tl::compose1( ::std::mem_fun(&OExtendedTypeInfo::getDBName), - ::std::select2nd<OTypeInfoMap::value_type>()) + ::o3tl::select2nd<OTypeInfoMap::value_type>()) ) ); if(aFind != _rTypeInfo.end()) diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 215f3990fe2c..2a2b33a65154 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -57,6 +57,8 @@ #include "resource/hsqldb_res.hrc" #include "resource/sharedresources.hxx" +#include <o3tl/compat_functional.hxx> + //........................................................................ namespace connectivity { @@ -573,9 +575,9 @@ namespace connectivity if ( xStorage.is() ) { ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage); - TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1( + TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1( ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey) - ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >()))); + ,::o3tl::compose1(::o3tl::select1st<TWeakConnectionPair>(),::o3tl::select2nd< TWeakPair >()))); if ( i != m_aConnections.end() ) shutdownConnection(i); } @@ -609,9 +611,9 @@ namespace connectivity ::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage); if ( sKey.getLength() ) { - TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::std::compose1( + TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1( ::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey) - ,::std::compose1(::std::select1st<TWeakConnectionPair>(),::std::select2nd< TWeakPair >()))); + ,::o3tl::compose1(::o3tl::select1st<TWeakConnectionPair>(),::o3tl::select2nd< TWeakPair >()))); OSL_ENSURE( i != m_aConnections.end(), "ODriverDelegator::preCommit: they're committing a storage which I do not know!" ); if ( i != m_aConnections.end() ) { diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 9f5a1dbd44b7..2c99cc3a50b8 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -37,6 +37,8 @@ #include "diagnose_ex.h" #include <osl/thread.h> +#include <o3tl/compat_functional.hxx> + //........................................................................ namespace connectivity { @@ -185,9 +187,9 @@ namespace connectivity TStorages& rMap = lcl_getStorageMap(); // check if the storage is already in our map TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(::std::equal_to<Reference<XStorage> >(),_xStorage) - ,::std::compose1(::std::select1st<TStorageURLPair>(),::std::compose1(::std::select1st<TStorages::mapped_type>(),::std::select2nd<TStorages::value_type>()))) + ,::o3tl::compose1(::o3tl::select1st<TStorageURLPair>(),::o3tl::compose1(::o3tl::select1st<TStorages::mapped_type>(),::o3tl::select2nd<TStorages::value_type>()))) ); if ( aFind == rMap.end() ) { @@ -216,9 +218,9 @@ namespace connectivity TStorages& rMap = lcl_getStorageMap(); // check if the storage is already in our map TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(::std::equal_to<Reference<XStorage> >(),_xStorage) - ,::std::compose1(::std::select1st<TStorageURLPair>(),::std::compose1(::std::select1st<TStorages::mapped_type>(),::std::select2nd<TStorages::value_type>()))) + ,::o3tl::compose1(::o3tl::select1st<TStorageURLPair>(),::o3tl::compose1(::o3tl::select1st<TStorages::mapped_type>(),::o3tl::select2nd<TStorages::value_type>()))) ); if ( aFind != rMap.end() ) sKey = aFind->first; diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index 10c8949186eb..e93a465cea3b 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -48,6 +48,8 @@ #include "diagnose_ex.h" #include <rtl/logfile.hxx> +#include <o3tl/compat_functional.hxx> + using namespace ::comphelper; using namespace connectivity; using namespace connectivity::odbc; @@ -1150,7 +1152,7 @@ Any SAL_CALL OResultSet::getBookmark( ) throw( SQLException, RuntimeException) checkDisposed(OResultSet_BASE::rBHelper.bDisposed); TBookmarkPosMap::iterator aFind = ::std::find_if(m_aPosToBookmarks.begin(),m_aPosToBookmarks.end(), - ::std::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),m_nRowPos),::std::select2nd<TBookmarkPosMap::value_type>())); + ::o3tl::compose1(::std::bind2nd(::std::equal_to<sal_Int32>(),m_nRowPos),::o3tl::select2nd<TBookmarkPosMap::value_type>())); if ( aFind == m_aPosToBookmarks.end() ) { diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index 60c9001793e5..e541cc2f5dec 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -46,7 +46,8 @@ #include <osl/diagnose.h> #include <algorithm> -#include <functional> + +#include <o3tl/compat_functional.hxx> namespace drivermanager { @@ -142,7 +143,7 @@ Any SAL_CALL ODriverEnumeration::nextElement( ) throw(NoSuchElementException, W } }; - typedef ::std::unary_compose< ExtractDriverFromAccess, EnsureDriver > ExtractAfterLoad_BASE; + typedef ::o3tl::unary_compose< ExtractDriverFromAccess, EnsureDriver > ExtractAfterLoad_BASE; /// an STL functor which loads a driver described by a DriverAccess, and extracts the SdbcDriver struct ExtractAfterLoad : public ExtractAfterLoad_BASE { @@ -676,7 +677,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const ::rtl::OUStri aFind = ::std::find_if( m_aDriversBS.begin(), // begin of search range m_aDriversBS.end(), // end of search range - std::unary_compose< AcceptsURL, ExtractAfterLoad >( AcceptsURL( _rURL ), ExtractAfterLoad() ) + o3tl::unary_compose< AcceptsURL, ExtractAfterLoad >( AcceptsURL( _rURL ), ExtractAfterLoad() ) // compose two functors: extract the driver from the access, then ask the resulting driver for acceptance ); } // if ( m_aDriversBS.find(sDriverFactoryName ) == m_aDriversBS.end() ) @@ -697,7 +698,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const ::rtl::OUStri DriverCollectionIterator aPos = ::std::find_if( m_aDriversRT.begin(), // begin of search range m_aDriversRT.end(), // end of search range - std::unary_compose< AcceptsURL, ExtractDriverFromCollectionElement >( AcceptsURL( _rURL ), ExtractDriverFromCollectionElement() ) + o3tl::unary_compose< AcceptsURL, ExtractDriverFromCollectionElement >( AcceptsURL( _rURL ), ExtractDriverFromCollectionElement() ) // compose two functors: extract the driver from the access, then ask the resulting driver for acceptance ); diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 552744a30e02..36a5f301e9a5 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -94,7 +94,8 @@ #include <rtl/logfile.hxx> #include <algorithm> -#include <functional> + +#include <o3tl/compat_functional.hxx> using namespace ::com::sun::star; using namespace ::comphelper; @@ -522,7 +523,7 @@ struct UpdateAllListeners : public ::std::unary_function< Reference< XDispatch > bool operator()( const Reference< XDispatch >& _rxDispatcher ) const { static_cast< ::svx::OSingleFeatureDispatcher* >( _rxDispatcher.get() )->updateAllListeners(); - // the return is a dummy only so we can use this struct in a std::compose1 call + // the return is a dummy only so we can use this struct in a o3tl::compose1 call return true; } }; @@ -2651,9 +2652,9 @@ void FormController::updateAllDispatchers() const ::std::for_each( m_aFeatureDispatchers.begin(), m_aFeatureDispatchers.end(), - ::std::compose1( + ::o3tl::compose1( UpdateAllListeners(), - ::std::select2nd< DispatcherContainer::value_type >() + ::o3tl::select2nd< DispatcherContainer::value_type >() ) ); } @@ -4107,7 +4108,7 @@ void SAL_CALL FormController::invalidateAllFeatures( ) throw (RuntimeException) m_aFeatureDispatchers.begin(), m_aFeatureDispatchers.end(), aInterceptedFeatures.getArray(), - ::std::select1st< DispatcherContainer::value_type >() + ::o3tl::select1st< DispatcherContainer::value_type >() ); aGuard.clear(); diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index a5fb562a796e..e59fa2093ff3 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx @@ -44,6 +44,8 @@ #include <algorithm> #include <osl/file.hxx> +#include <o3tl/compat_functional.hxx> + using namespace com::sun::star; using namespace odma; @@ -505,9 +507,9 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp) ::rtl::Reference<ContentProperties> aReturn; ContentsMap::const_iterator aFind = ::std::find_if( m_aContents.begin(), m_aContents.end(), - ::std::compose1( + ::o3tl::compose1( ::std::bind2nd(_aFunctor,_sName), - ::std::select2nd<ContentsMap::value_type>() + ::o3tl::select2nd<ContentsMap::value_type>() ) ); if(aFind != m_aContents.end()) |