diff options
Diffstat (limited to 'connectivity/source/drivers/hsqldb/HDriver.cxx')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 3760b914cc1d..fcb3408a3c52 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.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. @@ -57,6 +58,8 @@ #include "resource/hsqldb_res.hrc" #include "resource/sharedresources.hxx" +#include <o3tl/compat_functional.hxx> + //........................................................................ namespace connectivity { @@ -191,11 +194,11 @@ namespace connectivity for (;pIter != pEnd; ++pIter) { - if ( pIter->Name.equalsAscii("Storage") ) + if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Storage")) ) { xStorage.set(pIter->Value,UNO_QUERY); } - else if ( pIter->Name.equalsAscii("URL") ) + else if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) ) { pIter->Value >>= sURL; } @@ -495,14 +498,14 @@ namespace connectivity //------------------------------------------------------------------------------ rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString::createFromAscii("com.sun.star.sdbcx.comp.hsqldb.Driver"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.comp.hsqldb.Driver")); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aSNS( 2 ); aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver")); - aSNS[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver"); + aSNS[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.Driver")); return aSNS; } //------------------------------------------------------------------ @@ -590,9 +593,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); } @@ -642,9 +645,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() ) { @@ -669,7 +672,7 @@ namespace connectivity } catch(Exception&) { - OSL_ENSURE( false, "ODriverDelegator::preCommit: caught an exception!" ); + OSL_FAIL( "ODriverDelegator::preCommit: caught an exception!" ); } } } @@ -820,7 +823,7 @@ namespace connectivity // second round, this time without matching the country return lcl_getCollationForLocale( _rLocaleString, true ); - OSL_ENSURE( false, "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" ); + OSL_FAIL( "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" ); return "Latin1_General"; } @@ -832,7 +835,7 @@ namespace connectivity { //......................................................... Reference< XMultiServiceFactory > xConfigProvider( - _rxORB->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ) ), + _rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ), UNO_QUERY ); OSL_ENSURE( xConfigProvider.is(), "lcl_getSystemLocale: could not create the config provider!" ); @@ -844,13 +847,13 @@ namespace connectivity // arguments for creating the config access Sequence< Any > aArguments(2); // the path to the node to open - ::rtl::OUString sNodePath = ::rtl::OUString::createFromAscii ("/org.openoffice.Setup/L10N" ); - aArguments[0] <<= PropertyValue( ::rtl::OUString::createFromAscii( "nodepath"), 0, + ::rtl::OUString sNodePath(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/L10N" )); + aArguments[0] <<= PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), 0, makeAny( sNodePath ), PropertyState_DIRECT_VALUE ); // the depth: -1 means unlimited aArguments[1] <<= PropertyValue( - ::rtl::OUString::createFromAscii( "depth"), 0, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), 0, makeAny( (sal_Int32)-1 ), PropertyState_DIRECT_VALUE ); @@ -858,7 +861,7 @@ namespace connectivity // create the access Reference< XPropertySet > xNode( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArguments ), UNO_QUERY ); OSL_ENSURE( xNode.is(), "lcl_getSystemLocale: invalid access returned (should throw an exception instead)!" ); @@ -870,7 +873,7 @@ namespace connectivity } catch( const Exception& ) { - OSL_ENSURE( sal_False, "lcl_getSystemLocale: caught an exception!" ); + OSL_FAIL( "lcl_getSystemLocale: caught an exception!" ); } if ( !sLocaleString.getLength() ) { @@ -908,7 +911,7 @@ namespace connectivity } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ODriverDelegator::onConnectedNewDatabase: caught an exception!" ); + OSL_FAIL( "ODriverDelegator::onConnectedNewDatabase: caught an exception!" ); } } @@ -918,3 +921,4 @@ namespace connectivity } // namespace connectivity //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |