diff options
Diffstat (limited to 'connectivity/source/drivers/ado/AConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/ado/AConnection.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 6596b9b8d946..0ab23e892db1 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,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; @@ -158,7 +161,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV ::dbtools::throwFunctionSequenceException(*this); } - catch(const Exception ) + catch(const Exception& ) { osl_decrementInterlockedCount( &m_refCount ); throw; @@ -352,7 +355,7 @@ void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLE eIso = adXactSerializable; break; default: - OSL_ENSURE(0,"OConnection::setTransactionIsolation invalid level"); + OSL_FAIL("OConnection::setTransactionIsolation invalid level"); return; } m_pAdoConnection->put_IsolationLevel(eIso); @@ -384,7 +387,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, nRet = TransactionIsolation::SERIALIZABLE; break; default: - OSL_ENSURE(0,"OConnection::setTransactionIsolation invalid level"); + OSL_FAIL("OConnection::setTransactionIsolation invalid level"); } ADOS::ThrowException(*m_pAdoConnection,*this); return nRet; @@ -579,8 +582,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r { // we can not assert here because we could be in d&d /* - OSL_ENSURE(sal_False, - ( ::rtl::OString("getTypeInfoFromType: assuming column type ") + OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ") += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString("\" (expected type name ") += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) @@ -609,11 +611,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()) @@ -628,3 +630,4 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |