From d5f12bfbf97e179ca45476bb7faf275bdf26f5ca Mon Sep 17 00:00:00 2001 From: Gergő Mocsi Date: Fri, 22 Feb 2013 01:54:27 +0100 Subject: fdo#38838, String to OUString in module dbaccess/source/sdbtools/connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced String to OUString, plus deleted deprecated macro RTL_CONSTASCII_USTRINGPARAM Change-Id: I4464644df8c42692aed7cb078b5f77c482e615f4 Reviewed-on: https://gerrit.libreoffice.org/2380 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- .../source/sdbtools/connection/objectnames.cxx | 14 +++++------ dbaccess/source/sdbtools/connection/tablename.cxx | 28 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'dbaccess/source/sdbtools') diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 05c1db065b27..68e13f1153fc 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -114,7 +114,7 @@ namespace sdbtools ::dbtools::DatabaseMetaData aMeta( m_xConnection ); if ( aMeta.supportsSubqueriesInFrom() ) { - String sNeedDistinctNames( SdbtRes( STR_QUERY_AND_TABLE_DISTINCT_NAMES ) ); + OUString sNeedDistinctNames( SdbtRes( STR_QUERY_AND_TABLE_DISTINCT_NAMES ) ); aError.NextException <<= SQLException( sNeedDistinctNames, m_xConnection, OUString(), 0, Any() ); } @@ -313,7 +313,7 @@ namespace sdbtools && ( _nCommandType != CommandType::QUERY ) ) throw IllegalArgumentException( - String( SdbtRes( STR_INVALID_COMMAND_TYPE ) ), + OUString( SdbtRes( STR_INVALID_COMMAND_TYPE ) ), NULL, 0 ); @@ -337,7 +337,7 @@ namespace sdbtools catch( const Exception& ) { throw IllegalArgumentException( - String( SdbtRes( STR_CONN_WITHOUT_QUERIES_OR_TABLES ) ), + OUString( SdbtRes( STR_CONN_WITHOUT_QUERIES_OR_TABLES ) ), NULL, 0 ); @@ -413,13 +413,13 @@ namespace sdbtools PNameValidation pNameCheck( NameCheckFactory::createExistenceCheck( getContext(), _CommandType, getConnection() ) ); - String sBaseName( _BaseName ); - if ( sBaseName.Len() == 0 ) + OUString sBaseName( _BaseName ); + if ( sBaseName.isEmpty() ) { if ( _CommandType == CommandType::TABLE ) - sBaseName = String( SdbtRes( STR_BASENAME_TABLE ) ); + sBaseName = OUString( SdbtRes( STR_BASENAME_TABLE ) ); else - sBaseName = String( SdbtRes( STR_BASENAME_QUERY ) ); + sBaseName = OUString( SdbtRes( STR_BASENAME_QUERY ) ); } OUString sName( sBaseName ); diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx index ce4c1961e17c..2c32044a4760 100644 --- a/dbaccess/source/sdbtools/connection/tablename.cxx +++ b/dbaccess/source/sdbtools/connection/tablename.cxx @@ -64,9 +64,9 @@ namespace sdbtools { SdbtClient m_aModuleClient; // keep the module alive as long as this instance lives - ::rtl::OUString sCatalog; - ::rtl::OUString sSchema; - ::rtl::OUString sName; + OUString sCatalog; + OUString sSchema; + OUString sName; }; //==================================================================== @@ -89,49 +89,49 @@ namespace sdbtools } //-------------------------------------------------------------------- - ::rtl::OUString SAL_CALL TableName::getCatalogName() throw (RuntimeException) + OUString SAL_CALL TableName::getCatalogName() throw (RuntimeException) { EntryGuard aGuard( *this ); return m_pImpl->sCatalog; } //-------------------------------------------------------------------- - void SAL_CALL TableName::setCatalogName( const ::rtl::OUString& _catalogName ) throw (RuntimeException) + void SAL_CALL TableName::setCatalogName( const OUString& _catalogName ) throw (RuntimeException) { EntryGuard aGuard( *this ); m_pImpl->sCatalog = _catalogName; } //-------------------------------------------------------------------- - ::rtl::OUString SAL_CALL TableName::getSchemaName() throw (RuntimeException) + OUString SAL_CALL TableName::getSchemaName() throw (RuntimeException) { EntryGuard aGuard( *this ); return m_pImpl->sSchema; } //-------------------------------------------------------------------- - void SAL_CALL TableName::setSchemaName( const ::rtl::OUString& _schemaName ) throw (RuntimeException) + void SAL_CALL TableName::setSchemaName( const OUString& _schemaName ) throw (RuntimeException) { EntryGuard aGuard( *this ); m_pImpl->sSchema = _schemaName; } //-------------------------------------------------------------------- - ::rtl::OUString SAL_CALL TableName::getTableName() throw (RuntimeException) + OUString SAL_CALL TableName::getTableName() throw (RuntimeException) { EntryGuard aGuard( *this ); return m_pImpl->sName; } //-------------------------------------------------------------------- - void SAL_CALL TableName::setTableName( const ::rtl::OUString& _tableName ) throw (RuntimeException) + void SAL_CALL TableName::setTableName( const OUString& _tableName ) throw (RuntimeException) { EntryGuard aGuard( *this ); m_pImpl->sName = _tableName; } //-------------------------------------------------------------------- - ::rtl::OUString SAL_CALL TableName::getNameForSelect() throw (RuntimeException) + OUString SAL_CALL TableName::getNameForSelect() throw (RuntimeException) { EntryGuard aGuard( *this ); return composeTableNameForSelect( getConnection(), m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName ); @@ -177,7 +177,7 @@ namespace sdbtools || !xPSI->hasPropertyByName( PROPERTY_NAME ) ) throw IllegalArgumentException( - String( SdbtRes( STR_NO_TABLE_OBJECT ) ), + OUString( SdbtRes( STR_NO_TABLE_OBJECT ) ), *this, 0 ); @@ -225,7 +225,7 @@ namespace sdbtools found = true; if ( !found ) throw IllegalArgumentException( - String( SdbtRes( STR_INVALID_COMPOSITION_TYPE ) ), + OUString( SdbtRes( STR_INVALID_COMPOSITION_TYPE ) ), NULL, 0 ); @@ -235,7 +235,7 @@ namespace sdbtools } //-------------------------------------------------------------------- - ::rtl::OUString SAL_CALL TableName::getComposedName( ::sal_Int32 _Type, ::sal_Bool _Quote ) throw (IllegalArgumentException, RuntimeException) + OUString SAL_CALL TableName::getComposedName( ::sal_Int32 _Type, ::sal_Bool _Quote ) throw (IllegalArgumentException, RuntimeException) { EntryGuard aGuard( *this ); @@ -246,7 +246,7 @@ namespace sdbtools } //-------------------------------------------------------------------- - void SAL_CALL TableName::setComposedName( const ::rtl::OUString& _ComposedName, ::sal_Int32 _Type ) throw (RuntimeException) + void SAL_CALL TableName::setComposedName( const OUString& _ComposedName, ::sal_Int32 _Type ) throw (RuntimeException) { EntryGuard aGuard( *this ); -- cgit