From 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 15 Nov 2013 11:05:19 +0200 Subject: remove unnecessary use of OUString constructor when assigning change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4 --- connectivity/source/commontools/parameters.cxx | 6 +++--- connectivity/source/commontools/statementcomposer.cxx | 2 +- connectivity/source/drivers/hsqldb/HConnection.cxx | 2 +- connectivity/source/drivers/jdbc/DatabaseMetaData.cxx | 2 +- connectivity/source/drivers/mork/MDriver.cxx | 2 +- connectivity/source/drivers/mozab/MConnection.cxx | 10 +++++----- connectivity/source/drivers/mozab/MDriver.cxx | 2 +- connectivity/source/drivers/mozab/MServices.cxx | 4 ++-- .../source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index 678bdae536d1..aad82fea8d39 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -228,14 +228,14 @@ namespace dbtools // format is: // = : sFilter = quoteName( m_sIdentifierQuoteString, _rDetailLink ); - sFilter += OUString( " = :" ); + sFilter += " = :"; // generate a parameter name which is not already used - _rNewParamName = OUString( "link_from_" ); + _rNewParamName = "link_from_"; _rNewParamName += convertName2SQLName( _rMasterColumn, m_sSpecialCharacters ); while ( m_aParameterInformation.find( _rNewParamName ) != m_aParameterInformation.end() ) { - _rNewParamName += OUString( "_" ); + _rNewParamName += "_"; } return sFilter += _rNewParamName; diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index 51b492c8b8bd..791a06b23631 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -126,7 +126,7 @@ namespace dbtools if ( _rData.sCommand.isEmpty() ) break; - sStatement = OUString( "SELECT * FROM " ); + sStatement = "SELECT * FROM "; OUString sCatalog, sSchema, sTable; qualifiedNameComponents( _rData.xConnection->getMetaData(), _rData.sCommand, sCatalog, sSchema, sTable, eInDataManipulation ); diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index 40e9a8237fc3..f227e8124a82 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -358,7 +358,7 @@ namespace connectivity { namespace hsqldb // ask the provider to obtain a graphic Sequence< PropertyValue > aMediaProperties( 1 ); - aMediaProperties[0].Name = OUString( "URL" ); + aMediaProperties[0].Name = "URL"; aMediaProperties[0].Value <<= sImageURL; xGraphic = xProvider->queryGraphic( aMediaProperties ); OSL_ENSURE( xGraphic.is(), "OHsqlConnection::impl_getTextTableIcon_nothrow: the provider did not give us a graphic object!" ); diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index ce6d2fd00c4e..1b2499386911 100644 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx @@ -560,7 +560,7 @@ OUString java_sql_DatabaseMetaData::impl_callStringMethod( const char* _pMethodN { OUString sLoggedResult( sReturn ); if ( sLoggedResult.isEmpty() ) - sLoggedResult = OUString( "" ); + sLoggedResult = ""; m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, _pMethodName, sLoggedResult ); } diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx index 851e18e9a902..33a22aa90b6b 100644 --- a/connectivity/source/drivers/mork/MDriver.cxx +++ b/connectivity/source/drivers/mork/MDriver.cxx @@ -48,7 +48,7 @@ OUString MorkDriver::getImplementationName_Static( ) throw(css::uno::RuntimeExc css::uno::Sequence< OUString > MorkDriver::getSupportedServiceNames_Static( ) throw (css::uno::RuntimeException) { css::uno::Sequence< OUString > aSNS(1); - aSNS[0] = OUString( "com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index 685c13e84722..8440d50d9770 100644 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx @@ -192,8 +192,8 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& // * for windows system address book // "sdbc:address:outlookexp:" -> aboutlookdirectory://oe/ // - m_sBindDN = OUString( ""); - m_sPassword = OUString( ""); + m_sBindDN = ""; + m_sPassword = ""; m_bUseSSL = sal_False; if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_MOZILLA ) ) ) { @@ -280,19 +280,19 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& throwSQLException( STR_NO_HOSTNAME, *this ); if ( nPortNumber > 0 ) { - m_sMozillaURI += OUString( ":" ); + m_sMozillaURI += ":"; m_sMozillaURI += OUString::number( nPortNumber ); } if ( !sBaseDN.isEmpty() ) { - m_sMozillaURI += OUString( "/" ); + m_sMozillaURI += "/"; m_sMozillaURI += sBaseDN; } else throwSQLException( STR_NO_BASEDN, *this ); // Addition of a fake query to enable the Mozilla LDAP directory to work correctly. - m_sMozillaURI += OUString( "?(or(DisplayName,=,DontDoThisAtHome)))"); + m_sMozillaURI += "?(or(DisplayName,=,DontDoThisAtHome)))"; } else if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_OUTLOOK_MAPI ) ) ) { diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index 8d789380a255..0f945dc05beb 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -93,7 +93,7 @@ Sequence< OUString > MozabDriver::getSupportedServiceNames_Static( ) throw (Run // which service is supported // for more information @see com.sun.star.sdbc.Driver Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString( "com.sun.star.sdbc.Driver"); + aSNS[0] = "com.sun.star.sdbc.Driver"; return aSNS; } diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx index 48e867b13310..3469a62b75a0 100644 --- a/connectivity/source/drivers/mozab/MServices.cxx +++ b/connectivity/source/drivers/mozab/MServices.cxx @@ -94,7 +94,7 @@ typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Refere { // get the symbol for the method creating the factory - const OUString sFactoryCreationFunc = OUString( "OMozillaBootstrap_CreateInstance"); + const OUString sFactoryCreationFunc = "OMozillaBootstrap_CreateInstance"; // reinterpret_cast removed GNU C OMozillaBootstrap_CreateInstanceFunction s_pCreationFunc = (OMozillaBootstrap_CreateInstanceFunction)osl_getFunctionSymbol(s_hModule, sFactoryCreationFunc.pData); @@ -130,7 +130,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mozab_component_getFactory( else if ( aImplName == "com.sun.star.comp.mozilla.MozillaBootstrap" ) { Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString( "com.sun.star.mozilla.MozillaBootstrap"); + aSNS[0] = "com.sun.star.mozilla.MozillaBootstrap"; aReq.CREATE_PROVIDER( aImplName, aSNS, diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index b68424f8d59d..b9c4629056df 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -90,7 +90,7 @@ Sequence< OUString > MozillaBootstrap::getSupportedServiceNames_Static( ) throw // which service is supported // for more information @see com.sun.star.mozilla.MozillaBootstrap Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString( "com.sun.star.mozilla.MozillaBootstrap"); + aSNS[0] = "com.sun.star.mozilla.MozillaBootstrap"; return aSNS; } @@ -240,7 +240,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mozbootstrap_component_getFactory if ( aImplName == "com.sun.star.comp.mozilla.MozillaBootstrap" ) { Sequence< OUString > aSNS( 1 ); - aSNS[0] = OUString( "com.sun.star.mozilla.MozillaBootstrap"); + aSNS[0] = "com.sun.star.mozilla.MozillaBootstrap"; xFactory = ::cppu::createSingleFactory( reinterpret_cast< XMultiServiceFactory* > ( pServiceManager), -- cgit