diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /connectivity/source/drivers/mysql | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'connectivity/source/drivers/mysql')
-rw-r--r-- | connectivity/source/drivers/mysql/YCatalog.cxx | 20 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YColumns.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YDriver.cxx | 122 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YTable.cxx | 88 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YTables.cxx | 48 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YUser.cxx | 104 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YUsers.cxx | 24 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/YViews.cxx | 22 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql/Yservices.cxx | 1 |
9 files changed, 218 insertions, 219 deletions
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index cb0bd5a86e62..cab7b9d0045f 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -42,11 +42,11 @@ OMySQLCatalog::OMySQLCatalog(const Reference< XConnection >& _xConnection) : OCa { } // ----------------------------------------------------------------------------- -void OMySQLCatalog::refreshObjects(const Sequence< ::rtl::OUString >& _sKindOfObject,TStringVector& _rNames) +void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStringVector& _rNames) { Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), - ::rtl::OUString("%"), - ::rtl::OUString("%"), + OUString("%"), + OUString("%"), _sKindOfObject); fillNames(xResult,_rNames); } @@ -54,11 +54,11 @@ void OMySQLCatalog::refreshObjects(const Sequence< ::rtl::OUString >& _sKindOfOb void OMySQLCatalog::refreshTables() { TStringVector aVector; - static const ::rtl::OUString s_sTableTypeView("VIEW"); - static const ::rtl::OUString s_sTableTypeTable("TABLE"); - static const ::rtl::OUString s_sAll("%"); + static const OUString s_sTableTypeView("VIEW"); + static const OUString s_sTableTypeTable("TABLE"); + static const OUString s_sAll("%"); - Sequence< ::rtl::OUString > sTableTypes(3); + Sequence< OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; sTableTypes[2] = s_sAll; // just to be sure to include anything else .... @@ -73,8 +73,8 @@ void OMySQLCatalog::refreshTables() // ------------------------------------------------------------------------- void OMySQLCatalog::refreshViews() { - Sequence< ::rtl::OUString > aTypes(1); - aTypes[0] = ::rtl::OUString("VIEW"); + Sequence< OUString > aTypes(1); + aTypes[0] = OUString("VIEW"); // let's simply assume the server is new enough to support views. Current drivers // as of this writing might not return the proper information in getTableTypes, so @@ -100,7 +100,7 @@ void OMySQLCatalog::refreshUsers() { TStringVector aVector; Reference< XStatement > xStmt = m_xConnection->createStatement( ); - Reference< XResultSet > xResult = xStmt->executeQuery(::rtl::OUString("select User from mysql.user group by User")); + Reference< XResultSet > xResult = xStmt->executeQuery(OUString("select User from mysql.user group by User")); if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index 6e05cca99f25..169bdc57c0de 100644 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx @@ -55,7 +55,7 @@ OMySQLColumn::OMySQLColumn( sal_Bool _bCase) // ------------------------------------------------------------------------- void OMySQLColumn::construct() { - m_sAutoIncrement = ::rtl::OUString("auto_increment"); + m_sAutoIncrement = OUString("auto_increment"); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION),PROPERTY_ID_AUTOINCREMENTCREATION,0,&m_sAutoIncrement, ::getCppuType(&m_sAutoIncrement)); } // ----------------------------------------------------------------------------- @@ -69,10 +69,10 @@ void OMySQLColumn::construct() return *OMySQLColumn_PROP::getArrayHelper(isNew() ? 1 : 0); } // ----------------------------------------------------------------------------- -Sequence< ::rtl::OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) +Sequence< OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException) { - Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString("com.sun.star.sdbcx.Column"); + Sequence< OUString > aSupported(1); + aSupported[0] = OUString("com.sun.star.sdbcx.Column"); return aSupported; } diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index 600a9855affc..bd826e073504 100644 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx @@ -103,17 +103,17 @@ namespace connectivity D_NATIVE } T_DRIVERTYPE; - sal_Bool isOdbcUrl(const ::rtl::OUString& _sUrl) + sal_Bool isOdbcUrl(const OUString& _sUrl) { return _sUrl.copy(0,16) == "sdbc:mysql:odbc:"; } //-------------------------------------------------------------------- - sal_Bool isNativeUrl(const ::rtl::OUString& _sUrl) + sal_Bool isNativeUrl(const OUString& _sUrl) { - return (!_sUrl.compareTo(::rtl::OUString("sdbc:mysql:mysqlc:"), sizeof("sdbc:mysql:mysqlc:")-1)); + return (!_sUrl.compareTo(OUString("sdbc:mysql:mysqlc:"), sizeof("sdbc:mysql:mysqlc:")-1)); } //-------------------------------------------------------------------- - T_DRIVERTYPE lcl_getDriverType(const ::rtl::OUString& _sUrl) + T_DRIVERTYPE lcl_getDriverType(const OUString& _sUrl) { T_DRIVERTYPE eRet = D_JDBC; if ( isOdbcUrl(_sUrl ) ) @@ -123,18 +123,18 @@ namespace connectivity return eRet; } //-------------------------------------------------------------------- - ::rtl::OUString transformUrl(const ::rtl::OUString& _sUrl) + OUString transformUrl(const OUString& _sUrl) { - ::rtl::OUString sNewUrl = _sUrl.copy(11); + OUString sNewUrl = _sUrl.copy(11); if ( isOdbcUrl( _sUrl ) ) - sNewUrl = ::rtl::OUString("sdbc:") + sNewUrl; + sNewUrl = OUString("sdbc:") + sNewUrl; else if ( isNativeUrl( _sUrl ) ) - sNewUrl = ::rtl::OUString("sdbc:") + sNewUrl; + sNewUrl = OUString("sdbc:") + sNewUrl; else { sNewUrl = sNewUrl.copy(5); - ::rtl::OUString sTempUrl = ::rtl::OUString("jdbc:mysql://"); + OUString sTempUrl = OUString("jdbc:mysql://"); sTempUrl += sNewUrl; sNewUrl = sTempUrl; @@ -142,14 +142,14 @@ namespace connectivity return sNewUrl; } //-------------------------------------------------------------------- - Reference< XDriver > lcl_loadDriver(const Reference< XComponentContext >& _rxContext,const ::rtl::OUString& _sUrl) + Reference< XDriver > lcl_loadDriver(const Reference< XComponentContext >& _rxContext,const OUString& _sUrl) { Reference<XDriverManager2> xDriverAccess = DriverManager::create(_rxContext); Reference< XDriver > xDriver = xDriverAccess->getDriverByURL(_sUrl); return xDriver; } //-------------------------------------------------------------------- - Sequence< PropertyValue > lcl_convertProperties(T_DRIVERTYPE _eType,const Sequence< PropertyValue >& info,const ::rtl::OUString& _sUrl) + Sequence< PropertyValue > lcl_convertProperties(T_DRIVERTYPE _eType,const Sequence< PropertyValue >& info,const OUString& _sUrl) { ::std::vector<PropertyValue> aProps; const PropertyValue* pSupported = info.getConstArray(); @@ -164,12 +164,12 @@ namespace connectivity if ( _eType == D_ODBC ) { aProps.push_back( PropertyValue( - ::rtl::OUString("Silent") + OUString("Silent") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); aProps.push_back( PropertyValue( - ::rtl::OUString("PreventGetVersionColumns") + OUString("PreventGetVersionColumns") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); @@ -177,31 +177,31 @@ namespace connectivity else if ( _eType == D_JDBC ) { aProps.push_back( PropertyValue( - ::rtl::OUString("JavaDriverClass") + OUString("JavaDriverClass") ,0 - ,makeAny(::rtl::OUString("com.mysql.jdbc.Driver")) + ,makeAny(OUString("com.mysql.jdbc.Driver")) ,PropertyState_DIRECT_VALUE) ); } else { aProps.push_back( PropertyValue( - ::rtl::OUString("PublicConnectionURL") + OUString("PublicConnectionURL") ,0 ,makeAny(_sUrl) ,PropertyState_DIRECT_VALUE) ); } aProps.push_back( PropertyValue( - ::rtl::OUString("IsAutoRetrievingEnabled") + OUString("IsAutoRetrievingEnabled") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); aProps.push_back( PropertyValue( - ::rtl::OUString("AutoRetrievingStatement") + OUString("AutoRetrievingStatement") ,0 - ,makeAny(::rtl::OUString("SELECT LAST_INSERT_ID()")) + ,makeAny(OUString("SELECT LAST_INSERT_ID()")) ,PropertyState_DIRECT_VALUE) ); aProps.push_back( PropertyValue( - ::rtl::OUString("ParameterNameSubstitution") + OUString("ParameterNameSubstitution") ,0 ,makeAny(sal_True) ,PropertyState_DIRECT_VALUE) ); @@ -210,10 +210,10 @@ namespace connectivity } } //-------------------------------------------------------------------- - Reference< XDriver > ODriverDelegator::loadDriver( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) + Reference< XDriver > ODriverDelegator::loadDriver( const OUString& url, const Sequence< PropertyValue >& info ) { Reference< XDriver > xDriver; - const ::rtl::OUString sCuttedUrl = transformUrl(url); + const OUString sCuttedUrl = transformUrl(url); const T_DRIVERTYPE eType = lcl_getDriverType( url ); if ( eType == D_ODBC ) { @@ -230,7 +230,7 @@ namespace connectivity else { ::comphelper::NamedValueCollection aSettings( info ); - ::rtl::OUString sDriverClass("com.mysql.jdbc.Driver"); + OUString sDriverClass("com.mysql.jdbc.Driver"); sDriverClass = aSettings.getOrDefault( "JavaDriverClass", sDriverClass ); TJDBCDrivers::iterator aFind = m_aJdbcDrivers.find(sDriverClass); @@ -243,7 +243,7 @@ namespace connectivity } //-------------------------------------------------------------------- - Reference< XConnection > SAL_CALL ODriverDelegator::connect( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) + Reference< XConnection > SAL_CALL ODriverDelegator::connect( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { Reference< XConnection > xConnection; if ( acceptsURL(url) ) @@ -252,34 +252,34 @@ namespace connectivity xDriver = loadDriver(url,info); if ( xDriver.is() ) { - ::rtl::OUString sCuttedUrl = transformUrl(url); + OUString sCuttedUrl = transformUrl(url); const T_DRIVERTYPE eType = lcl_getDriverType( url ); Sequence< PropertyValue > aConvertedProperties = lcl_convertProperties(eType,info,url); if ( eType == D_JDBC ) { ::comphelper::NamedValueCollection aSettings( info ); - ::rtl::OUString sIanaName = aSettings.getOrDefault( "CharSet", ::rtl::OUString() ); + OUString sIanaName = aSettings.getOrDefault( "CharSet", OUString() ); if ( !sIanaName.isEmpty() ) { ::dbtools::OCharsetMap aLookupIanaName; ::dbtools::OCharsetMap::const_iterator aLookup = aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA()); if (aLookup != aLookupIanaName.end() ) { - ::rtl::OUString sAdd; + OUString sAdd; if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() ) { - static const ::rtl::OUString s_sCharSetOp("useUnicode=true&"); + static const OUString s_sCharSetOp("useUnicode=true&"); if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) ) { sAdd = s_sCharSetOp; } // if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) ) } // if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() ) if ( sCuttedUrl.indexOf('?') == -1 ) - sCuttedUrl += ::rtl::OUString("?"); + sCuttedUrl += OUString("?"); else - sCuttedUrl += ::rtl::OUString("&"); + sCuttedUrl += OUString("&"); sCuttedUrl += sAdd; - sCuttedUrl += ::rtl::OUString("characterEncoding="); + sCuttedUrl += OUString("characterEncoding="); sCuttedUrl += sIanaName; } } @@ -305,7 +305,7 @@ namespace connectivity } //-------------------------------------------------------------------- - sal_Bool SAL_CALL ODriverDelegator::acceptsURL( const ::rtl::OUString& url ) throw (SQLException, RuntimeException) + sal_Bool SAL_CALL ODriverDelegator::acceptsURL( const OUString& url ) throw (SQLException, RuntimeException) { Sequence< PropertyValue > info; @@ -318,40 +318,40 @@ namespace connectivity } //-------------------------------------------------------------------- - Sequence< DriverPropertyInfo > SAL_CALL ODriverDelegator::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw (SQLException, RuntimeException) + Sequence< DriverPropertyInfo > SAL_CALL ODriverDelegator::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw (SQLException, RuntimeException) { ::std::vector< DriverPropertyInfo > aDriverInfo; if ( !acceptsURL(url) ) return Sequence< DriverPropertyInfo >(); - Sequence< ::rtl::OUString > aBoolean(2); - aBoolean[0] = ::rtl::OUString("0"); - aBoolean[1] = ::rtl::OUString("1"); + Sequence< OUString > aBoolean(2); + aBoolean[0] = OUString("0"); + aBoolean[1] = OUString("1"); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString("CharSet") - ,::rtl::OUString("CharSet of the database.") + OUString("CharSet") + ,OUString("CharSet of the database.") ,sal_False - ,::rtl::OUString() - ,Sequence< ::rtl::OUString >()) + ,OUString() + ,Sequence< OUString >()) ); aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString("SuppressVersionColumns") - ,::rtl::OUString("Display version columns (when available).") + OUString("SuppressVersionColumns") + ,OUString("Display version columns (when available).") ,sal_False - ,::rtl::OUString("0") + ,OUString("0") ,aBoolean) ); const T_DRIVERTYPE eType = lcl_getDriverType( url ); if ( eType == D_JDBC ) { aDriverInfo.push_back(DriverPropertyInfo( - ::rtl::OUString("JavaDriverClass") - ,::rtl::OUString("The JDBC driver class name.") + OUString("JavaDriverClass") + ,OUString("The JDBC driver class name.") ,sal_True - ,::rtl::OUString("com.mysql.jdbc.Driver") - ,Sequence< ::rtl::OUString >()) + ,OUString("com.mysql.jdbc.Driver") + ,Sequence< OUString >()) ); } @@ -421,12 +421,12 @@ namespace connectivity } //-------------------------------------------------------------------- - Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByURL( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) + Reference< XTablesSupplier > SAL_CALL ODriverDelegator::getDataDefinitionByURL( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException) { if ( ! acceptsURL(url) ) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); + const OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); ::dbtools::throwGenericSQLException(sMessage ,*this); } // if ( ! acceptsURL(url) ) @@ -436,37 +436,37 @@ namespace connectivity // XServiceInfo // -------------------------------------------------------------------------------- //------------------------------------------------------------------------------ - rtl::OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) + OUString ODriverDelegator::getImplementationName_Static( ) throw(RuntimeException) { - return rtl::OUString("org.openoffice.comp.drivers.MySQL.Driver"); + return OUString("org.openoffice.comp.drivers.MySQL.Driver"); } //------------------------------------------------------------------------------ - Sequence< ::rtl::OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) + Sequence< OUString > ODriverDelegator::getSupportedServiceNames_Static( ) throw (RuntimeException) { - Sequence< ::rtl::OUString > aSNS( 2 ); - aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver"); - aSNS[1] = ::rtl::OUString("com.sun.star.sdbcx.Driver"); + Sequence< OUString > aSNS( 2 ); + aSNS[0] = OUString("com.sun.star.sdbc.Driver"); + aSNS[1] = OUString("com.sun.star.sdbcx.Driver"); return aSNS; } //------------------------------------------------------------------ - ::rtl::OUString SAL_CALL ODriverDelegator::getImplementationName( ) throw(RuntimeException) + OUString SAL_CALL ODriverDelegator::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); } //------------------------------------------------------------------ - sal_Bool SAL_CALL ODriverDelegator::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) + sal_Bool SAL_CALL ODriverDelegator::supportsService( const OUString& _rServiceName ) throw(RuntimeException) { - Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames()); - const ::rtl::OUString* pSupported = aSupported.getConstArray(); - const ::rtl::OUString* pEnd = pSupported + aSupported.getLength(); + Sequence< OUString > aSupported(getSupportedServiceNames()); + const OUString* pSupported = aSupported.getConstArray(); + const OUString* pEnd = pSupported + aSupported.getLength(); for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported) ; return pSupported != pEnd; } //------------------------------------------------------------------ - Sequence< ::rtl::OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) throw(RuntimeException) + Sequence< OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index 9b8f38d83e53..efc80a2ae4c9 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -59,9 +59,9 @@ namespace connectivity { protected: // ----------------------------------------------------------------------------- - virtual ::rtl::OUString getDropForeignKey() const + virtual OUString getDropForeignKey() const { - return ::rtl::OUString(" DROP FOREIGN KEY "); + return OUString(" DROP FOREIGN KEY "); } public: OMySQLKeysHelper( OTableHelper* _pTable, @@ -92,11 +92,11 @@ OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, // ------------------------------------------------------------------------- OMySQLTable::OMySQLTable( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, - const ::rtl::OUString& _Name, - const ::rtl::OUString& _Type, - const ::rtl::OUString& _Description , - const ::rtl::OUString& _SchemaName, - const ::rtl::OUString& _CatalogName, + const OUString& _Name, + const OUString& _Type, + const OUString& _Description , + const OUString& _SchemaName, + const OUString& _CatalogName, sal_Int32 _nPrivileges ) : OTableHelper( _pTables, _xConnection, @@ -170,7 +170,7 @@ sal_Int64 OMySQLTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (R } // ------------------------------------------------------------------------- // XAlterTable -void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException) +void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed( @@ -211,7 +211,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; bool bColumnNameChanged = false; - ::rtl::OUString sOldDesc,sNewDesc; + OUString sOldDesc,sNewDesc; xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sOldDesc; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sNewDesc; @@ -226,15 +226,15 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co // if a column should be an auto_incmrement one if ( bOldAutoIncrement != bAutoIncrement ) { - ::rtl::OUString sTypeName; + OUString sTypeName; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sTypeName; - static ::rtl::OUString s_sAutoIncrement("auto_increment"); + static OUString s_sAutoIncrement("auto_increment"); if ( bAutoIncrement ) { if ( sTypeName.indexOf(s_sAutoIncrement) == -1 ) { - sTypeName += ::rtl::OUString(" "); + sTypeName += OUString(" "); sTypeName += s_sAutoIncrement; } } @@ -253,7 +253,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co } // third: check the default values - ::rtl::OUString sNewDefault,sOldDefault; + OUString sNewDefault,sOldDefault; xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sOldDefault; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>= sNewDefault; @@ -267,15 +267,15 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co alterDefaultValue(sNewDefault,colName); // now we should look if the name of the column changed - ::rtl::OUString sNewColumnName; + OUString sNewColumnName; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_NAME)) >>= sNewColumnName; if ( !sNewColumnName.equalsIgnoreAsciiCase(colName) && !bColumnNameChanged ) { - ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(" CHANGE "); - const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); + OUString sSql = getAlterTableColumnPart(); + sSql += OUString(" CHANGE "); + const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,colName); - sSql += ::rtl::OUString(" "); + sSql += OUString(" "); sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern())); executeStatement(sSql); } @@ -292,13 +292,13 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co } // ----------------------------------------------------------------------------- -void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rColName, const Reference<XPropertySet>& _xDescriptor) +void OMySQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName, const Reference<XPropertySet>& _xDescriptor) { - ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(" CHANGE "); - const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); + OUString sSql = getAlterTableColumnPart(); + sSql += OUString(" CHANGE "); + const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(" "); + sSql += OUString(" "); OColumn* pColumn = new OColumn(sal_True); Reference<XPropertySet> xProp = pColumn; @@ -309,53 +309,53 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCo executeStatement(sSql); } // ----------------------------------------------------------------------------- -::rtl::OUString OMySQLTable::getTypeCreatePattern() const +OUString OMySQLTable::getTypeCreatePattern() const { - static const ::rtl::OUString s_sCreatePattern("(M,D)"); + static const OUString s_sCreatePattern("(M,D)"); return s_sCreatePattern; } // ----------------------------------------------------------------------------- -void OMySQLTable::alterDefaultValue(const ::rtl::OUString& _sNewDefault,const ::rtl::OUString& _rColName) +void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName) { - ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(" ALTER "); + OUString sSql = getAlterTableColumnPart(); + sSql += OUString(" ALTER "); - const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); + const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(" SET DEFAULT '") + _sNewDefault; - sSql += ::rtl::OUString("'"); + sSql += OUString(" SET DEFAULT '") + _sNewDefault; + sSql += OUString("'"); executeStatement(sSql); } // ----------------------------------------------------------------------------- -void OMySQLTable::dropDefaultValue(const ::rtl::OUString& _rColName) +void OMySQLTable::dropDefaultValue(const OUString& _rColName) { - ::rtl::OUString sSql = getAlterTableColumnPart(); - sSql += ::rtl::OUString(" ALTER "); + OUString sSql = getAlterTableColumnPart(); + sSql += OUString(" ALTER "); - const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); + const OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,_rColName); - sSql += ::rtl::OUString(" DROP DEFAULT"); + sSql += OUString(" DROP DEFAULT"); executeStatement(sSql); } // ----------------------------------------------------------------------------- -::rtl::OUString OMySQLTable::getAlterTableColumnPart() +OUString OMySQLTable::getAlterTableColumnPart() { - ::rtl::OUString sSql( "ALTER TABLE " ); + OUString sSql( "ALTER TABLE " ); - ::rtl::OUString sComposedName( + OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) ); sSql += sComposedName; return sSql; } // ----------------------------------------------------------------------------- -void OMySQLTable::executeStatement(const ::rtl::OUString& _rStatement ) +void OMySQLTable::executeStatement(const OUString& _rStatement ) { - ::rtl::OUString sSQL = _rStatement; + OUString sSQL = _rStatement; if(sSQL.lastIndexOf(',') == (sSQL.getLength()-1)) - sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,::rtl::OUString(")")); + sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,OUString(")")); Reference< XStatement > xStmt = getConnection()->createStatement( ); if ( xStmt.is() ) @@ -365,9 +365,9 @@ void OMySQLTable::executeStatement(const ::rtl::OUString& _rStatement ) } } // ----------------------------------------------------------------------------- -::rtl::OUString OMySQLTable::getRenameStart() const +OUString OMySQLTable::getRenameStart() const { - return ::rtl::OUString("RENAME TABLE "); + return OUString("RENAME TABLE "); } diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index fea4e7090de8..776c260671ef 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -46,16 +46,16 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace dbtools; -sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OTables::createObject(const OUString& _rName) { - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - static const ::rtl::OUString s_sTableTypeView("VIEW"); - static const ::rtl::OUString s_sTableTypeTable("TABLE"); - static const ::rtl::OUString s_sAll("%"); + static const OUString s_sTableTypeView("VIEW"); + static const OUString s_sTableTypeTable("TABLE"); + static const OUString s_sAll("%"); - Sequence< ::rtl::OUString > sTableTypes(3); + Sequence< OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; sTableTypes[2] = s_sAll; // just to be sure to include anything else .... @@ -114,14 +114,14 @@ Reference< XPropertySet > OTables::createDescriptor() } // ------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OTables::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createTable(descriptor); return createObject( _rForName ); } // ------------------------------------------------------------------------- // XDrop -void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) +void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) { Reference< XInterface > xObject( getObject( _nPos ) ); sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); @@ -130,19 +130,19 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - ::rtl::OUString aSql( "DROP " ); + OUString aSql( "DROP " ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString("VIEW"); + sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == OUString("VIEW"); if(bIsView) // here we have a view - aSql += ::rtl::OUString("VIEW "); + aSql += OUString("VIEW "); else - aSql += ::rtl::OUString("TABLE "); + aSql += OUString("TABLE "); - ::rtl::OUString sComposedName( + OUString sComposedName( ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); aSql += sComposedName; Reference< XStatement > xStmt = xConnection->createStatement( ); @@ -161,16 +161,16 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) } } // ------------------------------------------------------------------------- -::rtl::OUString OTables::adjustSQL(const ::rtl::OUString& _sSql) +OUString OTables::adjustSQL(const OUString& _sSql) { - ::rtl::OUString sSQL = _sSql; - static const ::rtl::OUString s_sUNSIGNED("UNSIGNED"); + OUString sSQL = _sSql; + static const OUString s_sUNSIGNED("UNSIGNED"); sal_Int32 nIndex = sSQL.indexOf(s_sUNSIGNED); while(nIndex != -1 ) { sal_Int32 nParen = sSQL.indexOf(')',nIndex); sal_Int32 nPos = nIndex + s_sUNSIGNED.getLength(); - ::rtl::OUString sNewUnsigned( sSQL.copy(nPos,nParen - nPos + 1)); + OUString sNewUnsigned( sSQL.copy(nPos,nParen - nPos + 1)); sSQL = sSQL.replaceAt(nIndex,s_sUNSIGNED.getLength()+sNewUnsigned.getLength(),sNewUnsigned + s_sUNSIGNED); nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + s_sUNSIGNED.getLength()+sNewUnsigned.getLength()); } @@ -180,8 +180,8 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) void OTables::createTable( const Reference< XPropertySet >& descriptor ) { const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - static const ::rtl::OUString s_sCreatePattern("(M,D)"); - const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern)); + static const OUString s_sCreatePattern("(M,D)"); + const OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern)); Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) { @@ -190,7 +190,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) } } // ----------------------------------------------------------------------------- -void OTables::appendNew(const ::rtl::OUString& _rsNewTable) +void OTables::appendNew(const OUString& _rsNewTable) { insertElement(_rsNewTable,NULL); @@ -201,15 +201,15 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable) static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); } // ----------------------------------------------------------------------------- -::rtl::OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) +OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!"); return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); } // ----------------------------------------------------------------------------- -void OTables::addComment(const Reference< XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut) +void OTables::addComment(const Reference< XPropertySet >& descriptor,OUStringBuffer& _rOut) { - ::rtl::OUString sDesc; + OUString sDesc; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sDesc; if ( !sDesc.isEmpty() ) { diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index d184230cb120..5f300a3b0672 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -43,7 +43,7 @@ OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star } // ------------------------------------------------------------------------- OMySQLUser::OMySQLUser( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, - const ::rtl::OUString& _Name + const OUString& _Name ) : connectivity::sdbcx::OUser(_Name,sal_True) ,m_xConnection(_xConnection) { @@ -61,7 +61,7 @@ OUserExtend::OUserExtend( const ::com::sun::star::uno::Reference< ::com::sun:: // ------------------------------------------------------------------------- void OUserExtend::construct() { - registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(static_cast< ::rtl::OUString*>(0))); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(static_cast< OUString*>(0))); } // ----------------------------------------------------------------------------- cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const @@ -77,7 +77,7 @@ cppu::IPropertyArrayHelper & OUserExtend::getInfoHelper() } typedef connectivity::sdbcx::OUser_BASE OUser_BASE_RBHELPER; // ----------------------------------------------------------------------------- -sal_Int32 SAL_CALL OMySQLUser::getPrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL OMySQLUser::getPrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); @@ -87,12 +87,12 @@ sal_Int32 SAL_CALL OMySQLUser::getPrivileges( const ::rtl::OUString& objName, sa return nRights; } // ----------------------------------------------------------------------------- -void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName, sal_Int32 objType,sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(SQLException, RuntimeException) +void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_Int32 objType,sal_Int32& nRights,sal_Int32& nRightsWithGrant) throw(SQLException, RuntimeException) { nRightsWithGrant = nRights = 0; // first we need to create the sql stmt to select the privs Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); Reference<XResultSet> xRes; switch(objType) @@ -112,32 +112,32 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; - xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString("%")); + xRes = xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,OUString("%")); } break; } if ( xRes.is() ) { - static const ::rtl::OUString sSELECT( "SELECT" ); - static const ::rtl::OUString sINSERT( "INSERT" ); - static const ::rtl::OUString sUPDATE( "UPDATE" ); - static const ::rtl::OUString sDELETE( "DELETE" ); - static const ::rtl::OUString sREAD( "READ" ); - static const ::rtl::OUString sCREATE( "CREATE" ); - static const ::rtl::OUString sALTER( "ALTER" ); - static const ::rtl::OUString sREFERENCE( "REFERENCE" ); - static const ::rtl::OUString sDROP( "DROP" ); - static const ::rtl::OUString sYes( "YES" ); + static const OUString sSELECT( "SELECT" ); + static const OUString sINSERT( "INSERT" ); + static const OUString sUPDATE( "UPDATE" ); + static const OUString sDELETE( "DELETE" ); + static const OUString sREAD( "READ" ); + static const OUString sCREATE( "CREATE" ); + static const OUString sALTER( "ALTER" ); + static const OUString sREFERENCE( "REFERENCE" ); + static const OUString sDROP( "DROP" ); + static const OUString sYes( "YES" ); nRightsWithGrant = nRights = 0; Reference<XRow> xCurrentRow(xRes,UNO_QUERY); while( xCurrentRow.is() && xRes->next() ) { - ::rtl::OUString sGrantee = xCurrentRow->getString(5); - ::rtl::OUString sPrivilege = xCurrentRow->getString(6); - ::rtl::OUString sGrantable = xCurrentRow->getString(7); + OUString sGrantee = xCurrentRow->getString(5); + OUString sPrivilege = xCurrentRow->getString(6); + OUString sGrantable = xCurrentRow->getString(7); if (!m_Name.equalsIgnoreAsciiCase(sGrantee)) continue; @@ -201,7 +201,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName } } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL OMySQLUser::getGrantablePrivileges( const ::rtl::OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL OMySQLUser::getGrantablePrivileges( const OUString& objName, sal_Int32 objType ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); @@ -211,27 +211,27 @@ sal_Int32 SAL_CALL OMySQLUser::getGrantablePrivileges( const ::rtl::OUString& ob return nRightsWithGrant; } // ------------------------------------------------------------------------- -void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) +void SAL_CALL OMySQLUser::grantPrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_GRANTED)); + const OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_GRANTED)); ::dbtools::throwGenericSQLException(sError,*this); } // if ( objType != PrivilegeObject::TABLE ) ::osl::MutexGuard aGuard(m_aMutex); - ::rtl::OUString sPrivs = getPrivilegeString(objPrivileges); + OUString sPrivs = getPrivilegeString(objPrivileges); if(!sPrivs.isEmpty()) { - ::rtl::OUString sGrant; - sGrant += ::rtl::OUString("GRANT "); + OUString sGrant; + sGrant += OUString("GRANT "); sGrant += sPrivs; - sGrant += ::rtl::OUString(" ON "); + sGrant += OUString(" ON "); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString(" TO "); + sGrant += OUString(" TO "); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -241,27 +241,27 @@ void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_I } } // ------------------------------------------------------------------------- -void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) +void SAL_CALL OMySQLUser::revokePrivileges( const OUString& objName, sal_Int32 objType, sal_Int32 objPrivileges ) throw(SQLException, RuntimeException) { if ( objType != PrivilegeObject::TABLE ) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_REVOKED)); + const OUString sError( aResources.getResourceString(STR_PRIVILEGE_NOT_REVOKED)); ::dbtools::throwGenericSQLException(sError,*this); } ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); - ::rtl::OUString sPrivs = getPrivilegeString(objPrivileges); + OUString sPrivs = getPrivilegeString(objPrivileges); if(!sPrivs.isEmpty()) { - ::rtl::OUString sGrant; - sGrant += ::rtl::OUString("REVOKE "); + OUString sGrant; + sGrant += OUString("REVOKE "); sGrant += sPrivs; - sGrant += ::rtl::OUString(" ON "); + sGrant += OUString(" ON "); Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); sGrant += ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation); - sGrant += ::rtl::OUString(" FROM "); + sGrant += OUString(" FROM "); sGrant += m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -272,16 +272,16 @@ void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_ } // ----------------------------------------------------------------------------- // XUser -void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/, const ::rtl::OUString& newPassword ) throw(SQLException, RuntimeException) +void SAL_CALL OMySQLUser::changePassword( const OUString& /*oldPassword*/, const OUString& newPassword ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed); - ::rtl::OUString sAlterPwd; - sAlterPwd = ::rtl::OUString("SET PASSWORD FOR "); + OUString sAlterPwd; + sAlterPwd = OUString("SET PASSWORD FOR "); sAlterPwd += m_Name; - sAlterPwd += ::rtl::OUString("@\"%\" = PASSWORD('") ; + sAlterPwd += OUString("@\"%\" = PASSWORD('") ; sAlterPwd += newPassword; - sAlterPwd += ::rtl::OUString("')") ; + sAlterPwd += OUString("')") ; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -292,45 +292,45 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString& /*oldPassword*/ } } // ----------------------------------------------------------------------------- -::rtl::OUString OMySQLUser::getPrivilegeString(sal_Int32 nRights) const +OUString OMySQLUser::getPrivilegeString(sal_Int32 nRights) const { - ::rtl::OUString sPrivs; + OUString sPrivs; if((nRights & Privilege::INSERT) == Privilege::INSERT) - sPrivs += ::rtl::OUString("INSERT"); + sPrivs += OUString("INSERT"); if((nRights & Privilege::DELETE) == Privilege::DELETE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(","); - sPrivs += ::rtl::OUString("DELETE"); + sPrivs += OUString(","); + sPrivs += OUString("DELETE"); } if((nRights & Privilege::UPDATE) == Privilege::UPDATE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(","); - sPrivs += ::rtl::OUString("UPDATE"); + sPrivs += OUString(","); + sPrivs += OUString("UPDATE"); } if((nRights & Privilege::ALTER) == Privilege::ALTER) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(","); - sPrivs += ::rtl::OUString("ALTER"); + sPrivs += OUString(","); + sPrivs += OUString("ALTER"); } if((nRights & Privilege::SELECT) == Privilege::SELECT) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(","); - sPrivs += ::rtl::OUString("SELECT"); + sPrivs += OUString(","); + sPrivs += OUString("SELECT"); } if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE) { if(!sPrivs.isEmpty()) - sPrivs += ::rtl::OUString(","); - sPrivs += ::rtl::OUString("REFERENCES"); + sPrivs += OUString(","); + sPrivs += OUString("REFERENCES"); } return sPrivs; diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index 02197483ba13..e2e54e85d0f3 100644 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx @@ -49,7 +49,7 @@ OUsers::OUsers( ::cppu::OWeakObject& _rParent, } // ----------------------------------------------------------------------------- -sdbcx::ObjectType OUsers::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OUsers::createObject(const OUString& _rName) { return new OMySQLUser(m_xConnection,_rName); } @@ -66,20 +66,20 @@ Reference< XPropertySet > OUsers::createDescriptor() } // ------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aSql( "GRANT USAGE ON * TO " ); - ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); - ::rtl::OUString sUserName( _rForName ); + OUString aSql( "GRANT USAGE ON * TO " ); + OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); + OUString sUserName( _rForName ); aSql += ::dbtools::quoteName(aQuote,sUserName) - + ::rtl::OUString(" @\"%\" "); - ::rtl::OUString sPassword; + + OUString(" @\"%\" "); + OUString sPassword; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPassword; if ( !sPassword.isEmpty() ) { - aSql += ::rtl::OUString(" IDENTIFIED BY '"); + aSql += OUString(" IDENTIFIED BY '"); aSql += sPassword; - aSql += ::rtl::OUString("'"); + aSql += OUString("'"); } Reference< XStatement > xStmt = m_xConnection->createStatement( ); @@ -91,10 +91,10 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const } // ------------------------------------------------------------------------- // XDrop -void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) +void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { - ::rtl::OUString aSql( "REVOKE ALL ON * FROM " ); - ::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); + OUString aSql( "REVOKE ALL ON * FROM " ); + OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( ); aSql += ::dbtools::quoteName(aQuote,_sElementName); Reference< XStatement > xStmt = m_xConnection->createStatement( ); diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index 765b6d745739..8ff2a1b971aa 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -48,9 +48,9 @@ using namespace ::com::sun::star::lang; using namespace dbtools; typedef connectivity::sdbcx::OCollection OCollection_TYPE; -sdbcx::ObjectType OViews::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OViews::createObject(const OUString& _rName) { - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData, _rName, sCatalog, @@ -61,7 +61,7 @@ sdbcx::ObjectType OViews::createObject(const ::rtl::OUString& _rName) sTable, m_xMetaData, 0, - ::rtl::OUString(), + OUString(), sSchema, sCatalog ); @@ -86,14 +86,14 @@ Reference< XPropertySet > OViews::createDescriptor() } // ------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OViews::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createView(descriptor); return createObject( _rForName ); } // ------------------------------------------------------------------------- // XDrop -void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) +void OViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/) { if ( m_bInDrop ) return; @@ -102,7 +102,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); if (!bIsNew) { - ::rtl::OUString aSql( "DROP VIEW" ); + OUString aSql( "DROP VIEW" ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); @@ -114,7 +114,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/) } } // ----------------------------------------------------------------------------- -void OViews::dropByNameImpl(const ::rtl::OUString& elementName) +void OViews::dropByNameImpl(const OUString& elementName) { m_bInDrop = sal_True; OCollection_TYPE::dropByName(elementName); @@ -125,12 +125,12 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql( "CREATE VIEW " ); - ::rtl::OUString sCommand; + OUString aSql( "CREATE VIEW " ); + OUString sCommand; aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString(" AS "); + aSql += OUString(" AS "); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; aSql += sCommand; @@ -145,7 +145,7 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) OTables* pTables = static_cast<OTables*>(static_cast<OMySQLCatalog&>(m_rParent).getPrivateTables()); if ( pTables ) { - ::rtl::OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInDataManipulation, false, false, false ); + OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInDataManipulation, false, false, false ); pTables->appendNew(sName); } } diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index dfb5215311a5..d9dc9561753d 100644 --- a/connectivity/source/drivers/mysql/Yservices.cxx +++ b/connectivity/source/drivers/mysql/Yservices.cxx @@ -21,7 +21,6 @@ #include <cppuhelper/factory.hxx> using namespace connectivity::mysql; -using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::lang::XSingleServiceFactory; |