summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado
diff options
context:
space:
mode:
authorJorenz Paragas <j.paragas.237@gmail.com>2015-07-10 21:07:51 -0700
committerMichael Stahl <mstahl@redhat.com>2015-07-13 12:23:30 +0000
commit6e7c923d632c757c9a38a724cad2d55a84755570 (patch)
treeace0b3e4a9239b57292eb0de90e600ab25a38ab5 /connectivity/source/drivers/ado
parenta5db487caaf026e648b34d0fab58376230c1cc47 (diff)
tdf#91112 replace o3tl::compose1 with lambdas in connectivity
Change-Id: I8f61471e08fe7f620d76bdcd72eb7f5c35931388 Reviewed-on: https://gerrit.libreoffice.org/16940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'connectivity/source/drivers/ado')
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx14
-rw-r--r--connectivity/source/drivers/ado/AColumns.cxx14
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx14
3 files changed, 13 insertions, 29 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 7a9769f0a6ae..81e18c5b1193 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -215,16 +215,10 @@ void OAdoColumn::fillPropertyValues()
else if ( eType == adVarBinary && ADOS::isJetEngine(m_pConnection->getEngineType()) )
{
::comphelper::UStringMixEqual aCase(sal_False);
- OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(),
- pTypeInfoMap->end(),
- ::o3tl::compose1(
- ::std::bind2nd(aCase, OUString("VarBinary")),
- ::o3tl::compose1(
- ::std::mem_fun(&OExtendedTypeInfo::getDBName),
- ::o3tl::select2nd<OTypeInfoMap::value_type>())
- )
-
- );
+ OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(), pTypeInfoMap->end(),
+ [&aCase] (OTypeInfoMap::value_type typeInfo) {
+ return aCase(typeInfo.second->getDBName(), OUString("VarBinary"));
+ });
if ( aFind != pTypeInfoMap->end() ) // change column type if necessary
{
diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx
index 936510f155e3..66af0bc58aeb 100644
--- a/connectivity/source/drivers/ado/AColumns.cxx
+++ b/connectivity/source/drivers/ado/AColumns.cxx
@@ -88,16 +88,10 @@ sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPro
const OTypeInfoMap* pTypeInfoMap = m_pConnection->getTypeInfo();
::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal sTypeName
- OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(),
- pTypeInfoMap->end(),
- ::o3tl::compose1(
- ::std::bind2nd(aCase, sTypeName),
- ::o3tl::compose1(
- ::std::mem_fun(&OExtendedTypeInfo::getDBName),
- ::o3tl::select2nd<OTypeInfoMap::value_type>())
- )
-
- );
+ OTypeInfoMap::const_iterator aFind = ::std::find_if(pTypeInfoMap->begin(), pTypeInfoMap->end(),
+ [&aCase, &sTypeName] (OTypeInfoMap::value_type typeInfo) {
+ return aCase(typeInfo.second->getDBName(), sTypeName);
+ });
if ( aFind != pTypeInfoMap->end() ) // change column type if necessary
aColumn.put_Type(aFind->first);
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 319bc688769e..463db7f4f833 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -598,15 +598,11 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
{
::comphelper::UStringMixEqual aCase(sal_False);
// search for typeinfo where the typename is equal _sTypeName
- OTypeInfoMap::const_iterator aFind = ::std::find_if(_rTypeInfo.begin(),
- _rTypeInfo.end(),
- ::o3tl::compose1(
- ::std::bind2nd(aCase, _sTypeName),
- ::o3tl::compose1(
- ::std::mem_fun(&OExtendedTypeInfo::getDBName),
- ::o3tl::select2nd<OTypeInfoMap::value_type>())
- )
- );
+ OTypeInfoMap::const_iterator aFind = ::std::find_if(_rTypeInfo.begin(), _rTypeInfo.end(),
+ [&aCase, &_sTypeName] (OTypeInfoMap::value_type typeInfo) {
+ return aCase(typeInfo.second->getDBName(), _sTypeName);
+ });
+
if(aFind != _rTypeInfo.end())
pTypeInfo = aFind->second;
}