fdo#38838, String to OUString in module dbaccess/source/sdbtools/connection
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
521586b328
commit
d5f12bfbf9
2 changed files with 21 additions and 21 deletions
|
@ -114,7 +114,7 @@ namespace sdbtools
|
||||||
::dbtools::DatabaseMetaData aMeta( m_xConnection );
|
::dbtools::DatabaseMetaData aMeta( m_xConnection );
|
||||||
if ( aMeta.supportsSubqueriesInFrom() )
|
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() );
|
aError.NextException <<= SQLException( sNeedDistinctNames, m_xConnection, OUString(), 0, Any() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ namespace sdbtools
|
||||||
&& ( _nCommandType != CommandType::QUERY )
|
&& ( _nCommandType != CommandType::QUERY )
|
||||||
)
|
)
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
String( SdbtRes( STR_INVALID_COMMAND_TYPE ) ),
|
OUString( SdbtRes( STR_INVALID_COMMAND_TYPE ) ),
|
||||||
NULL,
|
NULL,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
@ -337,7 +337,7 @@ namespace sdbtools
|
||||||
catch( const Exception& )
|
catch( const Exception& )
|
||||||
{
|
{
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
String( SdbtRes( STR_CONN_WITHOUT_QUERIES_OR_TABLES ) ),
|
OUString( SdbtRes( STR_CONN_WITHOUT_QUERIES_OR_TABLES ) ),
|
||||||
NULL,
|
NULL,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
@ -413,13 +413,13 @@ namespace sdbtools
|
||||||
|
|
||||||
PNameValidation pNameCheck( NameCheckFactory::createExistenceCheck( getContext(), _CommandType, getConnection() ) );
|
PNameValidation pNameCheck( NameCheckFactory::createExistenceCheck( getContext(), _CommandType, getConnection() ) );
|
||||||
|
|
||||||
String sBaseName( _BaseName );
|
OUString sBaseName( _BaseName );
|
||||||
if ( sBaseName.Len() == 0 )
|
if ( sBaseName.isEmpty() )
|
||||||
{
|
{
|
||||||
if ( _CommandType == CommandType::TABLE )
|
if ( _CommandType == CommandType::TABLE )
|
||||||
sBaseName = String( SdbtRes( STR_BASENAME_TABLE ) );
|
sBaseName = OUString( SdbtRes( STR_BASENAME_TABLE ) );
|
||||||
else
|
else
|
||||||
sBaseName = String( SdbtRes( STR_BASENAME_QUERY ) );
|
sBaseName = OUString( SdbtRes( STR_BASENAME_QUERY ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString sName( sBaseName );
|
OUString sName( sBaseName );
|
||||||
|
|
|
@ -64,9 +64,9 @@ namespace sdbtools
|
||||||
{
|
{
|
||||||
SdbtClient m_aModuleClient; // keep the module alive as long as this instance lives
|
SdbtClient m_aModuleClient; // keep the module alive as long as this instance lives
|
||||||
|
|
||||||
::rtl::OUString sCatalog;
|
OUString sCatalog;
|
||||||
::rtl::OUString sSchema;
|
OUString sSchema;
|
||||||
::rtl::OUString sName;
|
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 );
|
EntryGuard aGuard( *this );
|
||||||
return m_pImpl->sCatalog;
|
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 );
|
EntryGuard aGuard( *this );
|
||||||
m_pImpl->sCatalog = _catalogName;
|
m_pImpl->sCatalog = _catalogName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
::rtl::OUString SAL_CALL TableName::getSchemaName() throw (RuntimeException)
|
OUString SAL_CALL TableName::getSchemaName() throw (RuntimeException)
|
||||||
{
|
{
|
||||||
EntryGuard aGuard( *this );
|
EntryGuard aGuard( *this );
|
||||||
return m_pImpl->sSchema;
|
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 );
|
EntryGuard aGuard( *this );
|
||||||
m_pImpl->sSchema = _schemaName;
|
m_pImpl->sSchema = _schemaName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
::rtl::OUString SAL_CALL TableName::getTableName() throw (RuntimeException)
|
OUString SAL_CALL TableName::getTableName() throw (RuntimeException)
|
||||||
{
|
{
|
||||||
EntryGuard aGuard( *this );
|
EntryGuard aGuard( *this );
|
||||||
return m_pImpl->sName;
|
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 );
|
EntryGuard aGuard( *this );
|
||||||
m_pImpl->sName = _tableName;
|
m_pImpl->sName = _tableName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
::rtl::OUString SAL_CALL TableName::getNameForSelect() throw (RuntimeException)
|
OUString SAL_CALL TableName::getNameForSelect() throw (RuntimeException)
|
||||||
{
|
{
|
||||||
EntryGuard aGuard( *this );
|
EntryGuard aGuard( *this );
|
||||||
return composeTableNameForSelect( getConnection(), m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName );
|
return composeTableNameForSelect( getConnection(), m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName );
|
||||||
|
@ -177,7 +177,7 @@ namespace sdbtools
|
||||||
|| !xPSI->hasPropertyByName( PROPERTY_NAME )
|
|| !xPSI->hasPropertyByName( PROPERTY_NAME )
|
||||||
)
|
)
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
String( SdbtRes( STR_NO_TABLE_OBJECT ) ),
|
OUString( SdbtRes( STR_NO_TABLE_OBJECT ) ),
|
||||||
*this,
|
*this,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
@ -225,7 +225,7 @@ namespace sdbtools
|
||||||
found = true;
|
found = true;
|
||||||
if ( !found )
|
if ( !found )
|
||||||
throw IllegalArgumentException(
|
throw IllegalArgumentException(
|
||||||
String( SdbtRes( STR_INVALID_COMPOSITION_TYPE ) ),
|
OUString( SdbtRes( STR_INVALID_COMPOSITION_TYPE ) ),
|
||||||
NULL,
|
NULL,
|
||||||
0
|
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 );
|
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 );
|
EntryGuard aGuard( *this );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue