summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-08 17:39:27 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-02-08 17:41:57 +0100
commit7b5eac17dd870e89525fea5390c343ffebd5cb47 (patch)
treef0e13e92eb4eed31a08761c1512eacbae6e16ad7
parent65f58500ce9ad96ace3be8636aba4f803069fc57 (diff)
Port stuff to our private implementation of SGI extensions
-rw-r--r--connectivity/source/commontools/TSortIndex.cxx5
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx4
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx8
-rw-r--r--connectivity/source/drivers/ado/AColumns.cxx8
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx8
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx10
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx10
-rw-r--r--connectivity/source/drivers/odbcbase/OResultSet.cxx4
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx9
-rw-r--r--svx/source/form/formcontroller.cxx11
-rw-r--r--ucb/source/ucp/odma/odma_provider.cxx6
11 files changed, 51 insertions, 32 deletions
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 31fe65d048..730b844e32 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 367f38803d..3462579f50 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 6c8bad76fd..d2b7b1dfee 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 9b2c82f052..dc230878f2 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 6f42c36413..7636fe9f7a 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 735d94aecf..753faa9e26 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 72722d5645..01bbc8131e 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 455c1ac8e2..8abf895edc 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 2ce0fa0c5e..fccc363efc 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 dd638cad27..87725e986e 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 7d2216a55e..b52d7df268 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())