diff options
Diffstat (limited to 'connectivity/source/drivers/postgresql')
59 files changed, 652 insertions, 720 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx index 9344bd266fb6..dd485a5ffe86 100644 --- a/connectivity/source/drivers/postgresql/pq_array.cxx +++ b/connectivity/source/drivers/postgresql/pq_array.cxx @@ -65,7 +65,6 @@ #include "pq_statics.hxx" #include "pq_sequenceresultset.hxx" -using rtl::OUString; using com::sun::star::sdbc::SQLException; using com::sun::star::uno::Any; @@ -75,7 +74,7 @@ namespace pq_sdbc_driver { -::rtl::OUString Array::getBaseTypeName( ) +OUString Array::getBaseTypeName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return OUString( "varchar" ); @@ -137,7 +136,7 @@ void Array::checkRange( sal_Int32 index, sal_Int32 count ) { if( index >= 1 && index -1 + count <= m_data.getLength() ) return; - rtl::OUStringBuffer buf; + OUStringBuffer buf; buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Array::getArrayAtIndex(): allowed range for index + count " ) ); buf.append( m_data.getLength() ); buf.appendAscii( ", got " ); @@ -145,7 +144,7 @@ void Array::checkRange( sal_Int32 index, sal_Int32 count ) buf.appendAscii( " + " ); buf.append( count ); - throw SQLException( buf.makeStringAndClear() , *this, rtl::OUString(), 1, Any()); + throw SQLException( buf.makeStringAndClear() , *this, OUString(), 1, Any()); } diff --git a/connectivity/source/drivers/postgresql/pq_array.hxx b/connectivity/source/drivers/postgresql/pq_array.hxx index d19969afdbef..21589021e41d 100644 --- a/connectivity/source/drivers/postgresql/pq_array.hxx +++ b/connectivity/source/drivers/postgresql/pq_array.hxx @@ -87,7 +87,7 @@ public: public: // XArray // Methods - virtual ::rtl::OUString SAL_CALL getBaseTypeName( ) + virtual OUString SAL_CALL getBaseTypeName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getBaseType( ) diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index 0f9e0aeac4bd..c64f459b6ca6 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -73,10 +73,6 @@ using osl::Mutex; using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringToOString; -using rtl::OUStringBuffer; -using rtl::OString; using com::sun::star::beans::XPropertySetInfo; using com::sun::star::beans::XPropertySet; @@ -550,7 +546,7 @@ Sequence< sal_Int8 > BaseResultSet::getBytes( sal_Int32 columnIndex ) else { // if this is a binary, it must contain escaped data ! - OString val = rtl::OUStringToOString( ustr, RTL_TEXTENCODING_ASCII_US ); + OString val = OUStringToOString( ustr, RTL_TEXTENCODING_ASCII_US ); size_t length; char * res = (char*) PQunescapeBytea( (unsigned char *)val.getStr() , &length); diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx index 928b5be3a77d..6e6b27fdf432 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx @@ -187,7 +187,7 @@ public: // XResultSet public: // XRow virtual sal_Bool SAL_CALL wasNull( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString( sal_Int32 columnIndex ) + virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -229,7 +229,7 @@ public: // XRow throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: // XColumnLocate -// virtual sal_Int32 SAL_CALL findColumn( const ::rtl::OUString& columnName ) +// virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) // throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) = 0; public: // OPropertySetHelper diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index e0060e9cd6ee..4bc15e4d0646 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -85,11 +85,6 @@ #include <com/sun/star/script/Converter.hpp> #include <com/sun/star/sdbc/XRow.hpp> -using rtl::OUStringBuffer; -using rtl::OUString; -using rtl::OString; -using rtl::OStringBuffer; -using rtl::OUStringToOString; using osl::MutexGuard; using com::sun::star::container::XNameAccess; @@ -162,7 +157,7 @@ OUString ConnectionGetImplementationName() { return OUString( "org.openoffice.comp.connectivity.pq.Connection.noext" ); } -com::sun::star::uno::Sequence<rtl::OUString> ConnectionGetSupportedServiceNames(void) +com::sun::star::uno::Sequence<OUString> ConnectionGetSupportedServiceNames(void) { OUString serv( "com.sun.star.sdbc.Connection" ); return Sequence< OUString> (&serv,1); @@ -310,13 +305,13 @@ Reference< XStatement > Connection::createStatement() throw (SQLException, Runti return ret; } -Reference< XPreparedStatement > Connection::prepareStatement( const ::rtl::OUString& sql ) +Reference< XPreparedStatement > Connection::prepareStatement( const OUString& sql ) throw (SQLException, RuntimeException) { MutexGuard guard( m_refMutex->mutex ); checkClosed(); - rtl::OString byteSql = OUStringToOString( sql, m_settings.encoding ); + OString byteSql = OUStringToOString( sql, m_settings.encoding ); PreparedStatement *stmt = new PreparedStatement( m_refMutex, this, &m_settings, byteSql ); Reference< XPreparedStatement > ret = stmt; @@ -327,7 +322,7 @@ Reference< XPreparedStatement > Connection::prepareStatement( const ::rtl::OUStr return ret; } -Reference< XPreparedStatement > Connection::prepareCall( const ::rtl::OUString& ) +Reference< XPreparedStatement > Connection::prepareCall( const OUString& ) throw (SQLException, RuntimeException) { throw SQLException( @@ -336,7 +331,7 @@ Reference< XPreparedStatement > Connection::prepareCall( const ::rtl::OUString& } -::rtl::OUString Connection::nativeSQL( const ::rtl::OUString& sql ) +OUString Connection::nativeSQL( const OUString& sql ) throw (SQLException, RuntimeException) { return sql; @@ -390,13 +385,13 @@ sal_Bool Connection::isReadOnly() throw (SQLException, RuntimeException) return sal_False; } -void Connection::setCatalog( const ::rtl::OUString& ) +void Connection::setCatalog( const OUString& ) throw (SQLException, RuntimeException) { // UNSUPPORTED } -::rtl::OUString Connection::getCatalog() throw (SQLException, RuntimeException) +OUString Connection::getCatalog() throw (SQLException, RuntimeException) { MutexGuard guard( m_refMutex->mutex ); if( m_settings.pConnection == 0 ) @@ -523,13 +518,13 @@ static void properties2arrays( const Sequence< PropertyValue > & args, { append = false; // ignore for now - OSL_TRACE("sdbc-postgresql: unknown argument '%s'", ::rtl::OUStringToOString( args[i].Name, RTL_TEXTENCODING_UTF8 ).getStr() ); + OSL_TRACE("sdbc-postgresql: unknown argument '%s'", OUStringToOString( args[i].Name, RTL_TEXTENCODING_UTF8 ).getStr() ); } if( append ) { OUString value; tc->convertTo( args[i].Value, getCppuType( &value) ) >>= value; - char *v = strdup(rtl::OUStringToOString(value, enc).getStr()); + char *v = strdup(OUStringToOString(value, enc).getStr()); values.push_back ( v ); } } diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx index bf356887a9a6..50b5407691a1 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.hxx +++ b/connectivity/source/drivers/postgresql/pq_connection.hxx @@ -111,7 +111,7 @@ static const sal_Int32 INFO = 3; static const sal_Int32 DATA = 4; } bool isLog( ConnectionSettings *settings, int loglevel ); -void log( ConnectionSettings *settings, sal_Int32 level, const rtl::OUString &logString ); +void log( ConnectionSettings *settings, sal_Int32 level, const OUString &logString ); void log( ConnectionSettings *settings, sal_Int32 level, const char *str ); //-------------------------------------------------- @@ -138,8 +138,8 @@ struct ConnectionSettings ::com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > views; Tables *pTablesImpl; // needed to implement renaming of tables / views Views *pViewsImpl; // needed to implement renaming of tables / views - ::rtl::OUString user; - ::rtl::OUString catalog; + OUString user; + OUString catalog; sal_Bool showSystemColumns; FILE *logFile; sal_Int32 loglevel; @@ -170,17 +170,17 @@ typedef ::boost::unordered_map< ::std::equal_to< ::rtl::ByteSequence >, Allocator< std::pair< const ::rtl::ByteSequence,::com::sun::star::uno::WeakReference< com::sun::star::sdbc::XCloseable > > > > WeakHashMap; -typedef ::std::vector< rtl::OString, Allocator< ::rtl::OString > > OStringVector; +typedef ::std::vector< OString, Allocator< OString > > OStringVector; typedef ::boost::unordered_map < const sal_Int32, - rtl::OUString, + OUString, ::boost::hash< sal_Int32 >, ::std::equal_to< sal_Int32 >, - Allocator< ::std::pair< sal_Int32, ::rtl::OUString > > + Allocator< ::std::pair< sal_Int32, OUString > > > Int2StringMap; class Connection : public ConnectionBase @@ -212,12 +212,12 @@ public: // XConnection virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ; virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( - const ::rtl::OUString& sql ) + const OUString& sql ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( - const ::rtl::OUString& sql ) + const OUString& sql ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL nativeSQL( const ::rtl::OUString& sql ) + virtual OUString SAL_CALL nativeSQL( const OUString& sql ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setAutoCommit( sal_Bool autoCommit ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -235,9 +235,9 @@ public: // XConnection throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isReadOnly( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setCatalog( const ::rtl::OUString& catalog ) + virtual void SAL_CALL setCatalog( const OUString& catalog ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCatalog( ) + virtual OUString SAL_CALL getCatalog( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTransactionIsolation( sal_Int32 level ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index a7b63df958a5..71dd2f3c511d 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -107,7 +107,6 @@ using ::osl::MutexGuard; -using ::rtl::OUString; using namespace com::sun::star::sdbc; @@ -238,7 +237,7 @@ OUString DatabaseMetaData::getDatabaseProductName( ) throw (SQLException, Runti OUString DatabaseMetaData::getDatabaseProductVersion( ) throw (SQLException, RuntimeException) { - return rtl::OUString::createFromAscii( PQparameterStatus( m_pSettings->pConnection, "server_version" ) ); + return OUString::createFromAscii( PQparameterStatus( m_pSettings->pConnection, "server_version" ) ); } OUString DatabaseMetaData::getDriverName( ) throw (SQLException, RuntimeException) { @@ -1182,7 +1181,7 @@ sal_Bool DatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw (SQLExc if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( "DatabaseMetaData::getTables got called with " ); buf.append( schemaPattern ); buf.appendAscii( "." ); @@ -1466,7 +1465,7 @@ static void columnMetaData2DatabaseTypeDescription( { Reference< XRow > row( rs, UNO_QUERY_THROW ); int domains = 0; - rtl::OUStringBuffer queryBuf(128); + OUStringBuffer queryBuf(128); queryBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "SELECT oid,typtype,typname FROM pg_TYPE WHERE " ) ); while( rs->next() ) { @@ -1513,7 +1512,7 @@ static void columnMetaData2DatabaseTypeDescription( if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( "DatabaseMetaData::getColumns got called with " ); buf.append( schemaPattern ); buf.appendAscii( "." ); @@ -1697,7 +1696,7 @@ static void columnMetaData2DatabaseTypeDescription( if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( "DatabaseMetaData::getColumnPrivileges got called with " ); buf.append( schema ); buf.appendAscii( "." ); @@ -1728,7 +1727,7 @@ static void columnMetaData2DatabaseTypeDescription( if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( "DatabaseMetaData::getTablePrivileges got called with " ); buf.append( schemaPattern ); buf.appendAscii( "." ); @@ -1792,7 +1791,7 @@ static void columnMetaData2DatabaseTypeDescription( if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( "DatabaseMetaData::getPrimaryKeys got called with " ); buf.append( schema ); buf.appendAscii( "." ); @@ -2060,7 +2059,7 @@ void DatabaseMetaData::init_getReferences_stmt () void DatabaseMetaData::init_getPrivs_stmt () { - rtl::OUStringBuffer sSQL(300); + OUStringBuffer sSQL(300); sSQL.append( " SELECT dp.TABLE_CAT, dp.TABLE_SCHEM, dp.TABLE_NAME, dp.GRANTOR, pr.rolname AS GRANTEE, dp.privilege, dp.is_grantable " " FROM (" diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx index b957197b96dc..9c226272bfde 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.hxx @@ -78,12 +78,12 @@ class DatabaseMetaData : ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > m_getColumnPrivs_stmt; void checkClosed() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - sal_Int32 getIntSetting(::rtl::OUString settingName) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + sal_Int32 getIntSetting(OUString settingName) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); sal_Int32 getMaxIndexKeys() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); sal_Int32 getMaxNameLength() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > getImportedExportedKeys( - const ::com::sun::star::uno::Any& primaryCatalog, const ::rtl::OUString& primarySchema, const ::rtl::OUString& primaryTable, - const ::com::sun::star::uno::Any& foreignCatalog, const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) + const ::com::sun::star::uno::Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, + const ::com::sun::star::uno::Any& foreignCatalog, const OUString& foreignSchema, const OUString& foreignTable ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void init_getReferences_stmt (); void init_getPrivs_stmt (); @@ -99,17 +99,17 @@ public: // Methods virtual sal_Bool SAL_CALL allProceduresAreCallable( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL allTablesAreSelectable( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getURL( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getUserName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getURL( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getUserName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isReadOnly( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL nullsAreSortedHigh( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL nullsAreSortedLow( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL nullsAreSortedAtStart( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL nullsAreSortedAtEnd( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDatabaseProductName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDatabaseProductVersion( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDriverName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDriverVersion( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getDatabaseProductName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getDatabaseProductVersion( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getDriverName( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getDriverVersion( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getDriverMajorVersion( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getDriverMinorVersion( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL usesLocalFiles( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -122,14 +122,14 @@ public: virtual sal_Bool SAL_CALL storesUpperCaseQuotedIdentifiers( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL storesLowerCaseQuotedIdentifiers( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL storesMixedCaseQuotedIdentifiers( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getIdentifierQuoteString( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSQLKeywords( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getNumericFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getStringFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSystemFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getTimeDateFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSearchStringEscape( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getExtraNameCharacters( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getIdentifierQuoteString( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getSQLKeywords( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getNumericFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getStringFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getSystemFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getTimeDateFunctions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getSearchStringEscape( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getExtraNameCharacters( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsAlterTableWithAddColumn( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsAlterTableWithDropColumn( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsColumnAliasing( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -157,11 +157,11 @@ public: virtual sal_Bool SAL_CALL supportsOuterJoins( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsFullOuterJoins( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsLimitedOuterJoins( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSchemaTerm( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getProcedureTerm( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCatalogTerm( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getSchemaTerm( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getProcedureTerm( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getCatalogTerm( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isCatalogAtStart( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCatalogSeparator( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getCatalogSeparator( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsSchemasInDataManipulation( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsSchemasInProcedureCalls( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsSchemasInTableDefinitions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -215,23 +215,23 @@ public: virtual sal_Bool SAL_CALL supportsDataManipulationTransactionsOnly( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL dataDefinitionCausesTransactionCommit( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL dataDefinitionIgnoredInTransactions( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getProcedures( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& procedureNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getProcedureColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& procedureNamePattern, const ::rtl::OUString& columnNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTables( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& types ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getProcedures( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getProcedureColumns( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& procedureNamePattern, const OUString& columnNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTables( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const ::com::sun::star::uno::Sequence< OUString >& types ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getSchemas( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getCatalogs( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTableTypes( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern, const ::rtl::OUString& columnNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumnPrivileges( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, const ::rtl::OUString& columnNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTablePrivileges( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getBestRowIdentifier( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope, sal_Bool nullable ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getVersionColumns( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getPrimaryKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getImportedKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getExportedKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getCrossReference( const ::com::sun::star::uno::Any& primaryCatalog, const ::rtl::OUString& primarySchema, const ::rtl::OUString& primaryTable, const ::com::sun::star::uno::Any& foreignCatalog, const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumns( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern, const OUString& columnNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getColumnPrivileges( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table, const OUString& columnNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTablePrivileges( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& tableNamePattern ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getBestRowIdentifier( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table, sal_Int32 scope, sal_Bool nullable ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getVersionColumns( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getPrimaryKeys( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getImportedKeys( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getExportedKeys( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getCrossReference( const ::com::sun::star::uno::Any& primaryCatalog, const OUString& primarySchema, const OUString& primaryTable, const ::com::sun::star::uno::Any& foreignCatalog, const OUString& foreignSchema, const OUString& foreignTable ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getTypeInfo( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getIndexInfo( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Bool unique, sal_Bool approximate ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getIndexInfo( const ::com::sun::star::uno::Any& catalog, const OUString& schema, const OUString& table, sal_Bool unique, sal_Bool approximate ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsResultSetType( sal_Int32 setType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL ownUpdatesAreVisible( sal_Int32 setType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -244,7 +244,7 @@ public: virtual sal_Bool SAL_CALL deletesAreDetected( sal_Int32 setType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL insertsAreDetected( sal_Int32 setType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsBatchUpdates( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getUDTs( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const ::com::sun::star::uno::Sequence< sal_Int32 >& types ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getUDTs( const ::com::sun::star::uno::Any& catalog, const OUString& schemaPattern, const OUString& typeNamePattern, const ::com::sun::star::uno::Sequence< sal_Int32 >& types ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx index 2d2d03daacef..ea5f62ceb244 100644 --- a/connectivity/source/drivers/postgresql/pq_driver.cxx +++ b/connectivity/source/drivers/postgresql/pq_driver.cxx @@ -65,8 +65,6 @@ #include "pq_driver.hxx" -using rtl::OUString; -using rtl::OUStringToOString; using osl::MutexGuard; using cppu::WeakComponentImplHelper2; @@ -138,7 +136,7 @@ Reference< XConnection > Driver::connect( UNO_QUERY ); } -sal_Bool Driver::acceptsURL( const ::rtl::OUString& url ) +sal_Bool Driver::acceptsURL( const OUString& url ) throw (SQLException, RuntimeException) { return url.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdbc:postgresql:" ) ); @@ -201,7 +199,7 @@ Reference< XTablesSupplier > Driver::getDataDefinitionByConnection( } Reference< XTablesSupplier > Driver::getDataDefinitionByURL( - const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) + const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { return Reference< XTablesSupplier > ( connect( url, info ), UNO_QUERY ); @@ -317,8 +315,8 @@ void OOneInstanceComponentFactory::disposing() // Reference< XSingleComponentFactory > createOneInstanceComponentFactory( // cppu::ComponentFactoryFunc fptr, -// ::rtl::OUString const & rImplementationName, -// ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, +// OUString const & rImplementationName, +// ::com::sun::star::uno::Sequence< OUString > const & rServiceNames, // rtl_ModuleCount * pModCount = 0 ) // SAL_THROW(()) // { diff --git a/connectivity/source/drivers/postgresql/pq_driver.hxx b/connectivity/source/drivers/postgresql/pq_driver.hxx index 0657867eb44c..7129fdeda49d 100644 --- a/connectivity/source/drivers/postgresql/pq_driver.hxx +++ b/connectivity/source/drivers/postgresql/pq_driver.hxx @@ -103,15 +103,15 @@ public: public: // XDriver virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( - const ::rtl::OUString& url, + const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL acceptsURL( const ::rtl::OUString& url ) + virtual sal_Bool SAL_CALL acceptsURL( const OUString& url ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( - const ::rtl::OUString& url, + const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -120,12 +120,12 @@ public: // XDriver public: // XServiceInfo // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) + virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException); public: // XDataDefinitionSupplier @@ -135,7 +135,7 @@ public: // XDataDefinitionSupplier throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL( - const ::rtl::OUString& url, + const OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx index 1c413d9d2f61..bb01e453588a 100644 --- a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx @@ -61,7 +61,6 @@ using osl::MutexGuard; -using rtl::OUString; using com::sun::star::uno::Reference; using com::sun::star::uno::makeAny; @@ -86,9 +85,9 @@ FakedUpdateableResultSet::FakedUpdateableResultSet( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, ConnectionSettings **pSettings, PGresult *result, - const rtl::OUString &schema, - const rtl::OUString &table, - const rtl::OUString &aReason ) + const OUString &schema, + const OUString &table, + const OUString &aReason ) : ResultSet( mutex, owner, pSettings, result, schema, table ), m_aReason( aReason ) {} @@ -215,7 +214,7 @@ void FakedUpdateableResultSet::updateDouble( sal_Int32 /* columnIndex */, double throw SQLException( m_aReason, *this, OUString(),1,Any() ); } -void FakedUpdateableResultSet::updateString( sal_Int32 /* columnIndex */, const ::rtl::OUString& /* x */ ) throw (SQLException, RuntimeException) +void FakedUpdateableResultSet::updateString( sal_Int32 /* columnIndex */, const OUString& /* x */ ) throw (SQLException, RuntimeException) { throw SQLException( m_aReason, *this, OUString(),1,Any() ); } diff --git a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx index c5c37b67d632..162c83e1f809 100644 --- a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.hxx @@ -73,7 +73,7 @@ class FakedUpdateableResultSet : public com::sun::star::sdbc::XResultSetUpdate, public com::sun::star::sdbc::XRowUpdate { - ::rtl::OUString m_aReason; + OUString m_aReason; public: FakedUpdateableResultSet( @@ -81,9 +81,9 @@ public: const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, ConnectionSettings **pSettings, PGresult *result, - const rtl::OUString &schema, - const rtl::OUString &table, - const rtl::OUString &aReason ); + const OUString &schema, + const OUString &table, + const OUString &aReason ); public: // XInterface virtual void SAL_CALL acquire() throw() { ResultSet::acquire(); } @@ -115,7 +115,7 @@ public: // XRowUpdate virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index a8a4058c94c4..538fa64136b1 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -78,12 +78,6 @@ using osl::Mutex; using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringToOString; -using rtl::OStringToOUString; -using rtl::OUStringBuffer; -using rtl::OStringBuffer; -using rtl::OString; using com::sun::star::uno::Any; using com::sun::star::uno::makeAny; @@ -176,13 +170,13 @@ static bool isOperator( char c ) return *w != 0; } -static bool isNamedParameterStart( const rtl::OString & o , int index ) +static bool isNamedParameterStart( const OString & o , int index ) { return o[index] == ':' && ( isWhitespace( o[index-1] ) || isOperator(o[index-1]) ); } -static bool isQuoted( const rtl::OString & str ) +static bool isQuoted( const OString & str ) { return str[0] == '"' || str[0] == '\''; } @@ -191,7 +185,7 @@ PreparedStatement::PreparedStatement( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< XConnection > & conn, struct ConnectionSettings *pSettings, - const ::rtl::OString & stmt ) + const OString & stmt ) : OComponentHelper( refMutex->mutex ), OPropertySetHelper( OComponentHelper::rBHelper ), m_connection( conn ), @@ -354,7 +348,7 @@ void PreparedStatement::raiseSQLException( buf.appendAscii( "]" ); } buf.append( - rtl::OUString( errorMsg, strlen(errorMsg) , m_pSettings->encoding ) ); + OUString( errorMsg, strlen(errorMsg) , m_pSettings->encoding ) ); buf.appendAscii( " (caused by statement '" ); buf.appendAscii( m_executedStatement.getStr() ); buf.appendAscii( "')" ); @@ -448,7 +442,7 @@ sal_Bool PreparedStatement::execute( ) m_executedStatement = buf.makeStringAndClear(); m_lastResultset.clear(); - m_lastTableInserted = rtl::OUString(); + m_lastTableInserted = OUString(); struct CommandData data; data.refMutex = m_refMutex; @@ -490,7 +484,7 @@ void PreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) } void PreparedStatement::setObjectNull( - sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) + sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName ) throw (SQLException, RuntimeException) { (void) sqlType; (void) typeName; @@ -578,7 +572,7 @@ void PreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) m_vars[parameterIndex-1] = buf.makeStringAndClear(); } -void PreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) +void PreparedStatement::setString( sal_Int32 parameterIndex, const OUString& x ) throw (SQLException, RuntimeException) { // printf( "setString %d %s\n ", parameterIndex, diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx index e9284d7804bb..eee107754af2 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.hxx @@ -101,16 +101,16 @@ private: com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > m_connection; ConnectionSettings *m_pSettings; ::com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > m_lastResultset; - ::rtl::OString m_stmt; - ::rtl::OString m_executedStatement; + OString m_stmt; + OString m_executedStatement; ::rtl::Reference< RefCountedMutex > m_refMutex; OStringVector m_vars; OStringVector m_splittedStatement; sal_Bool m_multipleResultAvailable; sal_Int32 m_multipleResultUpdateCount; sal_Int32 m_lastOidInserted; - rtl::OUString m_lastTableInserted; - rtl::OString m_lastQuery; + OUString m_lastTableInserted; + OString m_lastQuery; public: /** @@ -120,7 +120,7 @@ public: PreparedStatement( const rtl::Reference< RefCountedMutex > & refMutex, const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection> & con, struct ConnectionSettings *pSettings, - const rtl::OString &stmt ); + const OString &stmt ); virtual ~PreparedStatement(); public: // XInterface @@ -146,7 +146,7 @@ public: // XParameters virtual void SAL_CALL setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setObjectNull( - sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) + sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -162,7 +162,7 @@ public: // XParameters throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDouble( sal_Int32 parameterIndex, double x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) + virtual void SAL_CALL setString( sal_Int32 parameterIndex, const OUString& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setBytes( sal_Int32 parameterIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) @@ -274,7 +274,7 @@ private: void checkClosed() throw (com::sun::star::sdbc::SQLException, com::sun::star::uno::RuntimeException); void raiseSQLException( const char * errorMsg, const char *errorType = 0 ) throw ( com::sun::star::sdbc::SQLException ); -// PGresult *pgExecute( ::rtl::OString *pQuery ); +// PGresult *pgExecute( OString *pQuery ); }; } diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx b/connectivity/source/drivers/postgresql/pq_resultset.cxx index f80be22611e5..40c729f16ed5 100644 --- a/connectivity/source/drivers/postgresql/pq_resultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx @@ -63,8 +63,6 @@ #include <com/sun/star/sdbc/ResultSetType.hpp> #include <com/sun/star/sdbc/DataType.hpp> -using rtl::OUString; -using rtl::OUStringToOString; using osl::MutexGuard; @@ -102,8 +100,8 @@ ResultSet::ResultSet( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< XInterface > & owner, ConnectionSettings **ppSettings, PGresult * result, - const rtl::OUString &schema, - const rtl::OUString &table) + const OUString &schema, + const OUString &table) : BaseResultSet( refMutex, owner, PQntuples( result ), PQnfields( result ),(*ppSettings)->tc ), @@ -140,7 +138,7 @@ Any ResultSet::getValue( sal_Int32 columnIndex ) else { m_wasNull = false; - ret <<= ::rtl::OUString( + ret <<= OUString( PQgetvalue( m_result, m_row , columnIndex -1 ) , PQgetlength( m_result, m_row , columnIndex -1 ) , (*m_ppSettings)->encoding ); @@ -176,7 +174,7 @@ Reference< XResultSetMetaData > ResultSet::getMetaData( ) throw (SQLException, m_refMutex, this, this, m_ppSettings, m_result, m_schema, m_table ); } -sal_Int32 ResultSet::findColumn( const ::rtl::OUString& columnName ) +sal_Int32 ResultSet::findColumn( const OUString& columnName ) throw (SQLException, RuntimeException) { MutexGuard guard( m_refMutex->mutex ); diff --git a/connectivity/source/drivers/postgresql/pq_resultset.hxx b/connectivity/source/drivers/postgresql/pq_resultset.hxx index f9df7d9fdec5..50ecf96cc2eb 100644 --- a/connectivity/source/drivers/postgresql/pq_resultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_resultset.hxx @@ -75,8 +75,8 @@ class ResultSet : public BaseResultSet { protected: PGresult *m_result; - ::rtl::OUString m_schema; - ::rtl::OUString m_table; + OUString m_schema; + OUString m_table; ConnectionSettings **m_ppSettings; protected: @@ -95,8 +95,8 @@ public: const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, ConnectionSettings **pSettings, PGresult *result, - const rtl::OUString &schema, - const rtl::OUString &table ); + const OUString &schema, + const OUString &table ); ~ResultSet(); public: // XCloseable @@ -108,7 +108,7 @@ public: // XResultSetMetaDataSupplier throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: // XColumnLocate - virtual sal_Int32 SAL_CALL findColumn( const ::rtl::OUString& columnName ) + virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx index 352a7d7a7c73..a483f98f3371 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx @@ -71,9 +71,6 @@ using osl::Mutex; using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OString; using com::sun::star::uno::Any; using com::sun::star::uno::RuntimeException; @@ -100,9 +97,9 @@ namespace pq_sdbc_driver // struct ColumnMetaData // { -// rtl::OUString tableName; -// rtl::OUString schemaTableName; -// rtl::OUString typeName; +// OUString tableName; +// OUString schemaTableName; +// OUString typeName; // com::sun::star::sdbc::DataType type; // sal_Int32 precision; // sal_Int32 scale; @@ -144,8 +141,8 @@ ResultSetMetaData::ResultSetMetaData( ResultSet * pResultSet, ConnectionSettings **ppSettings, PGresult *pResult, - const rtl::OUString &schemaName, - const rtl::OUString &tableName ) : + const OUString &schemaName, + const OUString &tableName ) : m_refMutex( refMutex ), m_ppSettings( ppSettings ), m_origin( origin ), @@ -245,7 +242,7 @@ void ResultSetMetaData::checkTable() } } -sal_Int32 ResultSetMetaData::getIntColumnProperty( const rtl::OUString & name, int index, int def ) +sal_Int32 ResultSetMetaData::getIntColumnProperty( const OUString & name, int index, int def ) { sal_Int32 ret = def; // give defensive answers, when data is not available try @@ -265,7 +262,7 @@ sal_Int32 ResultSetMetaData::getIntColumnProperty( const rtl::OUString & name, i return ret; } -sal_Bool ResultSetMetaData::getBoolColumnProperty( const rtl::OUString & name, int index, sal_Bool def ) +sal_Bool ResultSetMetaData::getBoolColumnProperty( const OUString & name, int index, sal_Bool def ) { sal_Bool ret = def; try @@ -361,13 +358,13 @@ sal_Int32 ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) return m_colDesc[column-1].displaySize; } -::rtl::OUString ResultSetMetaData::getColumnLabel( sal_Int32 column ) +OUString ResultSetMetaData::getColumnLabel( sal_Int32 column ) throw (SQLException, RuntimeException) { return getColumnName( column); } -::rtl::OUString ResultSetMetaData::getColumnName( sal_Int32 column ) throw (SQLException, RuntimeException) +OUString ResultSetMetaData::getColumnName( sal_Int32 column ) throw (SQLException, RuntimeException) { MutexGuard guard( m_refMutex->mutex ); checkClosed(); @@ -376,7 +373,7 @@ sal_Int32 ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) return m_colDesc[column-1].name; } -::rtl::OUString ResultSetMetaData::getSchemaName( sal_Int32 column ) throw (SQLException, RuntimeException) +OUString ResultSetMetaData::getSchemaName( sal_Int32 column ) throw (SQLException, RuntimeException) { (void) column; return m_schemaName; @@ -400,12 +397,12 @@ sal_Int32 ResultSetMetaData::getScale( sal_Int32 column ) return m_colDesc[column-1].scale; } -::rtl::OUString ResultSetMetaData::getTableName( sal_Int32 column ) +OUString ResultSetMetaData::getTableName( sal_Int32 column ) throw (SQLException, RuntimeException) { (void) column; // LEM TODO This is very fishy.. Should probably return the table to which that column belongs! - rtl::OUString ret; + OUString ret; if( m_tableName.getLength() ) { OUStringBuffer buf( 128 ); @@ -417,7 +414,7 @@ sal_Int32 ResultSetMetaData::getScale( sal_Int32 column ) return ret; } -::rtl::OUString ResultSetMetaData::getCatalogName( sal_Int32 column ) +OUString ResultSetMetaData::getCatalogName( sal_Int32 column ) throw (SQLException, RuntimeException) { (void) column; @@ -438,10 +435,10 @@ sal_Int32 ResultSetMetaData::getColumnType( sal_Int32 column ) return ret; } -::rtl::OUString ResultSetMetaData::getColumnTypeName( sal_Int32 column ) +OUString ResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw (SQLException, RuntimeException) { - ::rtl::OUString ret; // give defensive answers, when data is not available + OUString ret; // give defensive answers, when data is not available try { MutexGuard guard( m_refMutex->mutex ); @@ -483,7 +480,7 @@ sal_Bool ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) { return isWritable(column); // uhh, now it becomes really esoteric .... } -::rtl::OUString ResultSetMetaData::getColumnServiceName( sal_Int32 column ) +OUString ResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw (SQLException, RuntimeException) { (void) column; diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx index 2282d1a3073c..aaf10c40efea 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx @@ -71,12 +71,12 @@ namespace pq_sdbc_driver struct ColDesc { - rtl::OUString name; + OUString name; sal_Int32 precision; sal_Int32 scale; sal_Int32 displaySize; Oid typeOid; - rtl::OUString typeName; + OUString typeName; sal_Int32 type; }; @@ -92,8 +92,8 @@ class ResultSetMetaData : ConnectionSettings **m_ppSettings; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_origin; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_table; - ::rtl::OUString m_tableName; - ::rtl::OUString m_schemaName; + OUString m_tableName; + OUString m_schemaName; ColDescVector m_colDesc; ResultSet *m_pResultSet; @@ -110,8 +110,8 @@ class ResultSetMetaData : void checkForTypes(); com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > getColumnByIndex( int index ); - sal_Int32 getIntColumnProperty( const rtl::OUString & name, int index, int def ); - sal_Bool getBoolColumnProperty( const rtl::OUString & name, int index, sal_Bool def ); + sal_Int32 getIntColumnProperty( const OUString & name, int index, int def ); + sal_Bool getBoolColumnProperty( const OUString & name, int index, sal_Bool def ); public: ResultSetMetaData( @@ -120,8 +120,8 @@ public: ResultSet *pResultSet, ConnectionSettings **pSettings, PGresult *pResult, - const rtl::OUString &schemaName, - const rtl::OUString &tableName ); + const OUString &schemaName, + const OUString &tableName ); public: // Methods @@ -133,19 +133,19 @@ public: virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSchemaName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getSchemaName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getTableName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCatalogName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getTableName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getCatalogName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; } diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx index f9fb5f1f949f..5623c72d0d48 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx @@ -60,7 +60,6 @@ #include "pq_sequenceresultsetmetadata.hxx" -using rtl::OUString; using com::sun::star::sdbc::XResultSetMetaData; @@ -131,7 +130,7 @@ Reference< XResultSetMetaData > SAL_CALL SequenceResultSet::getMetaData( ) sal_Int32 SAL_CALL SequenceResultSet::findColumn( - const ::rtl::OUString& columnName ) + const OUString& columnName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { // no need to guard, as all members are readonly ! diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx b/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx index 2b582be6c48d..0bb5e141d584 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.hxx @@ -77,7 +77,7 @@ class SequenceResultSet : public BaseResultSet protected: ::com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > m_data; - ::com::sun::star::uno::Sequence< ::rtl::OUString > m_columnNames; + ::com::sun::star::uno::Sequence< OUString > m_columnNames; ::com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSetMetaData > m_meta; protected: @@ -94,7 +94,7 @@ public: SequenceResultSet( const ::rtl::Reference< RefCountedMutex > & mutex, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, - const com::sun::star::uno::Sequence< rtl::OUString > &colNames, + const com::sun::star::uno::Sequence< OUString > &colNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > > &data, const com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > &tc, const ColumnMetaDataVector *pVec = 0); @@ -109,7 +109,7 @@ public: // XResultSetMetaDataSupplier throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: // XColumnLocate - virtual sal_Int32 SAL_CALL findColumn( const ::rtl::OUString& columnName ) + virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx index a538e9e22c90..16a034d2037f 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.cxx @@ -59,8 +59,6 @@ #include <rtl/ustrbuf.hxx> -using rtl::OUStringBuffer; -using rtl::OUString; using com::sun::star::uno::Any; using com::sun::star::uno::RuntimeException; @@ -132,20 +130,20 @@ sal_Int32 SequenceResultSetMetaData::getColumnDisplaySize( sal_Int32 /* column * return 50; } -::rtl::OUString SequenceResultSetMetaData::getColumnLabel( sal_Int32 column ) +OUString SequenceResultSetMetaData::getColumnLabel( sal_Int32 column ) throw (SQLException, RuntimeException) { checkColumnIndex( column ); return m_columnData[column-1].columnName; } -::rtl::OUString SequenceResultSetMetaData::getColumnName( sal_Int32 column ) throw (SQLException, RuntimeException) +OUString SequenceResultSetMetaData::getColumnName( sal_Int32 column ) throw (SQLException, RuntimeException) { checkColumnIndex( column ); return m_columnData[column-1].columnName; } -::rtl::OUString SequenceResultSetMetaData::getSchemaName( sal_Int32 column ) throw (SQLException, RuntimeException) +OUString SequenceResultSetMetaData::getSchemaName( sal_Int32 column ) throw (SQLException, RuntimeException) { checkColumnIndex( column ); return m_columnData[column-1].schemaTableName; @@ -167,14 +165,14 @@ sal_Int32 SequenceResultSetMetaData::getScale( sal_Int32 column ) return m_columnData[column-1].scale; } -::rtl::OUString SequenceResultSetMetaData::getTableName( sal_Int32 column ) +OUString SequenceResultSetMetaData::getTableName( sal_Int32 column ) throw (SQLException, RuntimeException) { checkColumnIndex( column ); return m_columnData[column-1].tableName; } -::rtl::OUString SequenceResultSetMetaData::getCatalogName( sal_Int32 /* column */ ) +OUString SequenceResultSetMetaData::getCatalogName( sal_Int32 /* column */ ) throw (SQLException, RuntimeException) { // can do this through XConnection.getCatalog() ! @@ -187,7 +185,7 @@ sal_Int32 SequenceResultSetMetaData::getColumnType( sal_Int32 column ) return m_columnData[column-1].type; } -::rtl::OUString SequenceResultSetMetaData::getColumnTypeName( sal_Int32 column ) +OUString SequenceResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw (SQLException, RuntimeException) { checkColumnIndex( column ); @@ -212,7 +210,7 @@ sal_Bool SequenceResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) { return isWritable(column); // uhh, now it becomes really esoteric .... } -::rtl::OUString SequenceResultSetMetaData::getColumnServiceName( sal_Int32 /* column */ ) +OUString SequenceResultSetMetaData::getColumnServiceName( sal_Int32 /* column */ ) throw (SQLException, RuntimeException) { return OUString(); diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx index 53d18d0a5d36..f027196d2bb1 100644 --- a/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx +++ b/connectivity/source/drivers/postgresql/pq_sequenceresultsetmetadata.hxx @@ -68,8 +68,8 @@ namespace pq_sdbc_driver { ::rtl::Reference< RefCountedMutex > m_refMutex; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > m_origin; - ::rtl::OUString m_tableName; - ::rtl::OUString m_schemaName; + OUString m_tableName; + OUString m_schemaName; ColumnMetaDataVector m_columnData; sal_Int32 m_colCount; @@ -92,19 +92,19 @@ namespace pq_sdbc_driver virtual sal_Int32 SAL_CALL isNullable( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isSigned( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnDisplaySize( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSchemaName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnLabel( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getSchemaName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getPrecision( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getScale( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getTableName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCatalogName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getTableName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getCatalogName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnType( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnTypeName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isReadOnly( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isWritable( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isDefinitelyWritable( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getColumnServiceName( sal_Int32 column ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; } diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 49b82ae63282..6326da34ec2a 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -88,11 +88,6 @@ using osl::Mutex; using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; -using rtl::OStringToOUString; -using rtl::OString; using com::sun::star::uno::Any; using com::sun::star::uno::makeAny; @@ -304,7 +299,7 @@ void Statement::raiseSQLException( buf.appendAscii( "]" ); } buf.append( - rtl::OUString( errorMsg, strlen(errorMsg) , m_pSettings->encoding ) ); + OUString( errorMsg, strlen(errorMsg) , m_pSettings->encoding ) ); buf.appendAscii( " (caused by statement '" ); buf.append( sql ); buf.appendAscii( "')" ); @@ -355,9 +350,9 @@ static void raiseSQLException( buf.appendAscii( "]" ); } buf.append( - rtl::OUString( errorMsg, strlen(errorMsg) , pSettings->encoding ) ); + OUString( errorMsg, strlen(errorMsg) , pSettings->encoding ) ); buf.appendAscii( " (caused by statement '" ); - buf.append( rtl::OStringToOUString( sql, pSettings->encoding ) ); + buf.append( OStringToOUString( sql, pSettings->encoding ) ); buf.appendAscii( "')" ); OUString error = buf.makeStringAndClear(); log( pSettings, LogLevel::ERROR, error ); @@ -367,14 +362,14 @@ static void raiseSQLException( // returns the elements of the primary key of the given table // static Sequence< Reference< com::sun::star::beans::XPropertySet > > lookupKeys( -static Sequence< ::rtl::OUString > lookupKeys( +static Sequence< OUString > lookupKeys( const Reference< com::sun::star::container::XNameAccess > &tables, const OUString & table, OUString *pSchema, OUString *pTable, ConnectionSettings *pSettings) { - Sequence< ::rtl::OUString > ret; + Sequence< OUString > ret; Reference< XKeysSupplier > keySupplier; Statics & st = getStatics(); @@ -393,7 +388,7 @@ static Sequence< ::rtl::OUString > lookupKeys( Reference< XPropertySet > set; enumeration->nextElement() >>= set; OUString name; -// ::rtl::OUString schema; +// OUString schema; if( set->getPropertyValue( st.NAME ) >>= name ) { @@ -410,7 +405,7 @@ static Sequence< ::rtl::OUString > lookupKeys( keySupplier.clear(); if( isLog( pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( "Can't offer updateable result set because table " ); buf.append( OUStringToOString(name, pSettings->encoding) ); buf.append( " is duplicated, add schema to resolve ambiguity" ); @@ -427,7 +422,7 @@ static Sequence< ::rtl::OUString > lookupKeys( { if( isLog( pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( "Can't offer updateable result set ( table " ); buf.append( OUStringToOString(table, pSettings->encoding) ); buf.append( " is unknown)" ); @@ -474,7 +469,7 @@ static Sequence< ::rtl::OUString > lookupKeys( { if( isLog( pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( "Can't offer updateable result set ( table " ); buf.append( OUStringToOString(table, pSettings->encoding) ); buf.append( " does not have a primary key)" ); @@ -485,7 +480,7 @@ static Sequence< ::rtl::OUString > lookupKeys( return ret; } -bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data ) +bool executePostgresCommand( const OString & cmd, struct CommandData *data ) { ConnectionSettings *pSettings = *(data->ppSettings); @@ -498,7 +493,7 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data ExecStatusType state = PQresultStatus( result ); *(data->pLastOidInserted) = 0; - *(data->pLastTableInserted) = rtl::OUString(); + *(data->pLastTableInserted) = OUString(); *(data->pLastQuery) = cmd; sal_Bool ret = sal_False; @@ -518,7 +513,7 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data extractTableFromInsert( OStringToOUString( cmd, pSettings->encoding ) ); if( isLog( pSettings, LogLevel::SQL ) ) { - rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( "executed command '" ); buf.append( cmd.getStr() ); buf.append( "' successfully (" ); @@ -545,7 +540,7 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data // In case it is a single table, it has a primary key and all columns // belonging to the primary key are in the result set, allow updateable result sets // otherwise, don't - rtl::OUString table, schema; + OUString table, schema; Sequence< OUString > sourceTableKeys; OStringVector vec; tokenizeSQL( cmd, vec ); @@ -589,7 +584,7 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data } else if( ! table.getLength() ) { - rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( RTL_CONSTASCII_STRINGPARAM( "can't support updateable resultset, because a single table in the " @@ -600,35 +595,35 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data } else if( sourceTableKeys.getLength() ) { - ::rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( RTL_CONSTASCII_STRINGPARAM( "can't support updateable resultset for table " ) ); - buf.append( rtl::OUStringToOString( schema, pSettings->encoding ) ); + buf.append( OUStringToOString( schema, pSettings->encoding ) ); buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) ); - buf.append( rtl::OUStringToOString( table, pSettings->encoding ) ); + buf.append( OUStringToOString( table, pSettings->encoding ) ); buf.append( RTL_CONSTASCII_STRINGPARAM( ", because resultset does not contain a part of the primary key ( column " ) ); - buf.append( rtl::OUStringToOString( sourceTableKeys[i], pSettings->encoding ) ); + buf.append( OUStringToOString( sourceTableKeys[i], pSettings->encoding ) ); buf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") ); aReason = buf.makeStringAndClear(); } else { - ::rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( RTL_CONSTASCII_STRINGPARAM( "can't support updateable resultset for table " ) ); - buf.append( rtl::OUStringToOString( schema, pSettings->encoding ) ); + buf.append( OUStringToOString( schema, pSettings->encoding ) ); buf.append( RTL_CONSTASCII_STRINGPARAM( "." ) ); - buf.append( rtl::OUStringToOString( table, pSettings->encoding ) ); + buf.append( OUStringToOString( table, pSettings->encoding ) ); buf.append( RTL_CONSTASCII_STRINGPARAM( ", because resultset table does not have a primary key " ) ); aReason = buf.makeStringAndClear(); } } else { - ::rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( RTL_CONSTASCII_STRINGPARAM( "can't support updateable result for selects with multiple tables (" ) ); @@ -669,7 +664,7 @@ bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data ret = sal_True; if( isLog( pSettings, LogLevel::SQL ) ) { - rtl::OStringBuffer buf( 128 ); + OStringBuffer buf( 128 ); buf.append( RTL_CONSTASCII_STRINGPARAM("executed query '") ); buf.append( cmd ); buf.append( RTL_CONSTASCII_STRINGPARAM("' successfully") ); @@ -763,8 +758,8 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert( ConnectionSettings *pConnectionSettings, const Reference< XConnection > &connection, sal_Int32 nLastOid, - const rtl::OUString & lastTableInserted, - const rtl::OString & lastQuery ) + const OUString & lastTableInserted, + const OString & lastQuery ) { Reference< XResultSet > ret; OUString query; @@ -791,7 +786,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert( extractNameValuePairsFromInsert( namedValues, lastQuery ); // debug ... -// rtl::OStringBuffer buf( 128); +// OStringBuffer buf( 128); // buf.append( "extracting name/value from '" ); // buf.append( lastQuery.getStr() ); // buf.append( "' to [" ); @@ -900,7 +895,7 @@ sal_Bool Statement::execute( const OUString& sql ) OString cmd = OUStringToOString( sql, m_pSettings ); m_lastResultset.clear(); - m_lastTableInserted = rtl::OUString(); + m_lastTableInserted = OUString(); struct CommandData data; data.refMutex = m_refMutex; diff --git a/connectivity/source/drivers/postgresql/pq_statement.hxx b/connectivity/source/drivers/postgresql/pq_statement.hxx index 5bbb5d7b50e4..1f6d229f3e70 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.hxx +++ b/connectivity/source/drivers/postgresql/pq_statement.hxx @@ -100,8 +100,8 @@ private: sal_Bool m_multipleResultAvailable; sal_Int32 m_multipleResultUpdateCount; sal_Int32 m_lastOidInserted; - rtl::OUString m_lastTableInserted; - rtl::OString m_lastQuery; + OUString m_lastTableInserted; + OString m_lastQuery; public: /** @@ -125,11 +125,11 @@ public: // XCloseable public: // XStatement virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL executeQuery( - const ::rtl::OUString& sql ) + const OUString& sql ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL executeUpdate( const ::rtl::OUString& sql ) + virtual sal_Int32 SAL_CALL executeUpdate( const OUString& sql ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL execute( const ::rtl::OUString& sql ) + virtual sal_Bool SAL_CALL execute( const OUString& sql ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getConnection( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -194,7 +194,7 @@ public: // XResultSetMetaDataSupplier (is required by framework (see private: void checkClosed() throw (com::sun::star::sdbc::SQLException, com::sun::star::uno::RuntimeException); - void raiseSQLException( const ::rtl::OUString & sql, const char * errorMsg, const char *errorType = 0 ) + void raiseSQLException( const OUString & sql, const char * errorMsg, const char *errorType = 0 ) throw ( com::sun::star::sdbc::SQLException ); }; @@ -205,22 +205,22 @@ struct CommandData sal_Int32 *pLastOidInserted; sal_Int32 *pMultipleResultUpdateCount; sal_Bool *pMultipleResultAvailable; - ::rtl::OUString *pLastTableInserted; + OUString *pLastTableInserted; ::com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > *pLastResultset; - ::rtl::OString *pLastQuery; + OString *pLastQuery; ::rtl::Reference< RefCountedMutex > refMutex; ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > owner; ::com::sun::star::uno::Reference< com::sun::star::sdbcx::XTablesSupplier > tableSupplier; sal_Int32 concurrency; }; -bool executePostgresCommand( const rtl::OString & cmd, struct CommandData *data ); +bool executePostgresCommand( const OString & cmd, struct CommandData *data ); com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet > getGeneratedValuesFromLastInsert( ConnectionSettings *pConnectionSettings, const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > &connection, sal_Int32 nLastOid, - const rtl::OUString & lastTableInserted, - const rtl::OString & lastQuery ); + const OUString & lastTableInserted, + const OString & lastQuery ); } diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx index 07bff82827c9..20180abb707f 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.cxx +++ b/connectivity/source/drivers/postgresql/pq_statics.cxx @@ -62,7 +62,6 @@ #include <string.h> -using rtl::OUString; using com::sun::star::uno::Sequence; using com::sun::star::uno::Any; using com::sun::star::uno::Type; @@ -110,7 +109,7 @@ struct PropertyDef { PropertyDef( const OUString &str, const Type &t ) : name( str ) , type( t ) {} - ::rtl::OUString name; + OUString name; com::sun::star::uno::Type type; }; @@ -219,10 +218,10 @@ Statics & getStatics() statics.CATALOG = "Catalog"; - Type tString = getCppuType( (rtl::OUString *) 0 ); + Type tString = getCppuType( (OUString *) 0 ); Type tInt = getCppuType( (sal_Int32 * ) 0 ); Type tBool = getBooleanCppuType(); - Type tStringSequence = getCppuType( (com::sun::star::uno::Sequence< ::rtl::OUString > *) 0); + Type tStringSequence = getCppuType( (com::sun::star::uno::Sequence< OUString > *) 0); // Table props set ImplementationStatics &ist = statics.refl.table; @@ -728,10 +727,10 @@ Statics & getStatics() { statics.typeInfoMetaData.push_back( ColumnMetaData( - rtl::OUString::createFromAscii( defTypeInfoMetaData[i].columnName ), - rtl::OUString::createFromAscii( defTypeInfoMetaData[i].tableName ), - rtl::OUString::createFromAscii( defTypeInfoMetaData[i].schemaTableName ), - rtl::OUString::createFromAscii( defTypeInfoMetaData[i].typeName ), + OUString::createFromAscii( defTypeInfoMetaData[i].columnName ), + OUString::createFromAscii( defTypeInfoMetaData[i].tableName ), + OUString::createFromAscii( defTypeInfoMetaData[i].schemaTableName ), + OUString::createFromAscii( defTypeInfoMetaData[i].typeName ), defTypeInfoMetaData[i].type, defTypeInfoMetaData[i].precision, defTypeInfoMetaData[i].scale, diff --git a/connectivity/source/drivers/postgresql/pq_statics.hxx b/connectivity/source/drivers/postgresql/pq_statics.hxx index 9404c27a19eb..ca8103e4c23a 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.hxx +++ b/connectivity/source/drivers/postgresql/pq_statics.hxx @@ -77,10 +77,10 @@ namespace pq_sdbc_driver struct ColumnMetaData { ColumnMetaData( - const rtl::OUString &_columnName, - const rtl::OUString &_tableName, - const rtl::OUString &_schemaTableName, - const rtl::OUString &_typeName, + const OUString &_columnName, + const OUString &_tableName, + const OUString &_schemaTableName, + const OUString &_typeName, sal_Int32 _type, sal_Int32 _precision, sal_Int32 _scale, @@ -103,10 +103,10 @@ struct ColumnMetaData isSigned( _isSigned ) {} - rtl::OUString columnName; - rtl::OUString tableName; - rtl::OUString schemaTableName; - rtl::OUString typeName; + OUString columnName; + OUString tableName; + OUString schemaTableName; + OUString typeName; sal_Int32 type; sal_Int32 precision; sal_Int32 scale; @@ -130,11 +130,11 @@ struct TypeDetails typedef ::boost::unordered_map < - rtl::OUString, + OUString, sal_Int32, - rtl::OUStringHash, - ::std::equal_to< rtl::OUString >, - Allocator< ::std::pair< const ::rtl::OUString , sal_Int32 > > + OUStringHash, + ::std::equal_to< OUString >, + Allocator< ::std::pair< const OUString , sal_Int32 > > > BaseTypeMap; @@ -147,8 +147,8 @@ struct ImplementationStatics rtl_createUuid( (sal_uInt8*)implementationId.getArray(), 0 , sal_False ); } - rtl::OUString implName; - com::sun::star::uno::Sequence< ::rtl::OUString > serviceNames; + OUString implName; + com::sun::star::uno::Sequence< OUString > serviceNames; com::sun::star::uno::Sequence< sal_Int8 > implementationId; cppu::IPropertyArrayHelper *pProps; com::sun::star::uno::Sequence< com::sun::star::uno::Type > types; @@ -185,98 +185,98 @@ static const sal_Int32 TABLE_INDEX_REMARKS = 4; struct Statics { - ::rtl::OUString SYSTEM_TABLE; - ::rtl::OUString TABLE; - ::rtl::OUString VIEW; - ::rtl::OUString UNKNOWN; - ::rtl::OUString YES; - ::rtl::OUString NO; - ::rtl::OUString NO_NULLS; - ::rtl::OUString NULABLE; - ::rtl::OUString NULLABLE_UNKNOWN; - ::rtl::OUString SELECT; - ::rtl::OUString UPDATE; - ::rtl::OUString INSERT; - ::rtl::OUString DELETE; - ::rtl::OUString RULE; - ::rtl::OUString REFERENCES; - ::rtl::OUString TRIGGER; - ::rtl::OUString EXECUTE; - ::rtl::OUString USAGE; - ::rtl::OUString CREATE; - ::rtl::OUString TEMPORARY; - ::rtl::OUString INDEX; - ::rtl::OUString INDEX_COLUMN; - - ::rtl::OUString NAME; - ::rtl::OUString SCHEMA_NAME; - ::rtl::OUString CATALOG_NAME; - ::rtl::OUString DESCRIPTION; - ::rtl::OUString TYPE; - ::rtl::OUString TYPE_NAME; - ::rtl::OUString PRIVILEGES; - - ::rtl::OUString DEFAULT_VALUE; - ::rtl::OUString IS_AUTO_INCREMENT; - ::rtl::OUString IS_CURRENCY; - ::rtl::OUString IS_NULLABLE; - ::rtl::OUString IS_ROW_VERSISON; - ::rtl::OUString PRECISION; - ::rtl::OUString SCALE; - - ::rtl::OUString cPERCENT; - - ::rtl::OUString BEGIN; - ::rtl::OUString ROLLBACK; - ::rtl::OUString COMMIT; - - ::rtl::OUString KEY; - ::rtl::OUString REFERENCED_TABLE; - ::rtl::OUString UPDATE_RULE; - ::rtl::OUString DELETE_RULE; - ::rtl::OUString PRIVATE_COLUMNS; - ::rtl::OUString PRIVATE_FOREIGN_COLUMNS; - - ::rtl::OUString KEY_COLUMN; - ::rtl::OUString RELATED_COLUMN; - - ::rtl::OUString PASSWORD; - ::rtl::OUString USER; - - ::rtl::OUString CURSOR_NAME; - ::rtl::OUString ESCAPE_PROCESSING; - ::rtl::OUString FETCH_DIRECTION; - ::rtl::OUString FETCH_SIZE; - ::rtl::OUString IS_BOOKMARKABLE; - ::rtl::OUString RESULT_SET_CONCURRENCY; - ::rtl::OUString RESULT_SET_TYPE; - - ::rtl::OUString COMMAND; - ::rtl::OUString CHECK_OPTION; - - ::rtl::OUString TRUE; - ::rtl::OUString FALSE; - - ::rtl::OUString IS_PRIMARY_KEY_INDEX; - ::rtl::OUString IS_CLUSTERED; - ::rtl::OUString IS_UNIQUE; - ::rtl::OUString PRIVATE_COLUMN_INDEXES; - ::rtl::OUString HELP_TEXT; - - ::rtl::OUString CATALOG; - ::rtl::OUString IS_ASCENDING; + OUString SYSTEM_TABLE; + OUString TABLE; + OUString VIEW; + OUString UNKNOWN; + OUString YES; + OUString NO; + OUString NO_NULLS; + OUString NULABLE; + OUString NULLABLE_UNKNOWN; + OUString SELECT; + OUString UPDATE; + OUString INSERT; + OUString DELETE; + OUString RULE; + OUString REFERENCES; + OUString TRIGGER; + OUString EXECUTE; + OUString USAGE; + OUString CREATE; + OUString TEMPORARY; + OUString INDEX; + OUString INDEX_COLUMN; + + OUString NAME; + OUString SCHEMA_NAME; + OUString CATALOG_NAME; + OUString DESCRIPTION; + OUString TYPE; + OUString TYPE_NAME; + OUString PRIVILEGES; + + OUString DEFAULT_VALUE; + OUString IS_AUTO_INCREMENT; + OUString IS_CURRENCY; + OUString IS_NULLABLE; + OUString IS_ROW_VERSISON; + OUString PRECISION; + OUString SCALE; + + OUString cPERCENT; + + OUString BEGIN; + OUString ROLLBACK; + OUString COMMIT; + + OUString KEY; + OUString REFERENCED_TABLE; + OUString UPDATE_RULE; + OUString DELETE_RULE; + OUString PRIVATE_COLUMNS; + OUString PRIVATE_FOREIGN_COLUMNS; + + OUString KEY_COLUMN; + OUString RELATED_COLUMN; + + OUString PASSWORD; + OUString USER; + + OUString CURSOR_NAME; + OUString ESCAPE_PROCESSING; + OUString FETCH_DIRECTION; + OUString FETCH_SIZE; + OUString IS_BOOKMARKABLE; + OUString RESULT_SET_CONCURRENCY; + OUString RESULT_SET_TYPE; + + OUString COMMAND; + OUString CHECK_OPTION; + + OUString TRUE; + OUString FALSE; + + OUString IS_PRIMARY_KEY_INDEX; + OUString IS_CLUSTERED; + OUString IS_UNIQUE; + OUString PRIVATE_COLUMN_INDEXES; + OUString HELP_TEXT; + + OUString CATALOG; + OUString IS_ASCENDING; ReflectionImplementations refl; - com::sun::star::uno::Sequence< ::rtl::OUString > tablesRowNames; - com::sun::star::uno::Sequence< ::rtl::OUString > columnRowNames; - com::sun::star::uno::Sequence< ::rtl::OUString > primaryKeyNames; - com::sun::star::uno::Sequence< ::rtl::OUString > tablePrivilegesNames; - com::sun::star::uno::Sequence< ::rtl::OUString > schemaNames; - com::sun::star::uno::Sequence< ::rtl::OUString > tableTypeNames; - com::sun::star::uno::Sequence< ::rtl::OUString > typeinfoColumnNames; - com::sun::star::uno::Sequence< ::rtl::OUString > indexinfoColumnNames; - com::sun::star::uno::Sequence< ::rtl::OUString > importedKeysColumnNames; - com::sun::star::uno::Sequence< ::rtl::OUString > resultSetArrayColumnNames; + com::sun::star::uno::Sequence< OUString > tablesRowNames; + com::sun::star::uno::Sequence< OUString > columnRowNames; + com::sun::star::uno::Sequence< OUString > primaryKeyNames; + com::sun::star::uno::Sequence< OUString > tablePrivilegesNames; + com::sun::star::uno::Sequence< OUString > schemaNames; + com::sun::star::uno::Sequence< OUString > tableTypeNames; + com::sun::star::uno::Sequence< OUString > typeinfoColumnNames; + com::sun::star::uno::Sequence< OUString > indexinfoColumnNames; + com::sun::star::uno::Sequence< OUString > importedKeysColumnNames; + com::sun::star::uno::Sequence< OUString > resultSetArrayColumnNames; com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > > tableTypeData; ColumnMetaDataVector typeInfoMetaData; diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 2cb273678019..cf650668c126 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -75,8 +75,6 @@ #include <libpq-fe.h> #include <string.h> -using rtl::OUString; -using rtl::OUStringBuffer; using com::sun::star::beans::XPropertySet; @@ -107,14 +105,14 @@ using com::sun::star::container::XEnumerationAccess; namespace pq_sdbc_driver { -rtl::OUString date2String( const com::sun::star::util::Date & x ) +OUString date2String( const com::sun::star::util::Date & x ) { char buffer[64]; sprintf( buffer, "%d-%02d-%02d", x.Year, x.Month, x.Day ); return OUString::createFromAscii( buffer ); } -com::sun::star::util::Date string2Date( const rtl::OUString &date ) +com::sun::star::util::Date string2Date( const OUString &date ) { // Format: Year-Month-Day com::sun::star::util::Date ret; @@ -135,7 +133,7 @@ com::sun::star::util::Date string2Date( const rtl::OUString &date ) return ret; } -rtl::OUString time2String( const com::sun::star::util::Time & x ) +OUString time2String( const com::sun::star::util::Time & x ) { char buffer[64]; sprintf( buffer, "%02d:%02d:%02d.%02d", x.Hours, x.Minutes, x.Seconds, x.HundredthSeconds ); @@ -144,7 +142,7 @@ rtl::OUString time2String( const com::sun::star::util::Time & x ) } -com::sun::star::util::Time string2Time( const rtl::OUString & time ) +com::sun::star::util::Time string2Time( const OUString & time ) { com::sun::star::util::Time ret; @@ -173,7 +171,7 @@ com::sun::star::util::Time string2Time( const rtl::OUString & time ) -rtl::OUString dateTime2String( const com::sun::star::util::DateTime & x ) +OUString dateTime2String( const com::sun::star::util::DateTime & x ) { char buffer[128]; sprintf( buffer, "%d-%02d-%02d %02d:%02d:%02d.%02d", @@ -183,7 +181,7 @@ rtl::OUString dateTime2String( const com::sun::star::util::DateTime & x ) } -com::sun::star::util::DateTime string2DateTime( const rtl::OUString & dateTime ) +com::sun::star::util::DateTime string2DateTime( const OUString & dateTime ) { int space = dateTime.indexOf( ' ' ); com::sun::star::util::DateTime ret; @@ -204,29 +202,29 @@ com::sun::star::util::DateTime string2DateTime( const rtl::OUString & dateTime ) return ret; } -rtl::OUString concatQualified( const rtl::OUString & a, const rtl::OUString &b) +OUString concatQualified( const OUString & a, const OUString &b) { - rtl::OUStringBuffer buf( a.getLength() + 2 + b.getLength() ); + OUStringBuffer buf( a.getLength() + 2 + b.getLength() ); buf.append( a ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) ); buf.append( b ); return buf.makeStringAndClear(); } -static inline rtl::OString iOUStringToOString( const rtl::OUString str, ConnectionSettings *settings) { +static inline OString iOUStringToOString( const OUString str, ConnectionSettings *settings) { OSL_ENSURE(settings, "pgsql-sdbc: OUStringToOString got NULL settings"); - return rtl::OUStringToOString( str, settings->encoding ); + return OUStringToOString( str, settings->encoding ); } -rtl::OString OUStringToOString( const rtl::OUString str, ConnectionSettings *settings) { +OString OUStringToOString( const OUString str, ConnectionSettings *settings) { return iOUStringToOString( str, settings ); } -void bufferEscapeConstant( rtl::OUStringBuffer & buf, const rtl::OUString & value, ConnectionSettings *settings ) +void bufferEscapeConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) { - rtl::OString y = iOUStringToOString( value, settings ); - rtl::OStringBuffer strbuf( y.getLength() * 2 + 2 ); + OString y = iOUStringToOString( value, settings ); + OStringBuffer strbuf( y.getLength() * 2 + 2 ); int error; int len = PQescapeStringConn(settings->pConnection, ((char*)strbuf.getStr()), y.getStr() , y.getLength(), &error ); if ( error ) @@ -246,22 +244,22 @@ void bufferEscapeConstant( rtl::OUStringBuffer & buf, const rtl::OUString & valu strbuf.setLength( len ); // Previously here RTL_TEXTENCODING_ASCII_US; as we set the PostgreSQL client_encoding to UTF8, // we get UTF8 here, too. I'm not sure why it worked well before... - buf.append( rtl::OStringToOUString( strbuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); + buf.append( OStringToOUString( strbuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); } -static inline void ibufferQuoteConstant( rtl::OUStringBuffer & buf, const rtl::OUString & value, ConnectionSettings *settings ) +static inline void ibufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) { buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "'" ) ); bufferEscapeConstant( buf, value, settings ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "'" ) ); } -void bufferQuoteConstant( rtl::OUStringBuffer & buf, const rtl::OUString & value, ConnectionSettings *settings ) +void bufferQuoteConstant( OUStringBuffer & buf, const OUString & value, ConnectionSettings *settings ) { return ibufferQuoteConstant( buf, value, settings ); } -void bufferQuoteAnyConstant( rtl::OUStringBuffer & buf, const Any &val, ConnectionSettings *settings ) +void bufferQuoteAnyConstant( OUStringBuffer & buf, const Any &val, ConnectionSettings *settings ) { if( val.hasValue() ) { @@ -273,11 +271,11 @@ void bufferQuoteAnyConstant( rtl::OUStringBuffer & buf, const Any &val, Connecti buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "NULL" ) ); } -static inline void ibufferQuoteIdentifier( rtl::OUStringBuffer & buf, const rtl::OUString &toQuote, ConnectionSettings *settings ) +static inline void ibufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ) { OSL_ENSURE(settings, "pgsql-sdbc: bufferQuoteIdentifier got NULL settings"); - rtl::OString y = iOUStringToOString( toQuote, settings ); + OString y = iOUStringToOString( toQuote, settings ); char *cstr = PQescapeIdentifier(settings->pConnection, y.getStr(), y.getLength()); if ( cstr == NULL ) { @@ -289,18 +287,18 @@ static inline void ibufferQuoteIdentifier( rtl::OUStringBuffer & buf, const rtl: -1, Any()); } - buf.append( rtl::OStringToOUString( cstr, RTL_TEXTENCODING_UTF8 ) ); + buf.append( OStringToOUString( cstr, RTL_TEXTENCODING_UTF8 ) ); PQfreemem( cstr ); } -void bufferQuoteIdentifier( rtl::OUStringBuffer & buf, const rtl::OUString &toQuote, ConnectionSettings *settings ) +void bufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ) { return ibufferQuoteIdentifier(buf, toQuote, settings); } void bufferQuoteQualifiedIdentifier( - rtl::OUStringBuffer & buf, const rtl::OUString &schema, const rtl::OUString &table, ConnectionSettings *settings ) + OUStringBuffer & buf, const OUString &schema, const OUString &table, ConnectionSettings *settings ) { ibufferQuoteIdentifier(buf, schema, settings); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) ); @@ -308,10 +306,10 @@ void bufferQuoteQualifiedIdentifier( } void bufferQuoteQualifiedIdentifier( - rtl::OUStringBuffer & buf, - const rtl::OUString &schema, - const rtl::OUString &table, - const rtl::OUString &col, + OUStringBuffer & buf, + const OUString &schema, + const OUString &table, + const OUString &col, ConnectionSettings *settings) { ibufferQuoteIdentifier(buf, schema, settings); @@ -322,16 +320,16 @@ void bufferQuoteQualifiedIdentifier( } -rtl::OUString extractStringProperty( - const Reference< XPropertySet > & descriptor, const rtl::OUString &name ) +OUString extractStringProperty( + const Reference< XPropertySet > & descriptor, const OUString &name ) { - rtl::OUString value; + OUString value; descriptor->getPropertyValue( name ) >>= value; return value; } sal_Bool extractBoolProperty( - const Reference< XPropertySet > & descriptor, const rtl::OUString &name ) + const Reference< XPropertySet > & descriptor, const OUString &name ) { sal_Bool value = sal_False; descriptor->getPropertyValue( name ) >>= value; @@ -339,7 +337,7 @@ sal_Bool extractBoolProperty( } sal_Int32 extractIntProperty( - const Reference< XPropertySet > & descriptor, const rtl::OUString &name ) + const Reference< XPropertySet > & descriptor, const OUString &name ) { sal_Int32 ret = 0; descriptor->getPropertyValue( name ) >>= ret; @@ -381,7 +379,7 @@ Reference< XConnection > extractConnectionFromStatement( const Reference< XInter if( ! ret.is() ) throw SQLException( "PQSDBC: Couldn't retrieve connection from statement", - Reference< XInterface > () , rtl::OUString(), 0 , com::sun::star::uno::Any() ); + Reference< XInterface > () , OUString(), 0 , com::sun::star::uno::Any() ); } return ret; @@ -410,7 +408,7 @@ void TransactionGuard::commit() m_commited = sal_True; } -void TransactionGuard::executeUpdate( const rtl::OUString & sql ) +void TransactionGuard::executeUpdate( const OUString & sql ) { m_stmt->executeUpdate( sql ); } @@ -436,9 +434,9 @@ bool isWhitespace( sal_Unicode c ) return ' ' == c || 9 == c || 10 == c || 13 == c; } -::rtl::OUString extractTableFromInsert( const rtl::OUString & sql ) +OUString extractTableFromInsert( const OUString & sql ) { - rtl::OUString ret; + OUString ret; int i = 0; for( ; i < sql.getLength() && isWhitespace(sql[i]) ; i++ ); @@ -484,7 +482,7 @@ bool isWhitespace( sal_Unicode c ) } } } - ret = rtl::OUString( &sql.getStr()[start], i - start ).trim(); + ret = OUString( &sql.getStr()[start], i - start ).trim(); // printf( "pq_statement: parsed table name %s from insert\n" , // OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US).getStr() ); } @@ -524,7 +522,7 @@ static bool isOperator( char c ) return ret; } -void splitSQL( const rtl::OString & sql, OStringVector &vec ) +void splitSQL( const OString & sql, OStringVector &vec ) { int length = sql.getLength(); @@ -539,7 +537,7 @@ void splitSQL( const rtl::OString & sql, OStringVector &vec ) { if( '"' == c ) { - vec.push_back( rtl::OString( &sql.getStr()[start], i-start+1 ) ); + vec.push_back( OString( &sql.getStr()[start], i-start+1 ) ); start = i + 1; doubleQuote = false; } @@ -554,7 +552,7 @@ void splitSQL( const rtl::OString & sql, OStringVector &vec ) } else if( '\'' == c ) { - vec.push_back( rtl::OString( &sql.getStr()[start], i - start +1 ) ); + vec.push_back( OString( &sql.getStr()[start], i - start +1 ) ); start = i + 1; // leave single quotes ! singleQuote = false; } @@ -563,20 +561,20 @@ void splitSQL( const rtl::OString & sql, OStringVector &vec ) { if( '"' == c ) { - vec.push_back( rtl::OString( &sql.getStr()[start], i - start ) ); + vec.push_back( OString( &sql.getStr()[start], i - start ) ); doubleQuote = true; start = i; } else if( '\'' == c ) { - vec.push_back( rtl::OString( &sql.getStr()[start], i - start ) ); + vec.push_back( OString( &sql.getStr()[start], i - start ) ); singleQuote = true; start = i; } } } if( start < i ) - vec.push_back( rtl::OString( &sql.getStr()[start] , i - start ) ); + vec.push_back( OString( &sql.getStr()[start] , i - start ) ); // for( i = 0 ; i < vec.size() ; i ++ ) // printf( "%s!" , vec[i].getStr() ); @@ -584,7 +582,7 @@ void splitSQL( const rtl::OString & sql, OStringVector &vec ) } -void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ) +void tokenizeSQL( const OString & sql, OStringVector &vec ) { int length = sql.getLength(); @@ -599,7 +597,7 @@ void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ) { if( '"' == c ) { - vec.push_back( rtl::OString( &sql.getStr()[start], i-start ) ); + vec.push_back( OString( &sql.getStr()[start], i-start ) ); start = i + 1; doubleQuote = false; } @@ -608,7 +606,7 @@ void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ) { if( '\'' == c ) { - vec.push_back( rtl::OString( &sql.getStr()[start], i - start +1 ) ); + vec.push_back( OString( &sql.getStr()[start], i - start +1 ) ); start = i + 1; // leave single quotes ! singleQuote = false; } @@ -631,15 +629,15 @@ void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ) start ++; // skip additional whitespace else { - vec.push_back( rtl::OString( &sql.getStr()[start], i - start ) ); + vec.push_back( OString( &sql.getStr()[start], i - start ) ); start = i +1; } } else if( ',' == c || isOperator( c ) || '(' == c || ')' == c ) { if( i - start ) - vec.push_back( rtl::OString( &sql.getStr()[start], i - start ) ); - vec.push_back( rtl::OString( &sql.getStr()[i], 1 ) ); + vec.push_back( OString( &sql.getStr()[start], i - start ) ); + vec.push_back( OString( &sql.getStr()[i], 1 ) ); start = i + 1; } else if( '.' == c ) @@ -652,15 +650,15 @@ void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ) else { if( i - start ) - vec.push_back( rtl::OString( &sql.getStr()[start], i - start ) ); - vec.push_back( rtl::OString( RTL_CONSTASCII_STRINGPARAM( "." ) ) ); + vec.push_back( OString( &sql.getStr()[start], i - start ) ); + vec.push_back( OString( RTL_CONSTASCII_STRINGPARAM( "." ) ) ); start = i + 1; } } } } if( start < i ) - vec.push_back( rtl::OString( &sql.getStr()[start] , i - start ) ); + vec.push_back( OString( &sql.getStr()[start] , i - start ) ); // for( i = 0 ; i < vec.size() ; i ++ ) // printf( "%s!" , vec[i].getStr() ); @@ -668,21 +666,21 @@ void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ) } -void splitConcatenatedIdentifier( const rtl::OUString & source, rtl::OUString *first, rtl::OUString *second) +void splitConcatenatedIdentifier( const OUString & source, OUString *first, OUString *second) { OStringVector vec; - tokenizeSQL( rtl::OUStringToOString( source, RTL_TEXTENCODING_UTF8 ), vec ); + tokenizeSQL( OUStringToOString( source, RTL_TEXTENCODING_UTF8 ), vec ); if( vec.size() == 3 ) { - *first = rtl::OStringToOUString( vec[0] , RTL_TEXTENCODING_UTF8 ); - *second = rtl::OStringToOUString( vec[2], RTL_TEXTENCODING_UTF8 ); + *first = OStringToOUString( vec[0] , RTL_TEXTENCODING_UTF8 ); + *second = OStringToOUString( vec[2], RTL_TEXTENCODING_UTF8 ); } } typedef std::vector< sal_Int32 , Allocator< sal_Int32 > > IntVector; -rtl::OUString array2String( const com::sun::star::uno::Sequence< Any > &seq ) +OUString array2String( const com::sun::star::uno::Sequence< Any > &seq ) { OUStringBuffer buf(128); int len = seq.getLength(); @@ -718,7 +716,7 @@ std::vector Allocator< com::sun::star::uno::Any > > AnyVector; -com::sun::star::uno::Sequence< Any > parseArray( const rtl::OUString & str ) throw( SQLException ) +com::sun::star::uno::Sequence< Any > parseArray( const OUString & str ) throw( SQLException ) { com::sun::star::uno::Sequence< Any > ret; @@ -769,7 +767,7 @@ com::sun::star::uno::Sequence< Any > parseArray( const rtl::OUString & str ) thr buf.appendAscii( "')" ); throw SQLException( buf.makeStringAndClear(), - Reference< XInterface > (), rtl::OUString(), 1, Any() ); + Reference< XInterface > (), OUString(), 1, Any() ); } if( brackets == 0 ) { @@ -818,7 +816,7 @@ com::sun::star::uno::Sequence< Any > parseArray( const rtl::OUString & str ) thr return sequence_of_vector(elements); } -com::sun::star::uno::Sequence< sal_Int32 > parseIntArray( const ::rtl::OUString & str ) +com::sun::star::uno::Sequence< sal_Int32 > parseIntArray( const OUString & str ) { sal_Int32 start = 0; IntVector vec; @@ -837,8 +835,8 @@ com::sun::star::uno::Sequence< sal_Int32 > parseIntArray( const ::rtl::OUString void fillAttnum2attnameMap( Int2StringMap &map, const Reference< com::sun::star::sdbc::XConnection > &conn, - const rtl::OUString &schema, - const rtl::OUString &table ) + const OUString &schema, + const OUString &table ) { Reference< XPreparedStatement > prep = conn->prepareStatement( "SELECT attname,attnum " @@ -859,9 +857,9 @@ void fillAttnum2attnameMap( } } -::rtl::OString extractSingleTableFromSelect( const OStringVector &vec ) +OString extractSingleTableFromSelect( const OStringVector &vec ) { - rtl::OString ret; + OString ret; if( 0 == rtl_str_shortenedCompareIgnoreAsciiCase_WithLength( vec[0].pData->buffer, vec[0].pData->length, "select" , 6 , 6 ) ) @@ -890,7 +888,7 @@ void fillAttnum2attnameMap( RTL_CONSTASCII_STRINGPARAM("(") ) ) { // it is a table or a function name - rtl::OStringBuffer buf(128); + OStringBuffer buf(128); if( '"' == vec[token][0] ) buf.append( &(vec[token].getStr()[1]) , vec[token].getLength() -2 ); else @@ -924,7 +922,7 @@ void fillAttnum2attnameMap( RTL_CONSTASCII_STRINGPARAM( "(" ) ) == 0 ) { // whoops, it is a function - ret = rtl::OString(); + ret = OString(); } else { @@ -944,7 +942,7 @@ void fillAttnum2attnameMap( RTL_CONSTASCII_STRINGPARAM( "," ) ) == 0 ) { // whoops, multiple tables are used - ret = rtl::OString(); + ret = OString(); } else { @@ -958,7 +956,7 @@ void fillAttnum2attnameMap( strlen(forbiddenKeywords[i]) ) ) { // whoops, it is a join - ret = rtl::OString(); + ret = OString(); } } } @@ -970,7 +968,7 @@ void fillAttnum2attnameMap( } -com::sun::star::uno::Sequence< sal_Int32 > string2intarray( const ::rtl::OUString & str ) +com::sun::star::uno::Sequence< sal_Int32 > string2intarray( const OUString & str ) { com::sun::star::uno::Sequence< sal_Int32 > ret; const sal_Int32 strlen = str.getLength(); @@ -991,7 +989,7 @@ com::sun::star::uno::Sequence< sal_Int32 > string2intarray( const ::rtl::OUStrin std::vector< sal_Int32, Allocator< sal_Int32 > > vec; do { - ::rtl::OUString digits; + OUString digits; sal_Int32 c; while ( isdigit( c = str.iterateCodePoints(&start) ) ) { @@ -1017,10 +1015,10 @@ com::sun::star::uno::Sequence< sal_Int32 > string2intarray( const ::rtl::OUStrin } -Sequence< rtl::OUString > convertMappedIntArray2StringArray( +Sequence< OUString > convertMappedIntArray2StringArray( const Int2StringMap &map, const Sequence< sal_Int32 > &intArray ) { - Sequence< ::rtl::OUString > ret( intArray.getLength() ); + Sequence< OUString > ret( intArray.getLength() ); for( int i = 0; i < intArray.getLength() ; i ++ ) { Int2StringMap::const_iterator ii = map.find( intArray[i] ); @@ -1031,7 +1029,7 @@ Sequence< rtl::OUString > convertMappedIntArray2StringArray( } -::rtl::OUString sqltype2string( const Reference< XPropertySet > & desc ) +OUString sqltype2string( const Reference< XPropertySet > & desc ) { OUStringBuffer typeName; typeName.append( extractStringProperty( desc, getStatics().TYPE_NAME ) ); @@ -1183,13 +1181,13 @@ void bufferKey2TableConstraint( } -static bool equalsIgnoreCase( const rtl::OString & str, const char *str2, int length2 ) +static bool equalsIgnoreCase( const OString & str, const char *str2, int length2 ) { return 0 == rtl_str_compareIgnoreAsciiCase_WithLength( str.pData->buffer, str.pData->length, str2, length2 ); } -void extractNameValuePairsFromInsert( String2StringMap & map, const rtl::OString & lastQuery ) +void extractNameValuePairsFromInsert( String2StringMap & map, const OString & lastQuery ) { OStringVector vec; tokenizeSQL( lastQuery, vec ); @@ -1204,7 +1202,7 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const rtl::OString // printf( "1a\n" ); // extract table name - rtl::OString tableName; + OString tableName; if( equalsIgnoreCase( vec[n+1], RTL_CONSTASCII_STRINGPARAM( "." ) ) ) { tableName = vec[n]; @@ -1255,9 +1253,9 @@ void extractNameValuePairsFromInsert( String2StringMap & map, const rtl::OString } } -rtl::OUString querySingleValue( +OUString querySingleValue( const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > &connection, - const rtl::OUString &query ) + const OUString &query ) { OUString ret; Reference< XStatement > stmt = connection->createStatement(); @@ -1289,7 +1287,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, break; case typelib_TypeClass_STRING: - _rxParameters->setString(_nColumnIndex, *(rtl::OUString*)_rValue.getValue()); + _rxParameters->setString(_nColumnIndex, *(OUString*)_rValue.getValue()); break; case typelib_TypeClass_BOOLEAN: @@ -1306,7 +1304,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, break; case typelib_TypeClass_CHAR: - _rxParameters->setString(_nColumnIndex, ::rtl::OUString((sal_Unicode *)_rValue.getValue(),1)); + _rxParameters->setString(_nColumnIndex, OUString((sal_Unicode *)_rValue.getValue(),1)); break; case typelib_TypeClass_UNSIGNED_LONG: diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx b/connectivity/source/drivers/postgresql/pq_tools.hxx index fd72b8082395..13a3b11a7244 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.hxx +++ b/connectivity/source/drivers/postgresql/pq_tools.hxx @@ -72,102 +72,102 @@ namespace pq_sdbc_driver { bool isWhitespace( sal_Unicode c ); -rtl::OUString date2String( const com::sun::star::util::Date & date ); -com::sun::star::util::Date string2Date( const rtl::OUString & str ); +OUString date2String( const com::sun::star::util::Date & date ); +com::sun::star::util::Date string2Date( const OUString & str ); -rtl::OUString time2String( const com::sun::star::util::Time & time ); -com::sun::star::util::Time string2Time( const rtl::OUString & str ); +OUString time2String( const com::sun::star::util::Time & time ); +com::sun::star::util::Time string2Time( const OUString & str ); -rtl::OUString dateTime2String( const com::sun::star::util::DateTime & dateTime ); -com::sun::star::util::DateTime string2DateTime( const rtl::OUString & dateTime ); +OUString dateTime2String( const com::sun::star::util::DateTime & dateTime ); +com::sun::star::util::DateTime string2DateTime( const OUString & dateTime ); -rtl::OUString concatQualified( const rtl::OUString & a, const rtl::OUString &b); +OUString concatQualified( const OUString & a, const OUString &b); -rtl::OString OUStringToOString( rtl::OUString str, ConnectionSettings *settings); +OString OUStringToOString( OUString str, ConnectionSettings *settings); -void bufferQuoteConstant( rtl::OUStringBuffer & buf, const rtl::OUString & str, ConnectionSettings *settings ); -void bufferQuoteAnyConstant( rtl::OUStringBuffer & buf, const com::sun::star::uno::Any &val, ConnectionSettings *settings ); +void bufferQuoteConstant( OUStringBuffer & buf, const OUString & str, ConnectionSettings *settings ); +void bufferQuoteAnyConstant( OUStringBuffer & buf, const com::sun::star::uno::Any &val, ConnectionSettings *settings ); -void bufferEscapeConstant( rtl::OUStringBuffer & buf, const rtl::OUString & str, ConnectionSettings *settings ); +void bufferEscapeConstant( OUStringBuffer & buf, const OUString & str, ConnectionSettings *settings ); -::rtl::OUString sqltype2string( +OUString sqltype2string( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & column ); void bufferQuoteQualifiedIdentifier( - rtl::OUStringBuffer & buf, const rtl::OUString &schema, const rtl::OUString &name, ConnectionSettings *settings ); + OUStringBuffer & buf, const OUString &schema, const OUString &name, ConnectionSettings *settings ); void bufferQuoteQualifiedIdentifier( - rtl::OUStringBuffer & buf, - const rtl::OUString &schema, - const rtl::OUString &name, - const rtl::OUString &col, + OUStringBuffer & buf, + const OUString &schema, + const OUString &name, + const OUString &col, ConnectionSettings *settings ); -void bufferQuoteIdentifier( rtl::OUStringBuffer & buf, const rtl::OUString &toQuote, ConnectionSettings *settings ); +void bufferQuoteIdentifier( OUStringBuffer & buf, const OUString &toQuote, ConnectionSettings *settings ); void bufferKey2TableConstraint( - rtl::OUStringBuffer &buf, + OUStringBuffer &buf, const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > &key, ConnectionSettings *settings ); -rtl::OUString extractStringProperty( +OUString extractStringProperty( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & descriptor, - const rtl::OUString &name ); + const OUString &name ); sal_Int32 extractIntProperty( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & descriptor, - const rtl::OUString &name ); + const OUString &name ); sal_Bool extractBoolProperty( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & descriptor, - const rtl::OUString &name ); + const OUString &name ); void disposeNoThrow( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & r ); void disposeObject( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & r ); -::rtl::OUString extractTableFromInsert( const rtl::OUString & sql ); -::rtl::OString extractSingleTableFromSelect( const OStringVector &vec ); +OUString extractTableFromInsert( const OUString & sql ); +OString extractSingleTableFromSelect( const OStringVector &vec ); -void tokenizeSQL( const rtl::OString & sql, OStringVector &vec ); -void splitSQL( const rtl::OString & sql, OStringVector &vec ); -com::sun::star::uno::Sequence< sal_Int32 > parseIntArray( const ::rtl::OUString & str ); -com::sun::star::uno::Sequence< com::sun::star::uno::Any > parseArray( const ::rtl::OUString & str ) +void tokenizeSQL( const OString & sql, OStringVector &vec ); +void splitSQL( const OString & sql, OStringVector &vec ); +com::sun::star::uno::Sequence< sal_Int32 > parseIntArray( const OUString & str ); +com::sun::star::uno::Sequence< com::sun::star::uno::Any > parseArray( const OUString & str ) throw( com::sun::star::sdbc::SQLException ); -rtl::OUString array2String( const com::sun::star::uno::Sequence< com::sun::star::uno::Any > &seq ); +OUString array2String( const com::sun::star::uno::Sequence< com::sun::star::uno::Any > &seq ); com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > extractConnectionFromStatement( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & stmt ); -void splitConcatenatedIdentifier( const rtl::OUString & source, rtl::OUString *first, rtl::OUString *second); +void splitConcatenatedIdentifier( const OUString & source, OUString *first, OUString *second); void fillAttnum2attnameMap( Int2StringMap &map, const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > &conn, - const rtl::OUString &schema, - const rtl::OUString &table ); + const OUString &schema, + const OUString &table ); -com::sun::star::uno::Sequence< sal_Int32 > string2intarray( const ::rtl::OUString & str ); +com::sun::star::uno::Sequence< sal_Int32 > string2intarray( const OUString & str ); -com::sun::star::uno::Sequence< rtl::OUString > convertMappedIntArray2StringArray( +com::sun::star::uno::Sequence< OUString > convertMappedIntArray2StringArray( const Int2StringMap &map, const com::sun::star::uno::Sequence< sal_Int32> &source ); typedef ::boost::unordered_map < - ::rtl::OString, - ::rtl::OString, - ::rtl::OStringHash, - ::std::equal_to< rtl::OString >, - Allocator< ::std::pair< rtl::OString, ::rtl::OString > > + OString, + OString, + OStringHash, + ::std::equal_to< OString >, + Allocator< ::std::pair< OString, OString > > > String2StringMap; -rtl::OUString querySingleValue( +OUString querySingleValue( const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > &connection, - const rtl::OUString &query ); + const OUString &query ); -void extractNameValuePairsFromInsert( String2StringMap & map, const rtl::OString & lastQuery ); -sal_Int32 typeNameToDataType( const rtl::OUString &typeName, const rtl::OUString &typtype ); +void extractNameValuePairsFromInsert( String2StringMap & map, const OString & lastQuery ); +sal_Int32 typeNameToDataType( const OUString &typeName, const OUString &typtype ); // copied from connectivity/source/dbtools, can't use the function directly bool implSetObject( const com::sun::star::uno::Reference< com::sun::star::sdbc::XParameters >& _rxParameters, @@ -192,7 +192,7 @@ public: ~TransactionGuard( ); void commit(); - void executeUpdate( const rtl::OUString & sql ); + void executeUpdate( const OUString & sql ); }; template < typename T, typename Allocator > com::sun::star::uno::Sequence<T> sequence_of_vector ( const std::vector<T, Allocator> &vec ) diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index dbbec1ef68b9..855ae54c00f6 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -72,10 +72,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OStringBuffer; -using rtl::OString; using com::sun::star::uno::Reference; using com::sun::star::uno::makeAny; @@ -109,9 +105,9 @@ com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > UpdateableRes const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, ConnectionSettings **ppSettings, PGresult *result, - const rtl::OUString &schema, - const rtl::OUString &table, - const com::sun::star::uno::Sequence< ::rtl::OUString > &primaryKey ) + const OUString &schema, + const OUString &table, + const com::sun::star::uno::Sequence< OUString > &primaryKey ) { ConnectionSettings *pSettings = *ppSettings; sal_Int32 columnCount = PQnfields( result ); @@ -120,7 +116,7 @@ com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > UpdateableRes for( int i = 0 ; i < columnCount ; i ++ ) { char * name = PQfname( result, i ); - columnNames[i] = rtl::OUString( name, strlen(name), pSettings->encoding ); + columnNames[i] = OUString( name, strlen(name), pSettings->encoding ); } Sequence< Sequence< Any > > data( rowCount ); @@ -136,7 +132,7 @@ com::sun::star::uno::Reference< com::sun::star::sdbc::XCloseable > UpdateableRes char * val = PQgetvalue( result, row, col ); aRow[col] = makeAny( - rtl::OUString( val, strlen( val ) , (*ppSettings)->encoding ) ); + OUString( val, strlen( val ) , (*ppSettings)->encoding ) ); } } data[row] = aRow; @@ -269,7 +265,7 @@ void UpdateableResultSet::insertRow( ) throw (SQLException, RuntimeException) // OUString val; // m_updateableField[i].value >>= val; // buf.append( val ); -// rtl::OStringToOUString(val, (*m_ppSettings)->encoding ) ); +// OStringToOUString(val, (*m_ppSettings)->encoding ) ); } } @@ -505,7 +501,7 @@ void UpdateableResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw m_updateableField[columnIndex-1].value <<= OUString::valueOf( x ); } -void UpdateableResultSet::updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw (SQLException, RuntimeException) +void UpdateableResultSet::updateString( sal_Int32 columnIndex, const OUString& x ) throw (SQLException, RuntimeException) { MutexGuard guard( m_refMutex->mutex ); checkClosed(); diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx index d9460f6868f7..6e2ab362e9a2 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx @@ -84,9 +84,9 @@ class UpdateableResultSet : public com::sun::star::sdbc::XRowUpdate { ConnectionSettings **m_ppSettings; - rtl::OUString m_schema; - rtl::OUString m_table; - com::sun::star::uno::Sequence< rtl::OUString > m_primaryKey; + OUString m_schema; + OUString m_table; + com::sun::star::uno::Sequence< OUString > m_primaryKey; UpdateableFieldVector m_updateableField; com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSetMetaData > m_meta; bool m_insertRow; @@ -95,12 +95,12 @@ protected: UpdateableResultSet( const ::rtl::Reference< RefCountedMutex > & mutex, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, - const com::sun::star::uno::Sequence< rtl::OUString > &colNames, + const com::sun::star::uno::Sequence< OUString > &colNames, const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > > &data, ConnectionSettings **ppSettings, - const rtl::OUString &schema, - const rtl::OUString &table, - const com::sun::star::uno::Sequence< ::rtl::OUString > &primaryKey) + const OUString &schema, + const OUString &table, + const com::sun::star::uno::Sequence< OUString > &primaryKey) : SequenceResultSet( mutex, owner, colNames, data, (*ppSettings)->tc ), m_ppSettings( ppSettings ), m_schema( schema ), @@ -129,7 +129,7 @@ protected: com::sun::star::sdbc::ResultSetType::SCROLL_INSENSITIVE ); } - rtl::OUString buildWhereClause(); + OUString buildWhereClause(); void checkUpdate( sal_Int32 column ); public: @@ -138,9 +138,9 @@ public: const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > &owner, ConnectionSettings **ppSettings, PGresult *result, - const rtl::OUString &schema, - const rtl::OUString &table, - const com::sun::star::uno::Sequence< ::rtl::OUString > &primaryKey ); + const OUString &schema, + const OUString &table, + const com::sun::star::uno::Sequence< OUString > &primaryKey ); public: // XInterface virtual void SAL_CALL acquire() throw() { SequenceResultSet::acquire(); } @@ -172,7 +172,7 @@ public: // XRowUpdate virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx index b07315bd7289..b4d5ee3b167d 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.cxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx @@ -78,8 +78,8 @@ namespace pq_sdbc_driver { ReflectionBase::ReflectionBase( - const ::rtl::OUString &implName, - const ::com::sun::star::uno::Sequence< rtl::OUString > &supportedServices, + const OUString &implName, + const ::com::sun::star::uno::Sequence< OUString > &supportedServices, const ::rtl::Reference< RefCountedMutex > refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > &conn, ConnectionSettings *pSettings, @@ -115,12 +115,12 @@ sal_Bool ReflectionBase::convertFastPropertyValue( } void ReflectionBase::setPropertyValue_NoBroadcast_public( - const rtl::OUString & name, const com::sun::star::uno::Any & value ) + const OUString & name, const com::sun::star::uno::Any & value ) { sal_Int32 nHandle = m_propsDesc.getHandleByName( name ); if( -1 == nHandle ) { - rtl::OUStringBuffer buf(128); + OUStringBuffer buf(128); buf.appendAscii( "Unknown property '" ); buf.append( name ); buf.appendAscii( "' in " ); @@ -135,10 +135,10 @@ void ReflectionBase::setFastPropertyValue_NoBroadcast( const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception) { -// rtl::OUString s; +// OUString s; // rValue >>= s; // printf( "setting value (handle %d):%s\n" , -// nHandle, rtl::OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr() ); +// nHandle, OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr() ); m_values[nHandle] = rValue; } @@ -147,10 +147,10 @@ void ReflectionBase::getFastPropertyValue( sal_Int32 nHandle ) const { rValue = m_values[nHandle]; -// rtl::OUString s; +// OUString s; // rValue >>= s; // printf( "getting value (handle %d):%s\n" , -// nHandle, rtl::OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr() ); +// nHandle, OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr() ); } @@ -160,13 +160,13 @@ Reference < ::com::sun::star::beans::XPropertySetInfo > ReflectionBase::getProp return OPropertySetHelper::createPropertySetInfo( m_propsDesc ); } -rtl::OUString ReflectionBase::getImplementationName() +OUString ReflectionBase::getImplementationName() throw(::com::sun::star::uno::RuntimeException) { return m_implName; } -sal_Bool ReflectionBase::supportsService(const rtl::OUString& ServiceName) +sal_Bool ReflectionBase::supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException) { for( int i = 0 ; i < m_supportedServices.getLength() ; i ++ ) @@ -175,7 +175,7 @@ sal_Bool ReflectionBase::supportsService(const rtl::OUString& ServiceName) return sal_False; } -Sequence< rtl::OUString > ReflectionBase::getSupportedServiceNames(void) +Sequence< OUString > ReflectionBase::getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException) { return m_supportedServices; @@ -249,7 +249,7 @@ void ReflectionBase::copyValuesFrom( const Reference< XPropertySet > & set ) } } -::rtl::OUString ReflectionBase::getName( ) throw (::com::sun::star::uno::RuntimeException) +OUString ReflectionBase::getName( ) throw (::com::sun::star::uno::RuntimeException) { Statics & st = getStatics(); if( getInfoHelper().hasPropertyByName( st.SCHEMA_NAME ) ) @@ -261,11 +261,11 @@ void ReflectionBase::copyValuesFrom( const Reference< XPropertySet > & set ) } -void ReflectionBase::setName( const ::rtl::OUString& /* aName */ ) +void ReflectionBase::setName( const OUString& /* aName */ ) throw (::com::sun::star::uno::RuntimeException) { throw RuntimeException( - rtl::OUString( "pq_sdbc::ReflectionBase::setName not implemented" ), + OUString( "pq_sdbc::ReflectionBase::setName not implemented" ), *this ); //setPropertyValue( getStatics().NAME , makeAny( aName ) ); } diff --git a/connectivity/source/drivers/postgresql/pq_xbase.hxx b/connectivity/source/drivers/postgresql/pq_xbase.hxx index 47f900934511..b46959cc507a 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.hxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.hxx @@ -76,8 +76,8 @@ class ReflectionBase : public com::sun::star::container::XNamed { protected: - const rtl::OUString m_implName; - const ::com::sun::star::uno::Sequence< rtl::OUString > m_supportedServices; + const OUString m_implName; + const ::com::sun::star::uno::Sequence< OUString > m_supportedServices; ::rtl::Reference< RefCountedMutex > m_refMutex; ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > m_conn; ConnectionSettings *m_pSettings; @@ -85,8 +85,8 @@ protected: com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_values; public: ReflectionBase( - const ::rtl::OUString &implName, - const ::com::sun::star::uno::Sequence< rtl::OUString > &supportedServices, + const OUString &implName, + const ::com::sun::star::uno::Sequence< OUString > &supportedServices, const ::rtl::Reference< RefCountedMutex > refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > &conn, ConnectionSettings *pSettings, @@ -97,7 +97,7 @@ public: public: // for initialization purposes only, not exported via an interface ! void setPropertyValue_NoBroadcast_public( - const rtl::OUString & name, const com::sun::star::uno::Any & value ); + const OUString & name, const com::sun::star::uno::Any & value ); public: //XInterface virtual void SAL_CALL acquire() throw() { OComponentHelper::acquire(); } @@ -132,11 +132,11 @@ public: // OPropertySetHelper throw(com::sun::star::uno::RuntimeException); public: // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() + virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) + virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException); public: // XTypeProvider, first implemented by OPropertySetHelper @@ -150,8 +150,8 @@ public: // XDataDescriptorFactory createDataDescriptor( ) throw (::com::sun::star::uno::RuntimeException) = 0; public: // XNamed - virtual ::rtl::OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException); }; diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index 15e9690ec516..d5d253f8a6e1 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -72,9 +72,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; using com::sun::star::beans::XPropertyChangeListener; @@ -104,19 +101,19 @@ using com::sun::star::sdbc::SQLException; namespace pq_sdbc_driver { -static Any isCurrency( const rtl::OUString & typeName ) +static Any isCurrency( const OUString & typeName ) { sal_Bool b = typeName.equalsIgnoreAsciiCase("money"); return Any( &b, getBooleanCppuType() ); } -// static sal_Bool isAutoIncrement8( const rtl::OUString & typeName ) +// static sal_Bool isAutoIncrement8( const OUString & typeName ) // { // return typeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("serial8")) || // typeName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("bigserial")); // } -static Any isAutoIncrement( const rtl::OUString & defaultValue ) +static Any isAutoIncrement( const OUString & defaultValue ) { sal_Bool ret = defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) ); // printf( "%s %d\n", @@ -139,8 +136,8 @@ Columns::Columns( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName) + const OUString &schemaName, + const OUString &tableName) : Container( refMutex, origin, pSettings, "COLUMN" ), m_schemaName( schemaName ), m_tableName( tableName ) @@ -149,7 +146,7 @@ Columns::Columns( Columns::~Columns() {} -rtl::OUString columnMetaData2SDBCX( +OUString columnMetaData2SDBCX( ReflectionBase *pBase, const com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > &xRow ) { Statics & st = getStatics(); @@ -261,18 +258,18 @@ rtl::OUString columnMetaData2SDBCX( // ::rtl::Reference< RefCountedMutex > m_refMutex; // ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > m_connection; // ConnectionSettings *m_pSettings; -// rtl::OUString m_schema; -// rtl::OUString m_table; -// rtl::OUString m_column; +// OUString m_schema; +// OUString m_table; +// OUString m_column; // public: // CommentChanger( // const ::rtl::Reference< RefCountedMutex > & refMutex, // const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & connection, // ConnectionSettings *pSettings, -// const rtl::OUString & schema, -// const rtl::OUString & table, -// const rtl::OUString & column ) : +// const OUString & schema, +// const OUString & table, +// const OUString & column ) : // m_refMutex( refMutex ), // m_connection( connection ), // m_pSettings( pSettings ), @@ -315,7 +312,7 @@ void Columns::refresh() { if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf; + OStringBuffer buf; buf.append( "sdbcx.Columns get refreshed for table " ); buf.append( OUStringToOString( m_schemaName, m_pSettings->encoding ) ); buf.append( "." ); @@ -511,7 +508,7 @@ void Columns::appendByDescriptor( refresh(); } -// void Columns::dropByName( const ::rtl::OUString& elementName ) +// void Columns::dropByName( const OUString& elementName ) // throw (::com::sun::star::sdbc::SQLException, // ::com::sun::star::container::NoSuchElementException, // ::com::sun::star::uno::RuntimeException) @@ -580,8 +577,8 @@ Reference< com::sun::star::container::XNameAccess > Columns::create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, + const OUString &schemaName, + const OUString &tableName, Columns **ppColumns) { *ppColumns = new Columns( diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xcolumns.hxx index 5bd26c819afe..4549d7163838 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.hxx @@ -65,28 +65,28 @@ namespace pq_sdbc_driver { void alterColumnByDescriptor( - const rtl::OUString & schemaName, - const rtl::OUString & tableName, + const OUString & schemaName, + const OUString & tableName, ConnectionSettings *settings, const com::sun::star::uno::Reference< com::sun::star::sdbc::XStatement > &stmt, const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & past, const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > & future); -rtl::OUString columnMetaData2SDBCX( +OUString columnMetaData2SDBCX( ReflectionBase *pBase, const com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > &xRow ); class Columns : public Container { - rtl::OUString m_schemaName; - rtl::OUString m_tableName; + OUString m_schemaName; + OUString m_tableName; public: // instances Columns 'exception safe' static com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, + const OUString &schemaName, + const OUString &tableName, Columns **pColumns); protected: @@ -94,8 +94,8 @@ protected: const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); virtual ~Columns(); @@ -108,7 +108,7 @@ public: // XAppend ::com::sun::star::uno::RuntimeException); // public: // XDrop -// virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) +// virtual void SAL_CALL dropByName( const OUString& elementName ) // throw (::com::sun::star::sdbc::SQLException, // ::com::sun::star::container::NoSuchElementException, // ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx index c88bdeb2079b..34150fae7706 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx @@ -69,9 +69,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -110,9 +107,9 @@ class ReplacedBroadcaster : public EventBroadcastHelper public: ReplacedBroadcaster( const Reference< XInterface > & source, - const rtl::OUString & name, + const OUString & name, const Any & newElement, - const rtl::OUString & oldElement ) : + const OUString & oldElement ) : m_event( source, makeAny( name ), newElement, makeAny(oldElement) ) {} @@ -132,7 +129,7 @@ public: ContainerEvent m_event; InsertedBroadcaster( const Reference< XInterface > & source, - const rtl::OUString & name, + const OUString & name, const Any & newElement ) : m_event( source, makeAny( name ), newElement, Any() ) {} @@ -154,7 +151,7 @@ public: ContainerEvent m_event; RemovedBroadcaster( const Reference< XInterface > & source, - const rtl::OUString & name) : + const OUString & name) : m_event( source, makeAny( name ), Any(), Any() ) {} @@ -173,7 +170,7 @@ Container::Container( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const ::rtl::OUString &type) + const OUString &type) : ContainerBase( refMutex->mutex ), m_refMutex( refMutex ), m_pSettings( pSettings ), @@ -182,7 +179,7 @@ Container::Container( { } -Any Container::getByName( const ::rtl::OUString& aName ) +Any Container::getByName( const OUString& aName ) throw (NoSuchElementException,WrappedTargetException,RuntimeException) { String2IntMap::const_iterator ii = m_name2index.find( aName ); @@ -215,7 +212,7 @@ Sequence< OUString > Container::getElementNames( ) return ret; } -sal_Bool Container::hasByName( const ::rtl::OUString& aName ) +sal_Bool Container::hasByName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException) { return m_name2index.find( aName ) != m_name2index.end(); @@ -325,7 +322,7 @@ void Container::disposing() m_origin.clear(); } -void Container::rename( const rtl::OUString &oldName, const rtl::OUString &newName ) +void Container::rename( const OUString &oldName, const OUString &newName ) { Any newValue; { @@ -343,7 +340,7 @@ void Container::rename( const rtl::OUString &oldName, const rtl::OUString &newNa fire( RefreshedBroadcaster( *this ) ); } -void Container::dropByName( const ::rtl::OUString& elementName ) +void Container::dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) @@ -423,7 +420,7 @@ void Container::dropByIndex( sal_Int32 index ) } void Container::append( - const rtl::OUString & name, + const OUString & name, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw ( ::com::sun::star::container::ElementExistException ) diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.hxx b/connectivity/source/drivers/postgresql/pq_xcontainer.hxx index c99a8e55ee4b..07730d861ff1 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.hxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.hxx @@ -109,11 +109,11 @@ public: typedef ::boost::unordered_map < - rtl::OUString, + OUString, sal_Int32, - rtl::OUStringHash, - ::std::equal_to< rtl::OUString >, - Allocator< ::std::pair< const ::rtl::OUString , sal_Int32 > > + OUStringHash, + ::std::equal_to< OUString >, + Allocator< ::std::pair< const OUString , sal_Int32 > > > String2IntMap; typedef ::cppu::WeakComponentImplHelper8 @@ -136,14 +136,14 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_origin; String2IntMap m_name2index; // maps the element name to an index ::com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_values; // contains the real values - ::rtl::OUString m_type; + OUString m_type; public: Container( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const ::rtl::OUString & type // for exception messages + const OUString & type // for exception messages ); public: // XIndexAccess @@ -159,13 +159,13 @@ public: // XEnumerationAccess SAL_CALL createEnumeration( ) throw (::com::sun::star::uno::RuntimeException); public: // XNameAccess - virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) + virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) + virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException); // Methods virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) @@ -185,13 +185,13 @@ public: // XAppend // helper method ! void append( - const rtl::OUString & str, + const OUString & str, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw ( ::com::sun::star::container::ElementExistException ); public: // XDrop - virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) + virtual void SAL_CALL dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); @@ -226,7 +226,7 @@ public: virtual void SAL_CALL disposing(); public: - void rename( const rtl::OUString & oldName, const rtl::OUString &newName ); + void rename( const OUString & oldName, const OUString &newName ); protected: void fire( const EventBroadcastHelper & helper ); diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx index 11d7b421de12..6addb264b038 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx @@ -73,8 +73,6 @@ using osl::MutexGuard; using osl::Mutex; -using rtl::OUString; -using rtl::OUStringBuffer; using com::sun::star::container::XNameAccess; using com::sun::star::container::XIndexAccess; @@ -112,8 +110,8 @@ namespace pq_sdbc_driver Index::Index( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< com::sun::star::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const rtl::OUString & schemaName, - const rtl::OUString & tableName ) + const OUString & schemaName, + const OUString & tableName ) : ReflectionBase( getStatics().refl.index.implName, getStatics().refl.index.serviceNames, diff --git a/connectivity/source/drivers/postgresql/pq_xindex.hxx b/connectivity/source/drivers/postgresql/pq_xindex.hxx index 99de00860295..a7a29abed1ba 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.hxx @@ -77,15 +77,15 @@ class Index : public ReflectionBase, ::com::sun::star::uno::Reference< com::sun::star::sdbc::XDatabaseMetaData > m_meta; ::com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > m_indexColumns; - rtl::OUString m_schemaName; - rtl::OUString m_tableName; + OUString m_schemaName; + OUString m_tableName; public: Index( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); public: // XInterface virtual void SAL_CALL acquire() throw() { OComponentHelper::acquire(); } diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx index b654171f27d5..2dc1e49da23e 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx @@ -73,9 +73,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -107,10 +104,10 @@ IndexColumns::IndexColumns( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const rtl::OUString &indexName, - const com::sun::star::uno::Sequence< rtl::OUString > &columns ) + const OUString &schemaName, + const OUString &tableName, + const OUString &indexName, + const com::sun::star::uno::Sequence< OUString > &columns ) : Container( refMutex, origin, pSettings, "INDEX_COLUMN" ), m_schemaName( schemaName ), m_tableName( tableName ), @@ -121,7 +118,7 @@ IndexColumns::IndexColumns( IndexColumns::~IndexColumns() {} -static sal_Int32 findInSequence( const Sequence< rtl::OUString > & seq , const rtl::OUString &str) +static sal_Int32 findInSequence( const Sequence< OUString > & seq , const OUString &str) { int index; for( index = 0 ; index < seq.getLength() ; index ++ ) @@ -139,7 +136,7 @@ void IndexColumns::refresh() { if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf; + OStringBuffer buf; buf.append( "sdbcx.IndexColumns get refreshed for index " ); buf.append( OUStringToOString( m_indexName, m_pSettings->encoding ) ); log( m_pSettings, LogLevel::INFO, buf.makeStringAndClear().getStr() ); @@ -204,7 +201,7 @@ void IndexColumns::appendByDescriptor( } -void IndexColumns::dropByName( const ::rtl::OUString& elementName ) +void IndexColumns::dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) @@ -280,10 +277,10 @@ Reference< com::sun::star::container::XNameAccess > IndexColumns::create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const rtl::OUString &indexName, - const Sequence< rtl::OUString > &columns ) + const OUString &schemaName, + const OUString &tableName, + const OUString &indexName, + const Sequence< OUString > &columns ) { IndexColumns *pIndexColumns = new IndexColumns( refMutex, origin, pSettings, schemaName, tableName, indexName, columns ); diff --git a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx index 7c2c92803d3c..b9bd6ca3e704 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexcolumns.hxx @@ -65,30 +65,30 @@ namespace pq_sdbc_driver class IndexColumns : public Container { - rtl::OUString m_schemaName; - rtl::OUString m_tableName; - rtl::OUString m_indexName; - com::sun::star::uno::Sequence< rtl::OUString > m_columns; + OUString m_schemaName; + OUString m_tableName; + OUString m_indexName; + com::sun::star::uno::Sequence< OUString > m_columns; public: // instances IndexColumns 'exception safe' static com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const rtl::OUString &indexName, - const com::sun::star::uno::Sequence< ::rtl::OUString > &columns ); + const OUString &schemaName, + const OUString &tableName, + const OUString &indexName, + const com::sun::star::uno::Sequence< OUString > &columns ); protected: IndexColumns( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const rtl::OUString &indexName, - const com::sun::star::uno::Sequence< ::rtl::OUString > &columns ); + const OUString &schemaName, + const OUString &tableName, + const OUString &indexName, + const com::sun::star::uno::Sequence< OUString > &columns ); virtual ~IndexColumns(); @@ -100,7 +100,7 @@ public: // XAppend ::com::sun::star::uno::RuntimeException); public: // XDrop - virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) + virtual void SAL_CALL dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx index 96a1079d4f52..0ea2884bd477 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx @@ -70,9 +70,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -108,8 +105,8 @@ Indexes::Indexes( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName) + const OUString &schemaName, + const OUString &tableName) : Container( refMutex, origin, pSettings, getStatics().KEY ), m_schemaName( schemaName ), m_tableName( tableName ) @@ -126,7 +123,7 @@ void Indexes::refresh() { if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf; + OStringBuffer buf; buf.append( "sdbcx.Indexes get refreshed for table " ); buf.append( OUStringToOString( m_schemaName, m_pSettings->encoding ) ); buf.append( "." ); @@ -315,8 +312,8 @@ Reference< com::sun::star::container::XNameAccess > Indexes::create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString & schemaName, - const rtl::OUString & tableName) + const OUString & schemaName, + const OUString & tableName) { Indexes *pIndexes = new Indexes( refMutex, origin, pSettings, schemaName, tableName ); Reference< com::sun::star::container::XNameAccess > ret = pIndexes; diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.hxx b/connectivity/source/drivers/postgresql/pq_xindexes.hxx index fc30c760ce75..b214ea6742ab 100644 --- a/connectivity/source/drivers/postgresql/pq_xindexes.hxx +++ b/connectivity/source/drivers/postgresql/pq_xindexes.hxx @@ -64,24 +64,24 @@ namespace pq_sdbc_driver { class Indexes : public Container { - rtl::OUString m_schemaName; - rtl::OUString m_tableName; + OUString m_schemaName; + OUString m_tableName; public: // instances Columns 'exception safe' static com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); protected: Indexes( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); virtual ~Indexes(); diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx index a89dc114e478..12d5b6ba06d2 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx @@ -73,8 +73,6 @@ using osl::MutexGuard; using osl::Mutex; -using rtl::OUString; -using rtl::OUStringBuffer; using com::sun::star::container::XNameAccess; using com::sun::star::container::XIndexAccess; @@ -112,8 +110,8 @@ namespace pq_sdbc_driver Key::Key( const ::rtl::Reference< RefCountedMutex > & refMutex, const Reference< com::sun::star::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const rtl::OUString & schemaName, - const rtl::OUString & tableName ) + const OUString & schemaName, + const OUString & tableName ) : ReflectionBase( getStatics().refl.key.implName, getStatics().refl.key.serviceNames, diff --git a/connectivity/source/drivers/postgresql/pq_xkey.hxx b/connectivity/source/drivers/postgresql/pq_xkey.hxx index 57d754b56c39..cd8b611e3f63 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.hxx @@ -77,15 +77,15 @@ class Key : public ReflectionBase, ::com::sun::star::uno::Reference< com::sun::star::sdbc::XDatabaseMetaData > m_meta; ::com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > m_keyColumns; - rtl::OUString m_schemaName; - rtl::OUString m_tableName; + OUString m_schemaName; + OUString m_tableName; public: Key( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & connection, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); public: // XInterface virtual void SAL_CALL acquire() throw() { OComponentHelper::acquire(); } diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx index c6db5f5e2c47..21c70199000d 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx @@ -71,9 +71,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -105,10 +102,10 @@ KeyColumns::KeyColumns( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const Sequence< rtl::OUString > &columnNames, - const Sequence< rtl::OUString > &foreignColumnNames ) + const OUString &schemaName, + const OUString &tableName, + const Sequence< OUString > &columnNames, + const Sequence< OUString > &foreignColumnNames ) : Container( refMutex, origin, pSettings, "KEY_COLUMN" ), m_schemaName( schemaName ), m_tableName( tableName ), @@ -127,7 +124,7 @@ void KeyColumns::refresh() { if( isLog( m_pSettings, LogLevel::INFO ) ) { - rtl::OStringBuffer buf; + OStringBuffer buf; buf.append( "sdbcx.KeyColumns get refreshed for table " ); buf.append( OUStringToOString( m_schemaName, m_pSettings->encoding ) ); buf.append( "." ); @@ -380,10 +377,10 @@ Reference< com::sun::star::container::XNameAccess > KeyColumns::create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const Sequence< rtl::OUString > &columnNames , - const Sequence< rtl::OUString > &foreignColumnNames ) + const OUString &schemaName, + const OUString &tableName, + const Sequence< OUString > &columnNames , + const Sequence< OUString > &foreignColumnNames ) { KeyColumns *pKeyColumns = new KeyColumns( refMutex, origin, pSettings, schemaName, tableName, columnNames, foreignColumnNames ); diff --git a/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx b/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx index bf7a3f87f69f..9d5dd6af46ef 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkeycolumns.hxx @@ -65,30 +65,30 @@ namespace pq_sdbc_driver class KeyColumns : public Container { - rtl::OUString m_schemaName; - rtl::OUString m_tableName; - com::sun::star::uno::Sequence< rtl::OUString > m_columnNames; - com::sun::star::uno::Sequence< rtl::OUString > m_foreignColumnNames; + OUString m_schemaName; + OUString m_tableName; + com::sun::star::uno::Sequence< OUString > m_columnNames; + com::sun::star::uno::Sequence< OUString > m_foreignColumnNames; public: // instances KeyColumns 'exception safe' static com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const com::sun::star::uno::Sequence< rtl::OUString > &keyColumns, - const com::sun::star::uno::Sequence< rtl::OUString > &foreignColumnNames ); + const OUString &schemaName, + const OUString &tableName, + const com::sun::star::uno::Sequence< OUString > &keyColumns, + const com::sun::star::uno::Sequence< OUString > &foreignColumnNames ); protected: KeyColumns( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName, - const com::sun::star::uno::Sequence< rtl::OUString > &keyColumns, - const com::sun::star::uno::Sequence< rtl::OUString > &foreignColumnNames); + const OUString &schemaName, + const OUString &tableName, + const com::sun::star::uno::Sequence< OUString > &keyColumns, + const com::sun::star::uno::Sequence< OUString > &foreignColumnNames); virtual ~KeyColumns(); diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx index 2a8d52165530..49756206e882 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx @@ -70,9 +70,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -103,8 +100,8 @@ Keys::Keys( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName) + const OUString &schemaName, + const OUString &tableName) : Container( refMutex, origin, pSettings, getStatics().KEY ), m_schemaName( schemaName ), m_tableName( tableName ) @@ -113,7 +110,7 @@ Keys::Keys( Keys::~Keys() {} -static sal_Int32 string2keytype( const rtl::OUString &type ) +static sal_Int32 string2keytype( const OUString &type ) { sal_Int32 ret = com::sun::star::sdbcx::KeyType::UNIQUE; if ( type == "p" ) @@ -123,7 +120,7 @@ static sal_Int32 string2keytype( const rtl::OUString &type ) return ret; } -static sal_Int32 string2keyrule( const rtl::OUString & rule ) +static sal_Int32 string2keyrule( const OUString & rule ) { sal_Int32 ret = com::sun::star::sdbc::KeyRule::NO_ACTION; if( rule == "r" ) @@ -300,8 +297,8 @@ Reference< com::sun::star::container::XIndexAccess > Keys::create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString & schemaName, - const rtl::OUString & tableName) + const OUString & schemaName, + const OUString & tableName) { Keys *pKeys = new Keys( refMutex, origin, pSettings, schemaName, tableName ); Reference< com::sun::star::container::XIndexAccess > ret = pKeys; diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.hxx b/connectivity/source/drivers/postgresql/pq_xkeys.hxx index 13affbd7a104..f61692c045f6 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.hxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.hxx @@ -64,24 +64,24 @@ namespace pq_sdbc_driver { class Keys : public Container { - rtl::OUString m_schemaName; - rtl::OUString m_tableName; + OUString m_schemaName; + OUString m_tableName; public: // instances Columns 'exception safe' static com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > create( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); protected: Keys( const ::rtl::Reference< RefCountedMutex > & refMutex, const ::com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & origin, ConnectionSettings *pSettings, - const rtl::OUString &schemaName, - const rtl::OUString &tableName); + const OUString &schemaName, + const OUString &tableName); virtual ~Keys(); diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index 7ba75f8131dd..3370f74c59e0 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -175,7 +175,7 @@ Reference< XIndexAccess > Table::getKeys( ) throw (::com::sun::star::uno::Runti return m_keys; } -void Table::rename( const ::rtl::OUString& newName ) +void Table::rename( const OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException) @@ -183,9 +183,9 @@ void Table::rename( const ::rtl::OUString& newName ) MutexGuard guard( m_refMutex->mutex ); Statics & st = getStatics(); - ::rtl::OUString oldName = extractStringProperty(this,st.NAME ); - ::rtl::OUString schema = extractStringProperty(this,st.SCHEMA_NAME ); - ::rtl::OUString fullOldName = concatQualified( schema, oldName ); + OUString oldName = extractStringProperty(this,st.NAME ); + OUString schema = extractStringProperty(this,st.SCHEMA_NAME ); + OUString fullOldName = concatQualified( schema, oldName ); OUString newTableName; OUString newSchemaName; @@ -201,7 +201,7 @@ void Table::rename( const ::rtl::OUString& newName ) newTableName = newName; newSchemaName = schema; } - ::rtl::OUString fullNewName = concatQualified( newSchemaName, newTableName ); + OUString fullNewName = concatQualified( newSchemaName, newTableName ); if( extractStringProperty( this, st.TYPE ).equals( st.VIEW ) && m_pSettings->views.is() ) { @@ -262,7 +262,7 @@ void Table::rename( const ::rtl::OUString& newName ) } void Table::alterColumnByName( - const ::rtl::OUString& colName, + const OUString& colName, const Reference< XPropertySet >& descriptor ) throw (SQLException,NoSuchElementException,RuntimeException) { @@ -346,14 +346,14 @@ Any Table::queryInterface( const Type & reqType ) throw (RuntimeException) return ret; } -::com::sun::star::uno::Any Table::getPropertyValue(const ::rtl::OUString& aPropertyName) +::com::sun::star::uno::Any Table::getPropertyValue(const OUString& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { return ReflectionBase::getPropertyValue( aPropertyName ); } -::rtl::OUString Table::getName( ) throw (::com::sun::star::uno::RuntimeException) +OUString Table::getName( ) throw (::com::sun::star::uno::RuntimeException) { Statics & st = getStatics(); return concatQualified( @@ -361,7 +361,7 @@ Any Table::queryInterface( const Type & reqType ) throw (RuntimeException) extractStringProperty( this, st.NAME ) ); } -void Table::setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException) +void Table::setName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException) { rename( aName ); } diff --git a/connectivity/source/drivers/postgresql/pq_xtable.hxx b/connectivity/source/drivers/postgresql/pq_xtable.hxx index d367bf864d8b..c96440ec0387 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.hxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.hxx @@ -127,7 +127,7 @@ public: // XKeysSupplier getKeys( ) throw (::com::sun::star::uno::RuntimeException); public: // XRename - virtual void SAL_CALL rename( const ::rtl::OUString& newName ) + virtual void SAL_CALL rename( const OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException); @@ -135,7 +135,7 @@ public: // XRename public: // XAlterTable // Methods virtual void SAL_CALL alterColumnByName( - const ::rtl::OUString& colName, + const OUString& colName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, @@ -149,12 +149,12 @@ public: // XAlterTable ::com::sun::star::uno::RuntimeException); public: // TODO: remove again - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName) + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const OUString& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); public: // XNamed - virtual ::rtl::OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException); }; diff --git a/connectivity/source/drivers/postgresql/pq_xtables.hxx b/connectivity/source/drivers/postgresql/pq_xtables.hxx index 28069ff0170f..54cd3a78fe18 100644 --- a/connectivity/source/drivers/postgresql/pq_xtables.hxx +++ b/connectivity/source/drivers/postgresql/pq_xtables.hxx @@ -89,7 +89,7 @@ public: // XAppend ::com::sun::star::uno::RuntimeException); public: // XDrop -// virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) +// virtual void SAL_CALL dropByName( const OUString& elementName ) // throw (::com::sun::star::sdbc::SQLException, // ::com::sun::star::container::NoSuchElementException, // ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx index b96450a7bd94..3eed58192137 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.cxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx @@ -163,11 +163,11 @@ Any User::queryInterface( const Type & reqType ) throw (RuntimeException) void User::changePassword( - const ::rtl::OUString& oldPassword, const ::rtl::OUString& newPassword ) + const OUString& oldPassword, const OUString& newPassword ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { (void) oldPassword; - rtl::OUStringBuffer buf(128); + OUStringBuffer buf(128); buf.append( "ALTER USER " ); bufferQuoteIdentifier( buf, extractStringProperty( this, getStatics().NAME ), m_pSettings ); buf.append( " PASSWORD " ); @@ -177,7 +177,7 @@ void User::changePassword( stmt->executeUpdate( buf.makeStringAndClear() ); } -sal_Int32 User::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) +sal_Int32 User::getPrivileges( const OUString& objName, sal_Int32 objType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { sal_Int32 ret = 0xffffffff; @@ -185,7 +185,7 @@ sal_Int32 User::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType { Statics & st = getStatics(); - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.append( "User::getPrivileges[" + extractStringProperty( this, st.NAME ) + "] got called for " + objName + "(type=" + OUString::number(objType) + ")"); @@ -195,7 +195,7 @@ sal_Int32 User::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType return ret; } -sal_Int32 User::getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) +sal_Int32 User::getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { (void) objName; (void) objType; @@ -203,7 +203,7 @@ sal_Int32 User::getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int3 return 0xffffffff; } -void User::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) +void User::grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { (void) objName; (void) objType; (void) objPrivileges; @@ -211,7 +211,7 @@ void User::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, s *this, OUString(), 1, Any() ); } -void User::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) +void User::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { (void) objName; (void) objType; (void) objPrivileges; diff --git a/connectivity/source/drivers/postgresql/pq_xuser.hxx b/connectivity/source/drivers/postgresql/pq_xuser.hxx index 1be25e2e87ad..072d09262e7e 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.hxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.hxx @@ -100,11 +100,11 @@ public: // XDataDescriptorFactory public: // XUser : XAuthorizable // Methods - virtual sal_Int32 SAL_CALL getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL changePassword( const ::rtl::OUString& oldPassword, const ::rtl::OUString& newPassword ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getPrivileges( const OUString& objName, sal_Int32 objType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL changePassword( const OUString& oldPassword, const OUString& newPassword ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; diff --git a/connectivity/source/drivers/postgresql/pq_xusers.cxx b/connectivity/source/drivers/postgresql/pq_xusers.cxx index fcc17d0f6112..63153675d91e 100644 --- a/connectivity/source/drivers/postgresql/pq_xusers.cxx +++ b/connectivity/source/drivers/postgresql/pq_xusers.cxx @@ -68,9 +68,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -172,7 +169,7 @@ void Users::appendByDescriptor( stmt->executeUpdate( update.makeStringAndClear() ); } -void Users::dropByName( const ::rtl::OUString& elementName ) +void Users::dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) diff --git a/connectivity/source/drivers/postgresql/pq_xusers.hxx b/connectivity/source/drivers/postgresql/pq_xusers.hxx index 6d72e12f08a9..6da25fa530e0 100644 --- a/connectivity/source/drivers/postgresql/pq_xusers.hxx +++ b/connectivity/source/drivers/postgresql/pq_xusers.hxx @@ -88,7 +88,7 @@ public: // XAppend ::com::sun::star::uno::RuntimeException); public: // XDrop - virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) + virtual void SAL_CALL dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx index baee259e6c30..1f84f2b3efeb 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.cxx +++ b/connectivity/source/drivers/postgresql/pq_xview.cxx @@ -128,7 +128,7 @@ Reference< XPropertySet > View::createDataDescriptor( ) throw (RuntimeException return Reference< XPropertySet > ( pView ); } -void View::rename( const ::rtl::OUString& newName ) +void View::rename( const OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException) @@ -137,9 +137,9 @@ void View::rename( const ::rtl::OUString& newName ) Statics & st = getStatics(); - ::rtl::OUString oldName = extractStringProperty(this,st.NAME ); - ::rtl::OUString schema = extractStringProperty(this,st.SCHEMA_NAME ); - ::rtl::OUString fullOldName = concatQualified( schema, oldName ); + OUString oldName = extractStringProperty(this,st.NAME ); + OUString schema = extractStringProperty(this,st.SCHEMA_NAME ); + OUString fullOldName = concatQualified( schema, oldName ); OUString newTableName; OUString newSchemaName; @@ -155,7 +155,7 @@ void View::rename( const ::rtl::OUString& newName ) newTableName = newName; newSchemaName = schema; } - ::rtl::OUString fullNewName = concatQualified( newSchemaName, newTableName ); + OUString fullNewName = concatQualified( newSchemaName, newTableName ); if( ! schema.equals( newSchemaName ) ) { @@ -234,7 +234,7 @@ Any View::queryInterface( const Type & reqType ) throw (RuntimeException) return ret; } -::rtl::OUString View::getName( ) throw (::com::sun::star::uno::RuntimeException) +OUString View::getName( ) throw (::com::sun::star::uno::RuntimeException) { Statics & st = getStatics(); return concatQualified( @@ -242,7 +242,7 @@ Any View::queryInterface( const Type & reqType ) throw (RuntimeException) extractStringProperty( this, st.NAME ) ); } -void View::setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException) +void View::setName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException) { rename( aName ); } diff --git a/connectivity/source/drivers/postgresql/pq_xview.hxx b/connectivity/source/drivers/postgresql/pq_xview.hxx index 94b4745c0225..001180916f64 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.hxx +++ b/connectivity/source/drivers/postgresql/pq_xview.hxx @@ -98,14 +98,14 @@ public: // XDataDescriptorFactory createDataDescriptor( ) throw (::com::sun::star::uno::RuntimeException); public: // XRename - virtual void SAL_CALL rename( const ::rtl::OUString& newName ) + virtual void SAL_CALL rename( const OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException); public: // XNamed - virtual ::rtl::OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + virtual OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException); }; diff --git a/connectivity/source/drivers/postgresql/pq_xviews.cxx b/connectivity/source/drivers/postgresql/pq_xviews.cxx index 39c6856df2e7..e375a8b8e342 100644 --- a/connectivity/source/drivers/postgresql/pq_xviews.cxx +++ b/connectivity/source/drivers/postgresql/pq_xviews.cxx @@ -69,9 +69,6 @@ using osl::MutexGuard; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::beans::XPropertySet; @@ -137,7 +134,7 @@ void Views::refresh() while( rs->next() ) { - rtl::OUString table, schema, command; + OUString table, schema, command; schema = xRow->getString( 1 ); table = xRow->getString( 2 ); command = xRow->getString( 3 ); @@ -201,7 +198,7 @@ void Views::appendByDescriptor( } } -void Views::dropByName( const ::rtl::OUString& elementName ) +void Views::dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) diff --git a/connectivity/source/drivers/postgresql/pq_xviews.hxx b/connectivity/source/drivers/postgresql/pq_xviews.hxx index ca2640b500a1..3400fa1fa4d0 100644 --- a/connectivity/source/drivers/postgresql/pq_xviews.hxx +++ b/connectivity/source/drivers/postgresql/pq_xviews.hxx @@ -89,7 +89,7 @@ public: // XAppend ::com::sun::star::uno::RuntimeException); public: // XDrop - virtual void SAL_CALL dropByName( const ::rtl::OUString& elementName ) + virtual void SAL_CALL dropByName( const OUString& elementName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); |