diff options
Diffstat (limited to 'connectivity/source/commontools')
37 files changed, 735 insertions, 736 deletions
diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx b/connectivity/source/commontools/AutoRetrievingBase.cxx index ffbb348dcd60..78b5f729761e 100644 --- a/connectivity/source/commontools/AutoRetrievingBase.cxx +++ b/connectivity/source/commontools/AutoRetrievingBase.cxx @@ -21,16 +21,16 @@ namespace connectivity { - ::rtl::OUString OAutoRetrievingBase::getTransformedGeneratedStatement(const ::rtl::OUString& _sInsertStatement) const + OUString OAutoRetrievingBase::getTransformedGeneratedStatement(const OUString& _sInsertStatement) const { OSL_ENSURE( m_bAutoRetrievingEnabled,"Illegal call here. isAutoRetrievingEnabled is false!"); - ::rtl::OUString sStmt = _sInsertStatement.toAsciiUpperCase(); - ::rtl::OUString sStatement; + OUString sStmt = _sInsertStatement.toAsciiUpperCase(); + OUString sStatement; if ( sStmt.startsWith("INSERT") ) { sStatement = m_sGeneratedValueStatement; - static const ::rtl::OUString sColumn("$column"); - static const ::rtl::OUString sTable("$table"); + static const OUString sColumn("$column"); + static const OUString sTable("$table"); sal_Int32 nIndex = 0; nIndex = sStatement.indexOf(sColumn,nIndex); if ( -1 != nIndex ) @@ -50,7 +50,7 @@ namespace connectivity while (sStmt.indexOf(' ') == 0 ); nIntoIndex = 0; - ::rtl::OUString sTableName = sStmt.getToken(0,' ',nIntoIndex); + OUString sTableName = sStmt.getToken(0,' ',nIntoIndex); sStatement = sStatement.replaceAt(nIndex,sTable.getLength(),sTableName); } } diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx index 909e411a8d76..48357f28999f 100644 --- a/connectivity/source/commontools/CommonTools.cxx +++ b/connectivity/source/commontools/CommonTools.cxx @@ -111,7 +111,7 @@ namespace connectivity return ( *pStr == 0 ) && ( *pWild == 0 ); } //------------------------------------------------------------------ - rtl::OUString toDateString(const ::com::sun::star::util::Date& rDate) + OUString toDateString(const ::com::sun::star::util::Date& rDate) { sal_Char s[11]; snprintf(s, @@ -121,11 +121,11 @@ namespace connectivity (int)rDate.Month, (int)rDate.Day); s[10] = 0; - return rtl::OUString::createFromAscii(s); + return OUString::createFromAscii(s); } //------------------------------------------------------------------ - rtl::OUString toTimeString(const ::com::sun::star::util::Time& rTime) + OUString toTimeString(const ::com::sun::star::util::Time& rTime) { sal_Char s[9]; snprintf(s, @@ -135,11 +135,11 @@ namespace connectivity (int)rTime.Minutes, (int)rTime.Seconds); s[8] = 0; - return rtl::OUString::createFromAscii(s); + return OUString::createFromAscii(s); } //------------------------------------------------------------------ - rtl::OUString toDateTimeString(const ::com::sun::star::util::DateTime& rDateTime) + OUString toDateTimeString(const ::com::sun::star::util::DateTime& rDateTime) { sal_Char s[20]; snprintf(s, @@ -152,7 +152,7 @@ namespace connectivity (int)rDateTime.Minutes, (int)rDateTime.Seconds); s[19] = 0; - return rtl::OUString::createFromAscii(s); + return OUString::createFromAscii(s); } #ifdef SOLAR_JAVA @@ -198,7 +198,7 @@ namespace connectivity return aRet; } //------------------------------------------------------------------------------ - sal_Bool existsJavaClassByName( const ::rtl::Reference< jvmaccess::VirtualMachine >& _pJVM,const ::rtl::OUString& _sClassName ) + sal_Bool existsJavaClassByName( const ::rtl::Reference< jvmaccess::VirtualMachine >& _pJVM,const OUString& _sClassName ) { sal_Bool bRet = sal_False; if ( _pJVM.is() ) @@ -207,7 +207,7 @@ namespace connectivity JNIEnv* pEnv = aGuard.getEnvironment(); if( pEnv ) { - ::rtl::OString sClassName = ::rtl::OUStringToOString(_sClassName, RTL_TEXTENCODING_ASCII_US); + OString sClassName = OUStringToOString(_sClassName, RTL_TEXTENCODING_ASCII_US); sClassName = sClassName.replace('.','/'); jobject out = pEnv->FindClass(sClassName.getStr()); bRet = out != NULL; @@ -223,7 +223,7 @@ namespace connectivity namespace dbtools { //------------------------------------------------------------------ -sal_Bool isCharOk(sal_Unicode c,const ::rtl::OUString& _rSpecials) +sal_Bool isCharOk(sal_Unicode c,const OUString& _rSpecials) { return ( ((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90)) || ((c >= 48) && (c <= 57)) || @@ -231,7 +231,7 @@ sal_Bool isCharOk(sal_Unicode c,const ::rtl::OUString& _rSpecials) } //------------------------------------------------------------------------------ -sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials) +sal_Bool isValidSQLName(const OUString& rName,const OUString& _rSpecials) { // Test for correct naming (in SQL sense) // This is important for table names for example @@ -260,11 +260,11 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp } //------------------------------------------------------------------ // Creates a new name if necessary -::rtl::OUString convertName2SQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials) +OUString convertName2SQLName(const OUString& rName,const OUString& _rSpecials) { if(isValidSQLName(rName,_rSpecials)) return rName; - ::rtl::OUString aNewName(rName); + OUString aNewName(rName); const sal_Unicode* pStr = rName.getStr(); sal_Int32 nLength = rName.getLength(); sal_Bool bValid(*pStr < 128 && !isdigit(*pStr)); @@ -276,14 +276,14 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp } if ( !bValid ) - aNewName = ::rtl::OUString(); + aNewName = OUString(); return aNewName; } //------------------------------------------------------------------------------ -::rtl::OUString quoteName(const ::rtl::OUString& _rQuote, const ::rtl::OUString& _rName) +OUString quoteName(const OUString& _rQuote, const OUString& _rName) { - ::rtl::OUString sName = _rName; + OUString sName = _rName; if( !_rQuote.isEmpty() && _rQuote.toChar() != ' ') sName = _rQuote + _rName + _rQuote; return sName; diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index a8408fe83cb6..8506fef0b7dd 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -104,21 +104,21 @@ OConnectionWrapper::~OConnectionWrapper() // XServiceInfo // -------------------------------------------------------------------------------- -::rtl::OUString SAL_CALL OConnectionWrapper::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) +OUString SAL_CALL OConnectionWrapper::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) { - return ::rtl::OUString( "com.sun.star.sdbc.drivers.OConnectionWrapper" ); + return OUString( "com.sun.star.sdbc.drivers.OConnectionWrapper" ); } // -------------------------------------------------------------------------------- -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL OConnectionWrapper::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) +::com::sun::star::uno::Sequence< OUString > SAL_CALL OConnectionWrapper::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { // first collect the services which are supported by our aggregate - Sequence< ::rtl::OUString > aSupported; + Sequence< OUString > aSupported; if ( m_xServiceInfo.is() ) aSupported = m_xServiceInfo->getSupportedServiceNames(); // append our own service, if necessary - ::rtl::OUString sConnectionService( "com.sun.star.sdbc.Connection" ); + OUString sConnectionService( "com.sun.star.sdbc.Connection" ); if ( 0 == ::comphelper::findValue( aSupported, sConnectionService, sal_True ).getLength() ) { sal_Int32 nLen = aSupported.getLength(); @@ -131,7 +131,7 @@ OConnectionWrapper::~OConnectionWrapper() } // -------------------------------------------------------------------------------- -sal_Bool SAL_CALL OConnectionWrapper::supportsService( const ::rtl::OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException) +sal_Bool SAL_CALL OConnectionWrapper::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException) { return ::comphelper::findValue( getSupportedServiceNames(), _rServiceName, sal_True ).getLength() != 0; } @@ -195,11 +195,11 @@ namespace // ----------------------------------------------------------------------------- // creates a unique id out of the url and sequence of properties -void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL +void OConnectionWrapper::createUniqueId( const OUString& _rURL ,Sequence< PropertyValue >& _rInfo ,sal_uInt8* _pBuffer - ,const ::rtl::OUString& _rUserName - ,const ::rtl::OUString& _rPassword) + ,const OUString& _rUserName + ,const OUString& _rPassword) { // first we create the digest we want to have rtlDigest aDigest = rtl_digest_create( rtl_Digest_AlgorithmSHA1 ); @@ -218,21 +218,21 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL for (; pBegin != pEnd; ++pBegin) { // we only include strings an integer values - ::rtl::OUString sValue; + OUString sValue; if ( pBegin->Value >>= sValue ) ; else { sal_Int32 nValue = 0; if ( pBegin->Value >>= nValue ) - sValue = ::rtl::OUString::valueOf(nValue); + sValue = OUString::valueOf(nValue); else { - Sequence< ::rtl::OUString> aSeq; + Sequence< OUString> aSeq; if ( pBegin->Value >>= aSeq ) { - const ::rtl::OUString* pSBegin = aSeq.getConstArray(); - const ::rtl::OUString* pSEnd = pSBegin + aSeq.getLength(); + const OUString* pSBegin = aSeq.getConstArray(); + const OUString* pSEnd = pSBegin + aSeq.getLength(); for(;pSBegin != pSEnd;++pSBegin) rtl_digest_update(aDigest,pSBegin->getStr(),pSBegin->getLength()*sizeof(sal_Unicode)); } diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index b9c0b3d98f04..9746196d0336 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -45,10 +45,10 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; // ----------------------------------------------------------------------------- -::rtl::OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, sal_Bool bQuote, +OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, sal_Bool bQuote, const Reference< XTypeConverter >& _rxTypeConverter) { - ::rtl::OUStringBuffer aRet; + OUStringBuffer aRet; if (_rVal.hasValue()) { try @@ -69,7 +69,7 @@ using namespace ::com::sun::star::uno; } else { - ::rtl::OUString sTemp; + OUString sTemp; _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= sTemp; aRet.append(sTemp); } @@ -80,11 +80,11 @@ using namespace ::com::sun::star::uno; if (bQuote) aRet.appendAscii("'"); { - ::rtl::OUString aTemp; + OUString aTemp; _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp; sal_Int32 nIndex = (sal_Int32)-1; - const ::rtl::OUString sQuot("\'"); - const ::rtl::OUString sQuotToReplace("\'\'"); + const OUString sQuot("\'"); + const OUString sQuotToReplace("\'\'"); do { nIndex += 2; @@ -105,7 +105,7 @@ using namespace ::com::sun::star::uno; case DataType::BIGINT: default: { - ::rtl::OUString sTemp; + OUString sTemp; _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= sTemp; aRet.append(sTemp); } @@ -123,7 +123,7 @@ using namespace ::com::sun::star::uno; } else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING) { - ::rtl::OUString sValue; + OUString sValue; _rVal >>= sValue; aDateTime = DBTypeConversion::toDateTime(sValue); bOk = true; @@ -157,7 +157,7 @@ using namespace ::com::sun::star::uno; } else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING) { - ::rtl::OUString sValue; + OUString sValue; _rVal >>= sValue; aDate = DBTypeConversion::toDate(sValue); bOk = true; @@ -184,7 +184,7 @@ using namespace ::com::sun::star::uno; } else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING) { - ::rtl::OUString sValue; + OUString sValue; _rVal >>= sValue; aTime = DBTypeConversion::toTime(sValue); bOk = true; @@ -219,7 +219,7 @@ Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xS { // get the null date Date aDate; - xSupplier->getNumberFormatSettings()->getPropertyValue(::rtl::OUString("NullDate")) >>= aDate; + xSupplier->getNumberFormatSettings()->getPropertyValue(OUString("NullDate")) >>= aDate; return aDate; } catch ( const Exception& ) @@ -233,7 +233,7 @@ Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xS void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, const Reference<XNumberFormatter>& xFormatter, const Date& rNullDate, - const ::rtl::OUString& rString, + const OUString& rString, sal_Int32 nKey, sal_Int16 nFieldType, sal_Int16 nKeyType) throw(::com::sun::star::lang::IllegalArgumentException) @@ -257,8 +257,8 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant, // and again a special treatment, this time for percent formats if ((NumberFormat::NUMBER == nRealUsedTypeClass) && (NumberFormat::PERCENT == nTypeClass)) { // formatting should be "percent", but the String provides just a simple number -> adjust - ::rtl::OUString sExpanded(rString); - static ::rtl::OUString s_sPercentSymbol( "%" ); + OUString sExpanded(rString); + static OUString s_sPercentSymbol( "%" ); // need a method to add a sal_Unicode to a string, 'til then we use a static string sExpanded += s_sPercentSymbol; fValue = xFormatter->convertStringToNumber(nKeyToUse, sExpanded); @@ -397,14 +397,14 @@ double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const D } } //------------------------------------------------------------------------------ -::rtl::OUString DBTypeConversion::getFormattedValue(const Reference< XPropertySet>& _xColumn, +OUString DBTypeConversion::getFormattedValue(const Reference< XPropertySet>& _xColumn, const Reference<XNumberFormatter>& _xFormatter, const ::com::sun::star::lang::Locale& _rLocale, const Date& _rNullDate) { OSL_ENSURE(_xColumn.is() && _xFormatter.is(), "DBTypeConversion::getFormattedValue: invalid arg !"); if (!_xColumn.is() || !_xFormatter.is()) - return ::rtl::OUString(); + return OUString(); sal_Int32 nKey(0); try @@ -433,13 +433,13 @@ double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const D } //------------------------------------------------------------------------------ -::rtl::OUString DBTypeConversion::getFormattedValue(const Reference<XColumn>& xVariant, +OUString DBTypeConversion::getFormattedValue(const Reference<XColumn>& xVariant, const Reference<XNumberFormatter>& xFormatter, const Date& rNullDate, sal_Int32 nKey, sal_Int16 nKeyType) { - ::rtl::OUString aString; + OUString aString; if (xVariant.is()) { try @@ -459,7 +459,7 @@ double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const D { Reference< XNumberFormatsSupplier > xSupplier( xFormatter->getNumberFormatsSupplier(), UNO_SET_THROW ); Reference< XPropertySet > xFormatterSettings( xSupplier->getNumberFormatSettings(), UNO_SET_THROW ); - OSL_VERIFY( xFormatterSettings->getPropertyValue( ::rtl::OUString( "NullDate" ) ) >>= aFormatterNullDate ); + OSL_VERIFY( xFormatterSettings->getPropertyValue( OUString( "NullDate" ) ) >>= aFormatterNullDate ); } catch( const Exception& ) { diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index 1bdf05ee6fce..7d0f5768540f 100644 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -25,28 +25,28 @@ using namespace ::com::sun::star; namespace { - void lcl_convert(const uno::Sequence< ::rtl::OUString >& _aSource,uno::Any& _rDest) + void lcl_convert(const uno::Sequence< OUString >& _aSource,uno::Any& _rDest) { uno::Sequence<uno::Any> aRet(_aSource.getLength()); uno::Any* pAny = aRet.getArray(); - const ::rtl::OUString* pIter = _aSource.getConstArray(); - const ::rtl::OUString* pEnd = pIter + _aSource.getLength(); + const OUString* pIter = _aSource.getConstArray(); + const OUString* pEnd = pIter + _aSource.getLength(); for (;pIter != pEnd ; ++pIter,++pAny) { *pAny <<= *pIter; } _rDest <<= aRet; } - void lcl_fillValues(const ::utl::OConfigurationNode& _aURLPatternNode,const ::rtl::OUString& _sNode,::comphelper::NamedValueCollection& _rValues) + void lcl_fillValues(const ::utl::OConfigurationNode& _aURLPatternNode,const OUString& _sNode,::comphelper::NamedValueCollection& _rValues) { const ::utl::OConfigurationNode aPropertiesNode = _aURLPatternNode.openNode(_sNode); if ( aPropertiesNode.isValid() ) { - uno::Sequence< ::rtl::OUString > aStringSeq; - static const ::rtl::OUString s_sValue("/Value"); - const uno::Sequence< ::rtl::OUString > aProperties = aPropertiesNode.getNodeNames(); - const ::rtl::OUString* pPropertiesIter = aProperties.getConstArray(); - const ::rtl::OUString* pPropertiesEnd = pPropertiesIter + aProperties.getLength(); + uno::Sequence< OUString > aStringSeq; + static const OUString s_sValue("/Value"); + const uno::Sequence< OUString > aProperties = aPropertiesNode.getNodeNames(); + const OUString* pPropertiesIter = aProperties.getConstArray(); + const OUString* pPropertiesEnd = pPropertiesIter + aProperties.getLength(); for (;pPropertiesIter != pPropertiesEnd ; ++pPropertiesIter) { uno::Any aValue = aPropertiesNode.getNodeValue(*pPropertiesIter + s_sValue); @@ -58,22 +58,22 @@ namespace } // for (;pPropertiesIter != pPropertiesEnd ; ++pPropertiesIter,++pNamedIter) } // if ( aPropertiesNode.isValid() ) } - void lcl_readURLPatternNode(const ::utl::OConfigurationTreeRoot& _aInstalled,const ::rtl::OUString& _sEntry,TInstalledDriver& _rInstalledDriver) + void lcl_readURLPatternNode(const ::utl::OConfigurationTreeRoot& _aInstalled,const OUString& _sEntry,TInstalledDriver& _rInstalledDriver) { const ::utl::OConfigurationNode aURLPatternNode = _aInstalled.openNode(_sEntry); if ( aURLPatternNode.isValid() ) { - ::rtl::OUString sParentURLPattern; + OUString sParentURLPattern; aURLPatternNode.getNodeValue("ParentURLPattern") >>= sParentURLPattern; if ( !sParentURLPattern.isEmpty() ) lcl_readURLPatternNode(_aInstalled,sParentURLPattern,_rInstalledDriver); - ::rtl::OUString sDriverFactory; + OUString sDriverFactory; aURLPatternNode.getNodeValue("Driver") >>= sDriverFactory; if ( !sDriverFactory.isEmpty() ) _rInstalledDriver.sDriverFactory = sDriverFactory; - ::rtl::OUString sDriverTypeDisplayName; + OUString sDriverTypeDisplayName; aURLPatternNode.getNodeValue("DriverTypeDisplayName") >>= sDriverTypeDisplayName; OSL_ENSURE(!sDriverTypeDisplayName.isEmpty(),"No valid DriverTypeDisplayName property!"); if ( !sDriverTypeDisplayName.isEmpty() ) @@ -96,15 +96,15 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx { if ( !m_aInstalled.isValid() ) { - static const ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess.Drivers/Installed"); ///Installed + static const OUString s_sNodeName("org.openoffice.Office.DataAccess.Drivers/Installed"); ///Installed m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); } if ( m_aInstalled.isValid() ) { - const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames(); - const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray(); - const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength(); + const uno::Sequence< OUString > aURLPatterns = m_aInstalled.getNodeNames(); + const OUString* pPatternIter = aURLPatterns.getConstArray(); + const OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength(); for (;pPatternIter != pPatternEnd ; ++pPatternIter) { TInstalledDriver aInstalledDriver; @@ -143,11 +143,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) } // ----------------------------------------------------------------------------- -::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const +OUString DriversConfig::getDriverFactoryName(const OUString& _sURL) const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); - ::rtl::OUString sRet; - ::rtl::OUString sOldPattern; + OUString sRet; + OUString sOldPattern; TInstalledDrivers::const_iterator aIter = rDrivers.begin(); TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) @@ -163,11 +163,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) return sRet; } // ----------------------------------------------------------------------------- -::rtl::OUString DriversConfig::getDriverTypeDisplayName(const ::rtl::OUString& _sURL) const +OUString DriversConfig::getDriverTypeDisplayName(const OUString& _sURL) const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); - ::rtl::OUString sRet; - ::rtl::OUString sOldPattern; + OUString sRet; + OUString sOldPattern; TInstalledDrivers::const_iterator aIter = rDrivers.begin(); TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) @@ -183,26 +183,26 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) return sRet; } // ----------------------------------------------------------------------------- -const ::comphelper::NamedValueCollection& DriversConfig::getProperties(const ::rtl::OUString& _sURL) const +const ::comphelper::NamedValueCollection& DriversConfig::getProperties(const OUString& _sURL) const { return impl_get(_sURL,1); } // ----------------------------------------------------------------------------- -const ::comphelper::NamedValueCollection& DriversConfig::getFeatures(const ::rtl::OUString& _sURL) const +const ::comphelper::NamedValueCollection& DriversConfig::getFeatures(const OUString& _sURL) const { return impl_get(_sURL,0); } // ----------------------------------------------------------------------------- -const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const ::rtl::OUString& _sURL) const +const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const OUString& _sURL) const { return impl_get(_sURL,2); } // ----------------------------------------------------------------------------- -const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const +const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const OUString& _sURL,sal_Int32 _nProps) const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); const ::comphelper::NamedValueCollection* pRet = NULL; - ::rtl::OUString sOldPattern; + OUString sOldPattern; TInstalledDrivers::const_iterator aIter = rDrivers.begin(); TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) @@ -233,11 +233,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::O return *pRet; } // ----------------------------------------------------------------------------- -uno::Sequence< ::rtl::OUString > DriversConfig::getURLs() const +uno::Sequence< OUString > DriversConfig::getURLs() const { const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); - uno::Sequence< ::rtl::OUString > aRet(rDrivers.size()); - ::rtl::OUString* pIter = aRet.getArray(); + uno::Sequence< OUString > aRet(rDrivers.size()); + OUString* pIter = aRet.getArray(); TInstalledDrivers::const_iterator aIter = rDrivers.begin(); TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter,++pIter) diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 284d2cff0505..b25e3bd25929 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -158,7 +158,7 @@ void ODatabaseMetaDataResultSet::setRows(const ORows& _rRows) m_bEOF = m_aRows.empty(); } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& columnName ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed ); @@ -295,7 +295,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { return getValue(columnIndex); } @@ -666,55 +666,55 @@ ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getBasicValue() // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getSelectValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("SELECT")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("SELECT")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getInsertValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("INSERT")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("INSERT")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDeleteValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("DELETE")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DELETE")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getUpdateValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("UPDATE")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("UPDATE")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getCreateValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("CREATE")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("CREATE")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getReadValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("READ")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("READ")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getAlterValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("ALTER")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("ALTER")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDropValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("DROP")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("DROP")); return aValueRef; } // ----------------------------------------------------------------------------- ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getQuoteValue() { - static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString("'")); + static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(OUString("'")); return aValueRef; } // ----------------------------------------------------------------------------- @@ -796,7 +796,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA break; case TypeClass_STRING: { - ::rtl::OUString sValue; + OUString sValue; *pRowIter >>= sValue; aValue = new ORowSetValueDecorator(ORowSetValue(sValue)); } @@ -816,9 +816,9 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA // XServiceInfo // -------------------------------------------------------------------------------- //------------------------------------------------------------------------------ - rtl::OUString ODatabaseMetaDataResultSet::getImplementationName_Static( ) throw(RuntimeException) + OUString ODatabaseMetaDataResultSet::getImplementationName_Static( ) throw(RuntimeException) { - return ::rtl::OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet"); + return OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet"); } //------------------------------------------------------------------------------ Sequence< OUString > ODatabaseMetaDataResultSet::getSupportedServiceNames_Static( ) throw (RuntimeException) @@ -828,24 +828,24 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA return aSNS; } //------------------------------------------------------------------ - ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSet::getImplementationName( ) throw(RuntimeException) + OUString SAL_CALL ODatabaseMetaDataResultSet::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); } //------------------------------------------------------------------ - sal_Bool SAL_CALL ODatabaseMetaDataResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) + sal_Bool SAL_CALL ODatabaseMetaDataResultSet::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 ODatabaseMetaDataResultSet::getSupportedServiceNames( ) throw(RuntimeException) + Sequence< OUString > SAL_CALL ODatabaseMetaDataResultSet::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } @@ -869,7 +869,6 @@ namespace { 0, 0, 0, 0, 0, 0 } }; } -using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::registry::XRegistryKey; diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx index 470d27a0ffd2..816a1a453bbc 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx @@ -61,49 +61,49 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32 return sal_True; } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { - return ::rtl::OUString(); + return OUString(); } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnName(); - return ::rtl::OUString(); + return OUString(); } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getTableName(); - return ::rtl::OUString(); + return OUString(); } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getCatalogName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getCatalogName( sal_Int32 /*column*/ ) throw(SQLException, RuntimeException) { - return ::rtl::OUString(); + return OUString(); } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnTypeName(); - return ::rtl::OUString(); + return OUString(); } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnLabel(); return getColumnName(column); } -::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException) { if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != m_mColumns.end()) return (*m_mColumnsIter).second.getColumnServiceName(); - return ::rtl::OUString(); + return OUString(); } sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 65ef48317858..ef968fb9261e 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -418,7 +418,7 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH) case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - (*this) = ::rtl::OUString(_rRH.m_aValue.m_pString); + (*this) = OUString(_rRH.m_aValue.m_pString); break; case DataType::DATE: (*this) = *(Date*)_rRH.m_aValue.m_pValue; @@ -536,7 +536,7 @@ ORowSetValue& ORowSetValue::operator=(const DateTime& _rRH) } // ------------------------------------------------------------------------- -ORowSetValue& ORowSetValue::operator=(const ::rtl::OUString& _rRH) +ORowSetValue& ORowSetValue::operator=(const OUString& _rRH) { if(m_eTypeKind != DataType::VARCHAR || m_aValue.m_pString != _rRH.pData) { @@ -796,8 +796,8 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const case DataType::CHAR: case DataType::LONGVARCHAR: { - ::rtl::OUString aVal1(m_aValue.m_pString); - ::rtl::OUString aVal2(_rRH.m_aValue.m_pString); + OUString aVal1(m_aValue.m_pString); + OUString aVal2(_rRH.m_aValue.m_pString); return aVal1 == aVal2; } default: @@ -811,8 +811,8 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const case DataType::DECIMAL: case DataType::NUMERIC: { - ::rtl::OUString aVal1(m_aValue.m_pString); - ::rtl::OUString aVal2(_rRH.m_aValue.m_pString); + OUString aVal1(m_aValue.m_pString); + OUString aVal2(_rRH.m_aValue.m_pString); bRet = aVal1 == aVal2; } break; @@ -881,7 +881,7 @@ Any ORowSetValue::makeAny() const case DataType::NUMERIC: case DataType::LONGVARCHAR: OSL_ENSURE(m_aValue.m_pString,"Value is null!"); - rValue <<= (::rtl::OUString)m_aValue.m_pString; + rValue <<= (OUString)m_aValue.m_pString; break; case DataType::FLOAT: rValue <<= m_aValue.m_nFloat; @@ -961,10 +961,10 @@ Any ORowSetValue::makeAny() const return rValue; } // ------------------------------------------------------------------------- -::rtl::OUString ORowSetValue::getString( ) const +OUString ORowSetValue::getString( ) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "Ocke.Janssen@sun.com", "ORowSetValue::getString" ); - ::rtl::OUString aRet; + OUString aRet; if(!m_bNull) { switch(getTypeKind()) @@ -996,7 +996,7 @@ Any ORowSetValue::makeAny() const case DataType::VARBINARY: case DataType::LONGVARBINARY: { - ::rtl::OUStringBuffer sVal(::rtl::OUString("0x")); + OUStringBuffer sVal(OUString("0x")); Sequence<sal_Int8> aSeq(getSequence()); const sal_Int8* pBegin = aSeq.getConstArray(); const sal_Int8* pEnd = pBegin + aSeq.getLength(); @@ -1059,9 +1059,9 @@ bool ORowSetValue::getBool() const case DataType::VARCHAR: case DataType::LONGVARCHAR: { - const ::rtl::OUString sValue(m_aValue.m_pString); - const static ::rtl::OUString s_sTrue("true"); - const static ::rtl::OUString s_sFalse("false"); + const OUString sValue(m_aValue.m_pString); + const static OUString s_sTrue("true"); + const static OUString s_sFalse("false"); if ( sValue.equalsIgnoreAsciiCase(s_sTrue) ) { bRet = sal_True; @@ -1077,7 +1077,7 @@ bool ORowSetValue::getBool() const case DataType::DECIMAL: case DataType::NUMERIC: - bRet = ::rtl::OUString(m_aValue.m_pString).toInt32() != 0; + bRet = OUString(m_aValue.m_pString).toInt32() != 0; break; case DataType::FLOAT: bRet = m_aValue.m_nFloat != 0.0; @@ -1137,7 +1137,7 @@ sal_Int8 ORowSetValue::getInt8() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = sal_Int8(::rtl::OUString(m_aValue.m_pString).toInt32()); + nRet = sal_Int8(OUString(m_aValue.m_pString).toInt32()); break; case DataType::FLOAT: nRet = sal_Int8(m_aValue.m_nFloat); @@ -1208,7 +1208,7 @@ sal_uInt8 ORowSetValue::getUInt8() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = sal_uInt8(::rtl::OUString(m_aValue.m_pString).toInt32()); + nRet = sal_uInt8(OUString(m_aValue.m_pString).toInt32()); break; case DataType::FLOAT: nRet = sal_uInt8(m_aValue.m_nFloat); @@ -1283,7 +1283,7 @@ sal_Int16 ORowSetValue::getInt16() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = sal_Int16(::rtl::OUString(m_aValue.m_pString).toInt32()); + nRet = sal_Int16(OUString(m_aValue.m_pString).toInt32()); break; case DataType::FLOAT: nRet = sal_Int16(m_aValue.m_nFloat); @@ -1354,7 +1354,7 @@ sal_uInt16 ORowSetValue::getUInt16() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = sal_uInt16(::rtl::OUString(m_aValue.m_pString).toInt32()); + nRet = sal_uInt16(OUString(m_aValue.m_pString).toInt32()); break; case DataType::FLOAT: nRet = sal_uInt16(m_aValue.m_nFloat); @@ -1426,7 +1426,7 @@ sal_Int32 ORowSetValue::getInt32() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = ::rtl::OUString(m_aValue.m_pString).toInt32(); + nRet = OUString(m_aValue.m_pString).toInt32(); break; case DataType::FLOAT: nRet = sal_Int32(m_aValue.m_nFloat); @@ -1499,7 +1499,7 @@ sal_uInt32 ORowSetValue::getUInt32() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = ::rtl::OUString(m_aValue.m_pString).toInt32(); + nRet = OUString(m_aValue.m_pString).toInt32(); break; case DataType::FLOAT: nRet = sal_uInt32(m_aValue.m_nFloat); @@ -1573,7 +1573,7 @@ sal_Int64 ORowSetValue::getLong() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = ::rtl::OUString(m_aValue.m_pString).toInt64(); + nRet = OUString(m_aValue.m_pString).toInt64(); break; case DataType::FLOAT: nRet = sal_Int64(m_aValue.m_nFloat); @@ -1646,7 +1646,7 @@ sal_uInt64 ORowSetValue::getULong() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = static_cast<sal_uInt64>(::rtl::OUString(m_aValue.m_pString).toInt64()); + nRet = static_cast<sal_uInt64>(OUString(m_aValue.m_pString).toInt64()); break; case DataType::FLOAT: nRet = sal_uInt64(m_aValue.m_nFloat); @@ -1720,7 +1720,7 @@ float ORowSetValue::getFloat() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = ::rtl::OUString(m_aValue.m_pString).toFloat(); + nRet = OUString(m_aValue.m_pString).toFloat(); break; case DataType::FLOAT: nRet = m_aValue.m_nFloat; @@ -1799,7 +1799,7 @@ double ORowSetValue::getDouble() const case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - nRet = ::rtl::OUString(m_aValue.m_pString).toDouble(); + nRet = OUString(m_aValue.m_pString).toDouble(); break; case DataType::FLOAT: nRet = m_aValue.m_nFloat; @@ -1915,7 +1915,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const case DataType::VARCHAR: case DataType::LONGVARCHAR: { - ::rtl::OUString sVal(m_aValue.m_pString); + OUString sVal(m_aValue.m_pString); aSeq = Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(sVal.getStr()),sizeof(sal_Unicode)*sVal.getLength()); } break; @@ -2152,7 +2152,7 @@ namespace detail class SAL_NO_VTABLE IValueSource { public: - virtual ::rtl::OUString getString() const = 0; + virtual OUString getString() const = 0; virtual bool getBoolean() const = 0; virtual sal_Int8 getByte() const = 0; virtual sal_Int16 getShort() const = 0; @@ -2184,7 +2184,7 @@ namespace detail } // IValueSource - virtual ::rtl::OUString getString() const { return m_xRow->getString( m_nPos ); }; + virtual OUString getString() const { return m_xRow->getString( m_nPos ); }; virtual bool getBoolean() const { return m_xRow->getBoolean( m_nPos ); }; virtual sal_Int8 getByte() const { return m_xRow->getByte( m_nPos ); }; virtual sal_Int16 getShort() const { return m_xRow->getShort( m_nPos ); } @@ -2217,7 +2217,7 @@ namespace detail } // IValueSource - virtual ::rtl::OUString getString() const { return m_xColumn->getString(); }; + virtual OUString getString() const { return m_xColumn->getString(); }; virtual bool getBoolean() const { return m_xColumn->getBoolean(); }; virtual sal_Int8 getByte() const { return m_xColumn->getByte(); }; virtual sal_Int16 getShort() const { return m_xColumn->getShort(); } @@ -2372,12 +2372,12 @@ void ORowSetValue::fill(const Any& _rValue) { sal_Unicode aDummy(0); _rValue >>= aDummy; - (*this) = ::rtl::OUString(aDummy); + (*this) = OUString(aDummy); break; } case TypeClass_STRING: { - ::rtl::OUString sDummy; + OUString sDummy; _rValue >>= sDummy; (*this) = sDummy; break; diff --git a/connectivity/source/commontools/ParamterSubstitution.cxx b/connectivity/source/commontools/ParamterSubstitution.cxx index aa487606b5d0..15ad7c9ad9ea 100644 --- a/connectivity/source/commontools/ParamterSubstitution.cxx +++ b/connectivity/source/commontools/ParamterSubstitution.cxx @@ -35,32 +35,32 @@ namespace connectivity ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); uno::Reference< sdbc::XConnection > xConnection; - xConnection = aArgs.getUnpackedValueOrDefault(::rtl::OUString("ActiveConnection"),xConnection); + xConnection = aArgs.getUnpackedValueOrDefault(OUString("ActiveConnection"),xConnection); m_xConnection = xConnection; } //------------------------------------------------------------------------------ - rtl::OUString ParameterSubstitution::getImplementationName_Static( ) throw(RuntimeException) + OUString ParameterSubstitution::getImplementationName_Static( ) throw(RuntimeException) { - return ::rtl::OUString("org.openoffice.comp.helper.ParameterSubstitution"); + return OUString("org.openoffice.comp.helper.ParameterSubstitution"); } //------------------------------------------------------------------------------ - ::rtl::OUString SAL_CALL ParameterSubstitution::getImplementationName( ) throw(RuntimeException) + OUString SAL_CALL ParameterSubstitution::getImplementationName( ) throw(RuntimeException) { return getImplementationName_Static(); } //------------------------------------------------------------------ - sal_Bool SAL_CALL ParameterSubstitution::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) + sal_Bool SAL_CALL ParameterSubstitution::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 ParameterSubstitution::getSupportedServiceNames( ) throw(RuntimeException) + Sequence< OUString > SAL_CALL ParameterSubstitution::getSupportedServiceNames( ) throw(RuntimeException) { return getSupportedServiceNames_Static(); } @@ -78,17 +78,17 @@ namespace connectivity return *(new ParameterSubstitution(_xContext)); } //------------------------------------------------------------------ - ::rtl::OUString SAL_CALL ParameterSubstitution::substituteVariables( const ::rtl::OUString& _sText, ::sal_Bool /*bSubstRequired*/ ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) + OUString SAL_CALL ParameterSubstitution::substituteVariables( const OUString& _sText, ::sal_Bool /*bSubstRequired*/ ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { - ::rtl::OUString sRet = _sText; + OUString sRet = _sText; uno::Reference< sdbc::XConnection > xConnection = m_xConnection; if ( xConnection.is() ) { try { OSQLParser aParser( m_xContext ); - ::rtl::OUString sErrorMessage; - ::rtl::OUString sNewSql; + OUString sErrorMessage; + OUString sNewSql; OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_sText); if(pNode) { // special handling for parameters @@ -105,12 +105,12 @@ namespace connectivity return sRet; } //------------------------------------------------------------------ - ::rtl::OUString SAL_CALL ParameterSubstitution::reSubstituteVariables( const ::rtl::OUString& _sText ) throw (::com::sun::star::uno::RuntimeException) + OUString SAL_CALL ParameterSubstitution::reSubstituteVariables( const OUString& _sText ) throw (::com::sun::star::uno::RuntimeException) { return _sText; } //------------------------------------------------------------------ - ::rtl::OUString SAL_CALL ParameterSubstitution::getSubstituteVariableValue( const ::rtl::OUString& /*variable*/ ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) + OUString SAL_CALL ParameterSubstitution::getSubstituteVariableValue( const OUString& /*variable*/ ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { throw container::NoSuchElementException(); } diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index 95c280befd20..9f1c7c2ed1a6 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -177,7 +177,7 @@ public: } void operator()( StringIteratorT rFirst,StringIteratorT rSecond) const { - rtl::OUString sVal( rFirst, rSecond - rFirst, RTL_TEXTENCODING_UTF8 ); + OUString sVal( rFirst, rSecond - rFirst, RTL_TEXTENCODING_UTF8 ); mpContext->maOperandStack.push( ExpressionNodeSharedPtr( new ConstantValueExpression( new ORowSetValueDecorator( sVal ) ) ) ); } }; @@ -199,7 +199,7 @@ public: } void operator()( StringIteratorT rFirst,StringIteratorT rSecond) const { - rtl::OUString sVal( rFirst, rSecond - rFirst, RTL_TEXTENCODING_UTF8 ); + OUString sVal( rFirst, rSecond - rFirst, RTL_TEXTENCODING_UTF8 ); (void)sVal; } }; @@ -443,13 +443,13 @@ const ParserContextSharedPtr& getParserContext() #endif } -ExpressionNodeSharedPtr FunctionParser::parseFunction( const ::rtl::OUString& _sFunction) +ExpressionNodeSharedPtr FunctionParser::parseFunction( const OUString& _sFunction) { // TODO(Q1): Check if a combination of the RTL_UNICODETOTEXT_FLAGS_* // gives better conversion robustness here (we might want to map space // etc. to ASCII space here) - const ::rtl::OString& rAsciiFunction( - rtl::OUStringToOString( _sFunction, RTL_TEXTENCODING_ASCII_US ) ); + const OString& rAsciiFunction( + OUStringToOString( _sFunction, RTL_TEXTENCODING_ASCII_US ) ); StringIteratorT aStart( rAsciiFunction.getStr() ); StringIteratorT aEnd( rAsciiFunction.getStr()+rAsciiFunction.getLength() ); diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 8f68406813c3..8d97941e869f 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -76,7 +76,7 @@ OColumnsHelper::~OColumnsHelper() } // ----------------------------------------------------------------------------- -sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) { OSL_ENSURE(m_pTable,"NO Table set. Error!"); Reference<XConnection> xConnection = m_pTable->getConnection(); @@ -92,8 +92,8 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName) ColumnInformationMap::iterator aFind = m_pImpl->m_aColumnInfo.find(_rName); if ( aFind == m_pImpl->m_aColumnInfo.end() ) // we have to fill it { - ::rtl::OUString sComposedName = ::dbtools::composeTableNameForSelect( xConnection, m_pTable ); - collectColumnInformation(xConnection,sComposedName,::rtl::OUString("*") ,m_pImpl->m_aColumnInfo); + OUString sComposedName = ::dbtools::composeTableNameForSelect( xConnection, m_pTable ); + collectColumnInformation(xConnection,sComposedName,OUString("*") ,m_pImpl->m_aColumnInfo); aFind = m_pImpl->m_aColumnInfo.find(_rName); } if ( aFind != m_pImpl->m_aColumnInfo.end() ) @@ -116,7 +116,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName) nField11 = ColumnValue::NO_NULLS; } // if ( xKeys.is() ) ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString aCatalog, aSchema, aTable; + OUString aCatalog, aSchema, aTable; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)) >>= aCatalog; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; @@ -169,7 +169,7 @@ Reference< XPropertySet > OColumnsHelper::createDescriptor() } // ----------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { ::osl::MutexGuard aGuard(m_rMutex); OSL_ENSURE(m_pTable,"OColumnsHelper::appendByDescriptor: Table is null!"); @@ -177,10 +177,10 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName return cloneDescriptor( descriptor ); Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); - ::rtl::OUString aSql( "ALTER TABLE " ); + OUString aSql( "ALTER TABLE " ); aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString(" ADD "); + aSql += OUString(" ADD "); aSql += ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),NULL,m_pTable->getTypeCreatePattern()); Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); @@ -193,17 +193,17 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName } // ------------------------------------------------------------------------- // XDrop -void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) +void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { OSL_ENSURE(m_pTable,"OColumnsHelper::dropByName: Table is null!"); if ( m_pTable && !m_pTable->isNew() ) { - ::rtl::OUString aSql( "ALTER TABLE " ); + OUString aSql( "ALTER TABLE " ); Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); - ::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString( ); + OUString aQuote = xMetaData->getIdentifierQuoteString( ); aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ); - aSql += ::rtl::OUString(" DROP "); + aSql += OUString(" DROP "); aSql += ::dbtools::quoteName( aQuote,_sElementName); Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx index d8b57472b017..dd1a60cf9bad 100644 --- a/connectivity/source/commontools/TConnection.cxx +++ b/connectivity/source/commontools/TConnection.cxx @@ -86,7 +86,7 @@ Sequence< sal_Int8 > OMetaConnection::getUnoTunnelImplementationId() // ----------------------------------------------------------------------------- void OMetaConnection::throwGenericSQLException( sal_uInt16 _nErrorResourceId,const Reference< XInterface>& _xContext ) { - ::rtl::OUString sErrorMessage; + OUString sErrorMessage; if ( _nErrorResourceId ) sErrorMessage = m_aResources.getResourceString( _nErrorResourceId ); Reference< XInterface> xContext = _xContext; diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 210b642faac3..9918cf15839a 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -39,8 +39,8 @@ using namespace connectivity; ODatabaseMetaDataBase::ODatabaseMetaDataBase(const Reference< XConnection >& _rxConnection,const Sequence< PropertyValue >& _rInfo) : m_aConnectionInfo(_rInfo) ,m_isCatalogAtStart(false,sal_False) - ,m_sCatalogSeparator(false,::rtl::OUString()) - ,m_sIdentifierQuoteString(false,::rtl::OUString()) + ,m_sCatalogSeparator(false,OUString()) + ,m_sIdentifierQuoteString(false,OUString()) ,m_supportsCatalogsInTableDefinitions(false,sal_False) ,m_supportsSchemasInTableDefinitions(false,sal_False) ,m_supportsCatalogsInDataManipulation(false,sal_False) @@ -90,7 +90,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ Reference< XRow > xRow(xRet,UNO_QUERY); ::comphelper::SequenceAsHashMap aMap(m_aConnectionInfo); Sequence< Any > aTypeInfoSettings; - aTypeInfoSettings = aMap.getUnpackedValueOrDefault(::rtl::OUString("TypeInfoSettings"),aTypeInfoSettings); + aTypeInfoSettings = aMap.getUnpackedValueOrDefault(OUString("TypeInfoSettings"),aTypeInfoSettings); if ( xRow.is() ) { @@ -127,7 +127,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ catch(ParseError&) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceString(STR_FORMULA_WRONG)); + const OUString sError( aResources.getResourceString(STR_FORMULA_WRONG)); ::dbtools::throwGenericSQLException(sError,*this); } } @@ -169,41 +169,41 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getExportedKeys( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eExportedKeys ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getImportedKeys( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eImportedKeys ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getPrimaryKeys( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::ePrimaryKeys ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getIndexInfo( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/, + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/, sal_Bool /*unique*/, sal_Bool /*approximate*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eIndexInfo ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getBestRowIdentifier( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/, sal_Int32 /*scope*/, + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/, sal_Int32 /*scope*/, sal_Bool /*nullable*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eBestRowIdentifier ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getCrossReference( - const Any& /*primaryCatalog*/, const ::rtl::OUString& /*primarySchema*/, - const ::rtl::OUString& /*primaryTable*/, const Any& /*foreignCatalog*/, - const ::rtl::OUString& /*foreignSchema*/, const ::rtl::OUString& /*foreignTable*/ ) throw(SQLException, RuntimeException) + const Any& /*primaryCatalog*/, const OUString& /*primarySchema*/, + const OUString& /*primaryTable*/, const Any& /*foreignCatalog*/, + const OUString& /*foreignSchema*/, const OUString& /*foreignTable*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCrossReference ); } @@ -214,21 +214,21 @@ Reference< XConnection > SAL_CALL ODatabaseMetaDataBase::getConnection( ) throw } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getProcedureColumns( - const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/, - const ::rtl::OUString& /*procedureNamePattern*/, const ::rtl::OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schemaPattern*/, + const OUString& /*procedureNamePattern*/, const OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedureColumns ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getProcedures( - const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/, - const ::rtl::OUString& /*procedureNamePattern*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schemaPattern*/, + const OUString& /*procedureNamePattern*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eProcedures ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getVersionColumns( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eVersionColumns ); } @@ -239,14 +239,14 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getSchemas( ) throw(SQL } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getColumnPrivileges( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/, - const ::rtl::OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/, + const OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumnPrivileges ); } // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTablePrivileges( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/) throw(SQLException, RuntimeException) + const Any& /*catalog*/, const OUString& /*schema*/, const OUString& /*table*/) throw(SQLException, RuntimeException) { return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eTablePrivileges ); } @@ -256,9 +256,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getCatalogs( ) throw(SQ return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eCatalogs ); } // ----------------------------------------------------------------------------- -::rtl::OUString SAL_CALL ODatabaseMetaDataBase::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataBase::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) { - return callImplMethod(m_sIdentifierQuoteString,::std::mem_fun_t< ::rtl::OUString ,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getIdentifierQuoteString_throw)); + return callImplMethod(m_sIdentifierQuoteString,::std::mem_fun_t< OUString ,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getIdentifierQuoteString_throw)); } // ----------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaDataBase::isCatalogAtStart( ) throw(SQLException, RuntimeException) @@ -266,9 +266,9 @@ sal_Bool SAL_CALL ODatabaseMetaDataBase::isCatalogAtStart( ) throw(SQLException return callImplMethod(m_isCatalogAtStart,::std::mem_fun_t< sal_Bool,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_isCatalogAtStart_throw)); } // ----------------------------------------------------------------------------- -::rtl::OUString SAL_CALL ODatabaseMetaDataBase::getCatalogSeparator( ) throw(SQLException, RuntimeException) +OUString SAL_CALL ODatabaseMetaDataBase::getCatalogSeparator( ) throw(SQLException, RuntimeException) { - return callImplMethod(m_sCatalogSeparator,::std::mem_fun_t< ::rtl::OUString,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getCatalogSeparator_throw)); + return callImplMethod(m_sCatalogSeparator,::std::mem_fun_t< OUString,ODatabaseMetaDataBase>(&ODatabaseMetaDataBase::impl_getCatalogSeparator_throw)); } // ----------------------------------------------------------------------------- sal_Bool SAL_CALL ODatabaseMetaDataBase::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/commontools/TIndex.cxx b/connectivity/source/commontools/TIndex.cxx index 9beb8007a7ab..b63dd4699dca 100644 --- a/connectivity/source/commontools/TIndex.cxx +++ b/connectivity/source/commontools/TIndex.cxx @@ -36,13 +36,13 @@ OIndexHelper::OIndexHelper( OTableHelper* _pTable) : connectivity::sdbcx::OIndex , m_pTable(_pTable) { construct(); - ::std::vector< ::rtl::OUString> aVector; + ::std::vector< OUString> aVector; m_pColumns = new OIndexColumns(this,m_aMutex,aVector); } // ------------------------------------------------------------------------- OIndexHelper::OIndexHelper( OTableHelper* _pTable, - const ::rtl::OUString& _Name, - const ::rtl::OUString& _Catalog, + const OUString& _Name, + const OUString& _Catalog, sal_Bool _isUnique, sal_Bool _isPrimaryKeyIndex, sal_Bool _isClustered @@ -63,11 +63,11 @@ void OIndexHelper::refreshColumns() if ( !m_pTable ) return; - ::std::vector< ::rtl::OUString> aVector; + ::std::vector< OUString> aVector; if ( !isNew() ) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString aSchema,aTable; + OUString aSchema,aTable; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; @@ -78,7 +78,7 @@ void OIndexHelper::refreshColumns() if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); - ::rtl::OUString aColName; + OUString aColName; while( xResult->next() ) { if ( xRow->getString(6) == m_Name ) diff --git a/connectivity/source/commontools/TIndexColumns.cxx b/connectivity/source/commontools/TIndexColumns.cxx index eb04b27eb391..93a395acc53c 100644 --- a/connectivity/source/commontools/TIndexColumns.cxx +++ b/connectivity/source/commontools/TIndexColumns.cxx @@ -38,16 +38,16 @@ using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- OIndexColumns::OIndexColumns( OIndexHelper* _pIndex, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) + const ::std::vector< OUString> &_rVector) : connectivity::sdbcx::OCollection(*_pIndex,sal_True,_rMutex,_rVector) ,m_pIndex(_pIndex) { } // ------------------------------------------------------------------------- -sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OIndexColumns::createObject(const OUString& _rName) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString aCatalog, aSchema, aTable; + OUString aCatalog, aSchema, aTable; ::com::sun::star::uno::Any Catalog(m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME))); Catalog >>= aCatalog; m_pIndex->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; @@ -60,7 +60,7 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName) if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); - ::rtl::OUString aD("D"); + OUString aD("D"); while( xResult->next() ) { if(xRow->getString(9) == _rName) @@ -80,11 +80,11 @@ sdbcx::ObjectType OIndexColumns::createObject(const ::rtl::OUString& _rName) if ( xRow->getString(4) == _rName ) { sal_Int32 nDataType = xRow->getInt(5); - ::rtl::OUString aTypeName(xRow->getString(6)); + OUString aTypeName(xRow->getString(6)); sal_Int32 nSize = xRow->getInt(7); sal_Int32 nDec = xRow->getInt(9); sal_Int32 nNull = xRow->getInt(11); - ::rtl::OUString aColumnDef(xRow->getString(13)); + OUString aColumnDef(xRow->getString(13)); OIndexColumn* pRet = new OIndexColumn(bAsc, _rName, diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index d1db21506511..6c89a81b3458 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -40,7 +40,7 @@ using namespace cppu; // ----------------------------------------------------------------------------- OIndexesHelper::OIndexesHelper(OTableHelper* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const ::std::vector< OUString> &_rVector ) : OCollection(*_pTable,sal_True,_rMutex,_rVector) ,m_pTable(_pTable) @@ -48,14 +48,14 @@ OIndexesHelper::OIndexesHelper(OTableHelper* _pTable, } // ----------------------------------------------------------------------------- -sdbcx::ObjectType OIndexesHelper::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OIndexesHelper::createObject(const OUString& _rName) { Reference< XConnection> xConnection = m_pTable->getConnection(); if ( !xConnection.is() ) return NULL; sdbcx::ObjectType xRet; - ::rtl::OUString aName,aQualifier; + OUString aName,aQualifier; sal_Int32 nLen = _rName.indexOf('.'); if ( nLen != -1 ) { @@ -66,7 +66,7 @@ sdbcx::ObjectType OIndexesHelper::createObject(const ::rtl::OUString& _rName) aName = _rName; ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString aSchema,aTable; + OUString aSchema,aTable; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; @@ -121,7 +121,7 @@ Reference< XPropertySet > OIndexesHelper::createDescriptor() } // ------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { Reference< XConnection> xConnection = m_pTable->getConnection(); if ( !xConnection.is() ) @@ -136,18 +136,18 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName else { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUStringBuffer aSql( ::rtl::OUString("CREATE ")); - ::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); - ::rtl::OUString aDot( "." ); + OUStringBuffer aSql( OUString("CREATE ")); + OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( ); + OUString aDot( "." ); if(comphelper::getBOOL(descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISUNIQUE)))) aSql.appendAscii("UNIQUE "); aSql.appendAscii("INDEX "); - ::rtl::OUString aCatalog,aSchema,aTable; + OUString aCatalog,aSchema,aTable; dbtools::qualifiedNameComponents(m_pTable->getMetaData(),m_pTable->getName(),aCatalog,aSchema,aTable,::dbtools::eInDataManipulation); - ::rtl::OUString aComposedName; + OUString aComposedName; aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable,sal_True,::dbtools::eInIndexDefinitions); if (!_rForName.isEmpty() ) @@ -199,7 +199,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); if ( xStmt.is() ) { - ::rtl::OUString sSql = aSql.makeStringAndClear(); + OUString sSql = aSql.makeStringAndClear(); xStmt->execute(sSql); ::comphelper::disposeComponent(xStmt); } @@ -209,7 +209,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName } // ------------------------------------------------------------------------- // XDrop -void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName) +void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName) { Reference< XConnection> xConnection = m_pTable->getConnection(); if( xConnection.is() && !m_pTable->isNew()) @@ -220,20 +220,20 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElem } else { - ::rtl::OUString aName,aSchema; + OUString aName,aSchema; sal_Int32 nLen = _sElementName.indexOf('.'); if(nLen != -1) aSchema = _sElementName.copy(0,nLen); aName = _sElementName.copy(nLen+1); - ::rtl::OUString aSql( "DROP INDEX " ); + OUString aSql( "DROP INDEX " ); - ::rtl::OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::eInIndexDefinitions, false, false, true ); - ::rtl::OUString sIndexName,sTemp; + OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::eInIndexDefinitions, false, false, true ); + OUString sIndexName,sTemp; sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), sTemp, aSchema, aName, sal_True, ::dbtools::eInIndexDefinitions ); aSql += sIndexName - + ::rtl::OUString(" ON ") + + OUString(" ON ") + aComposedName; Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); diff --git a/connectivity/source/commontools/TKey.cxx b/connectivity/source/commontools/TKey.cxx index 0eac87020541..b09b5fee1b40 100644 --- a/connectivity/source/commontools/TKey.cxx +++ b/connectivity/source/commontools/TKey.cxx @@ -38,7 +38,7 @@ OTableKeyHelper::OTableKeyHelper(OTableHelper* _pTable) : connectivity::sdbcx::O } // ------------------------------------------------------------------------- OTableKeyHelper::OTableKeyHelper( OTableHelper* _pTable - ,const ::rtl::OUString& _Name + ,const OUString& _Name ,const sdbcx::TKeyProperties& _rProps ) : connectivity::sdbcx::OKey(_Name,_rProps,sal_True) ,m_pTable(_pTable) @@ -52,14 +52,14 @@ void OTableKeyHelper::refreshColumns() if ( !m_pTable ) return; - ::std::vector< ::rtl::OUString> aVector; + ::std::vector< OUString> aVector; if ( !isNew() ) { aVector = m_aProps->m_aKeyColumnNames; if ( aVector.empty() ) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString aSchema,aTable; + OUString aSchema,aTable; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; @@ -74,7 +74,7 @@ void OTableKeyHelper::refreshColumns() Reference< XRow > xRow(xResult,UNO_QUERY); while( xResult->next() ) { - ::rtl::OUString aForeignKeyColumn = xRow->getString(8); + OUString aForeignKeyColumn = xRow->getString(8); if(xRow->getString(12) == m_Name) aVector.push_back(aForeignKeyColumn); } diff --git a/connectivity/source/commontools/TKeyColumns.cxx b/connectivity/source/commontools/TKeyColumns.cxx index bb5a36a38f2a..9325b080fee5 100644 --- a/connectivity/source/commontools/TKeyColumns.cxx +++ b/connectivity/source/commontools/TKeyColumns.cxx @@ -39,16 +39,16 @@ using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- OKeyColumnsHelper::OKeyColumnsHelper( OTableKeyHelper* _pKey, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) + const ::std::vector< OUString> &_rVector) : connectivity::sdbcx::OCollection(*_pKey,sal_True,_rMutex,_rVector) ,m_pKey(_pKey) { } // ------------------------------------------------------------------------- -sdbcx::ObjectType OKeyColumnsHelper::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OKeyColumnsHelper::createObject(const OUString& _rName) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString aCatalog, aSchema, aTable; + OUString aCatalog, aSchema, aTable; ::com::sun::star::uno::Any Catalog(m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME))); Catalog >>= aCatalog; m_pKey->getTable()->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; @@ -58,11 +58,11 @@ sdbcx::ObjectType OKeyColumnsHelper::createObject(const ::rtl::OUString& _rName) Reference< XResultSet > xResult = m_pKey->getTable()->getMetaData()->getImportedKeys( Catalog, aSchema, aTable); - ::rtl::OUString aRefColumnName; + OUString aRefColumnName; if ( xResult.is() ) { Reference< XRow > xRow(xResult,UNO_QUERY); - ::rtl::OUString aTemp; + OUString aTemp; while(xResult->next()) { aTemp = xRow->getString(4); @@ -87,11 +87,11 @@ sdbcx::ObjectType OKeyColumnsHelper::createObject(const ::rtl::OUString& _rName) if ( xRow->getString(4) == _rName ) { sal_Int32 nDataType = xRow->getInt(5); - ::rtl::OUString aTypeName(xRow->getString(6)); + OUString aTypeName(xRow->getString(6)); sal_Int32 nSize = xRow->getInt(7); sal_Int32 nDec = xRow->getInt(9); sal_Int32 nNull = xRow->getInt(11); - ::rtl::OUString sColumnDef; + OUString sColumnDef; try { sColumnDef = xRow->getString(13); diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx index 1c8b6490ab02..7466d5b3513d 100644 --- a/connectivity/source/commontools/TKeys.cxx +++ b/connectivity/source/commontools/TKeys.cxx @@ -51,7 +51,7 @@ OKeysHelper::OKeysHelper( OTableHelper* _pTable, { } // ------------------------------------------------------------------------- -sdbcx::ObjectType OKeysHelper::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OKeysHelper::createObject(const OUString& _rName) { sdbcx::ObjectType xRet = NULL; @@ -82,7 +82,7 @@ Reference< XPropertySet > OKeysHelper::createDescriptor() // ----------------------------------------------------------------------------- /** returns the keyrule string for the primary key */ -::rtl::OUString getKeyRuleString(sal_Bool _bUpdate,sal_Int32 _nKeyRule) +OUString getKeyRuleString(sal_Bool _bUpdate,sal_Int32 _nKeyRule) { const char* pKeyRule = NULL; switch ( _nKeyRule ) @@ -102,9 +102,9 @@ Reference< XPropertySet > OKeysHelper::createDescriptor() default: ; } - ::rtl::OUString sRet; + OUString sRet; if ( pKeyRule ) - sRet = ::rtl::OUString::createFromAscii(pKeyRule); + sRet = OUString::createFromAscii(pKeyRule); return sRet; } // ------------------------------------------------------------------------- @@ -125,7 +125,7 @@ void OKeysHelper::cloneDescriptorColumns( const sdbcx::ObjectType& _rSourceDescr } // ------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OKeysHelper::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { Reference< XConnection> xConnection = m_pTable->getConnection(); if ( !xConnection.is() ) @@ -140,7 +140,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const ::rtl::OUString& _rForName, c const ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_TYPE))); sal_Int32 nUpdateRule = 0, nDeleteRule = 0; - ::rtl::OUString sReferencedName; + OUString sReferencedName; if ( nKeyType == KeyType::FOREIGN ) { @@ -157,9 +157,9 @@ sdbcx::ObjectType OKeysHelper::appendObject( const ::rtl::OUString& _rForName, c { // if we're here, we belong to a table which is not new, i.e. already exists in the database. // In this case, really append the new index. - ::rtl::OUStringBuffer aSql; + OUStringBuffer aSql; aSql.appendAscii("ALTER TABLE "); - ::rtl::OUString aQuote = m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString( ); + OUString aQuote = m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString( ); aSql.append(composeTableName( m_pTable->getConnection()->getMetaData(), m_pTable, ::dbtools::eInTableDefinitions, false, false, true )); aSql.appendAscii(" ADD "); @@ -211,10 +211,10 @@ sdbcx::ObjectType OKeysHelper::appendObject( const ::rtl::OUString& _rForName, c xStmt->execute(aSql.makeStringAndClear()); } // find the name which the database gave the new key - ::rtl::OUString sNewName( _rForName ); + OUString sNewName( _rForName ); try { - ::rtl::OUString aSchema,aTable; + OUString aSchema,aTable; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; Reference< XResultSet > xResult; @@ -235,7 +235,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const ::rtl::OUString& _rForName, c Reference< XRow > xRow(xResult,UNO_QUERY); while( xResult->next() ) { - ::rtl::OUString sName = xRow->getString(nColumn); + OUString sName = xRow->getString(nColumn); if ( !m_pElements->exists(sName) ) // this name wasn't inserted yet so it must be te new one { descriptor->setPropertyValue( rPropMap.getNameByIndex( PROPERTY_ID_NAME ), makeAny( sName ) ); @@ -255,13 +255,13 @@ sdbcx::ObjectType OKeysHelper::appendObject( const ::rtl::OUString& _rForName, c return createObject( sNewName ); } // ----------------------------------------------------------------------------- -::rtl::OUString OKeysHelper::getDropForeignKey() const +OUString OKeysHelper::getDropForeignKey() const { - return ::rtl::OUString(" DROP CONSTRAINT "); + return OUString(" DROP CONSTRAINT "); } // ------------------------------------------------------------------------- // XDrop -void OKeysHelper::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) +void OKeysHelper::dropObject(sal_Int32 _nPos,const OUString _sElementName) { Reference< XConnection> xConnection = m_pTable->getConnection(); if ( xConnection.is() && !m_pTable->isNew() ) @@ -273,7 +273,7 @@ void OKeysHelper::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName } else { - ::rtl::OUStringBuffer aSql; + OUStringBuffer aSql; aSql.appendAscii("ALTER TABLE "); aSql.append( composeTableName( m_pTable->getConnection()->getMetaData(), m_pTable,::dbtools::eInTableDefinitions, false, false, true )); @@ -291,7 +291,7 @@ void OKeysHelper::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName else { aSql.append(getDropForeignKey()); - const ::rtl::OUString aQuote = m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString(); + const OUString aQuote = m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString(); aSql.append( ::dbtools::quoteName( aQuote,_sElementName) ); } diff --git a/connectivity/source/commontools/TPrivilegesResultSet.cxx b/connectivity/source/commontools/TPrivilegesResultSet.cxx index 3aec1f8aa7c6..c26a61eec22f 100644 --- a/connectivity/source/commontools/TPrivilegesResultSet.cxx +++ b/connectivity/source/commontools/TPrivilegesResultSet.cxx @@ -30,14 +30,14 @@ using namespace ::com::sun::star::lang; //------------------------------------------------------------------------------ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& _rxMeta , const Any& catalog - , const ::rtl::OUString& schemaPattern - , const ::rtl::OUString& tableNamePattern) + , const OUString& schemaPattern + , const OUString& tableNamePattern) : ODatabaseMetaDataResultSet(eTablePrivileges) , m_bResetValues(sal_True) { osl_atomic_increment( &m_refCount ); { - ::rtl::OUString sUserWorkingFor; + OUString sUserWorkingFor; Sequence< OUString > sTableTypes(3); // we want all catalogues, all schemas, all tables sTableTypes[0] = "VIEW"; @@ -58,7 +58,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& static ODatabaseMetaDataResultSet::ORow aRow(8); aRow[5] = new ORowSetValueDecorator(sUserWorkingFor); aRow[6] = ODatabaseMetaDataResultSet::getSelectValue(); - aRow[7] = new ORowSetValueDecorator(::rtl::OUString("YES")); + aRow[7] = new ORowSetValueDecorator(OUString("YES")); aRows.push_back(aRow); aRow[6] = ODatabaseMetaDataResultSet::getInsertValue(); aRows.push_back(aRow); @@ -74,7 +74,7 @@ OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& aRows.push_back(aRow); aRow[6] = ODatabaseMetaDataResultSet::getDropValue(); aRows.push_back(aRow); - aRow[6] = new ORowSetValueDecorator(::rtl::OUString("REFERENCE")); + aRow[6] = new ORowSetValueDecorator(OUString("REFERENCE")); aRows.push_back(aRow); setRows(aRows); diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index e17eaa5a013c..8442a2619930 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -53,7 +53,7 @@ typedef ::cppu::WeakImplHelper1 < XContainerListener > OTableContainerListener_B class OTableContainerListener : public OTableContainerListener_BASE { OTableHelper* m_pComponent; - ::std::map< ::rtl::OUString,bool> m_aRefNames; + ::std::map< OUString,bool> m_aRefNames; OTableContainerListener(const OTableContainerListener&); void operator =(const OTableContainerListener&); @@ -66,14 +66,14 @@ public: } virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (RuntimeException) { - ::rtl::OUString sName; + OUString sName; Event.Accessor >>= sName; if ( m_aRefNames.find(sName) != m_aRefNames.end() ) m_pComponent->refreshKeys(); } virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (RuntimeException) { - ::rtl::OUString sOldComposedName,sNewComposedName; + OUString sOldComposedName,sNewComposedName; Event.ReplacedElement >>= sOldComposedName; Event.Accessor >>= sNewComposedName; if ( sOldComposedName != sNewComposedName && m_aRefNames.find(sOldComposedName) != m_aRefNames.end() ) @@ -84,14 +84,14 @@ public: { } void clear() { m_pComponent = NULL; } - inline void add(const ::rtl::OUString& _sRefName) { m_aRefNames.insert(::std::map< ::rtl::OUString,bool>::value_type(_sRefName,true)); } + inline void add(const OUString& _sRefName) { m_aRefNames.insert(::std::map< OUString,bool>::value_type(_sRefName,true)); } }; } namespace connectivity { - ::rtl::OUString lcl_getServiceNameForSetting(const Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const ::rtl::OUString& i_sSetting) + OUString lcl_getServiceNameForSetting(const Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const OUString& i_sSetting) { - ::rtl::OUString sSupportService; + OUString sSupportService; Any aValue; if ( ::dbtools::getDataSourceSetting(_xConnection,i_sSetting,aValue) ) { @@ -122,13 +122,13 @@ namespace connectivity Reference<XMultiServiceFactory> xFac(_xConnection,UNO_QUERY); if ( xFac.is() ) { - static const ::rtl::OUString s_sTableRename("TableRenameServiceName"); + static const OUString s_sTableRename("TableRenameServiceName"); m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableRename)),UNO_QUERY); - static const ::rtl::OUString s_sTableAlteration("TableAlterationServiceName"); + static const OUString s_sTableAlteration("TableAlterationServiceName"); m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableAlteration)),UNO_QUERY); - static const ::rtl::OUString s_sKeyAlteration("KeyAlterationServiceName"); + static const OUString s_sKeyAlteration("KeyAlterationServiceName"); m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sKeyAlteration)),UNO_QUERY); - static const ::rtl::OUString s_sIndexAlteration("IndexAlterationServiceName"); + static const OUString s_sIndexAlteration("IndexAlterationServiceName"); m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sIndexAlteration)),UNO_QUERY); } } @@ -150,11 +150,11 @@ OTableHelper::OTableHelper( sdbcx::OCollection* _pTables, OTableHelper::OTableHelper( sdbcx::OCollection* _pTables, const Reference< XConnection >& _xConnection, sal_Bool _bCase, - 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 ) : OTable_TYPEDEF(_pTables, _bCase, _Name, @@ -194,17 +194,17 @@ namespace void lcl_collectColumnDescs_throw( const Reference< XResultSet >& _rxResult, ::std::vector< ColumnDesc >& _out_rColumns ) { Reference< XRow > xRow( _rxResult, UNO_QUERY_THROW ); - ::rtl::OUString sName; + OUString sName; OrdinalPosition nOrdinalPosition( 0 ); while ( _rxResult->next() ) { sName = xRow->getString( 4 ); // COLUMN_NAME sal_Int32 nField5 = xRow->getInt(5); - ::rtl::OUString aField6 = xRow->getString(6); + OUString aField6 = xRow->getString(6); sal_Int32 nField7 = xRow->getInt(7) , nField9 = xRow->getInt(9) , nField11= xRow->getInt(11); - ::rtl::OUString sField12 = xRow->getString(12) + OUString sField12 = xRow->getString(12) ,sField13 = xRow->getString(13); nOrdinalPosition = xRow->getInt( 17 ); // ORDINAL_POSITION _out_rColumns.push_back( ColumnDesc( sName,nField5,aField6,nField7,nField9,nField11,sField12,sField13, nOrdinalPosition ) ); @@ -272,7 +272,7 @@ void OTableHelper::refreshColumns() aCatalog, m_SchemaName, m_Name, - ::rtl::OUString("%") + OUString("%") ) ); // collect the column names, together with their ordinal position @@ -283,7 +283,7 @@ void OTableHelper::refreshColumns() lcl_sanitizeColumnDescs( m_pImpl->m_aColumnDesc ); // sort by ordinal position - ::std::map< OrdinalPosition, ::rtl::OUString > aSortedColumns; + ::std::map< OrdinalPosition, OUString > aSortedColumns; for ( ::std::vector< ColumnDesc >::const_iterator copy = m_pImpl->m_aColumnDesc.begin(); copy != m_pImpl->m_aColumnDesc.end(); ++copy @@ -295,7 +295,7 @@ void OTableHelper::refreshColumns() aSortedColumns.begin(), aSortedColumns.end(), ::std::insert_iterator< TStringVector >( aVector, aVector.begin() ), - ::o3tl::select2nd< ::std::map< OrdinalPosition, ::rtl::OUString >::value_type >() + ::o3tl::select2nd< ::std::map< OrdinalPosition, OUString >::value_type >() ); } @@ -305,7 +305,7 @@ void OTableHelper::refreshColumns() m_pColumns = createColumns(aVector); } // ----------------------------------------------------------------------------- -const ColumnDesc* OTableHelper::getColumnDescription(const ::rtl::OUString& _sName) const +const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const { const ColumnDesc* pRet = NULL; ::std::vector< ColumnDesc >::const_iterator aEnd = m_pImpl->m_aColumnDesc.end(); @@ -329,8 +329,8 @@ void OTableHelper::refreshPrimaryKeys(TStringVector& _rNames) if ( xResult.is() ) { - sdbcx::TKeyProperties pKeyProps(new sdbcx::KeyProperties(::rtl::OUString(),KeyType::PRIMARY,0,0)); - ::rtl::OUString aPkName; + sdbcx::TKeyProperties pKeyProps(new sdbcx::KeyProperties(OUString(),KeyType::PRIMARY,0,0)); + OUString aPkName; bool bAlreadyFetched = false; const Reference< XRow > xRow(xResult,UNO_QUERY); while ( xResult->next() ) @@ -360,20 +360,20 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames) if ( xRow.is() ) { sdbcx::TKeyProperties pKeyProps; - ::rtl::OUString aName,sCatalog,aSchema,sOldFKName; + OUString aName,sCatalog,aSchema,sOldFKName; while( xResult->next() ) { // this must be outsid the "if" because we have to call in a right order sCatalog = xRow->getString(1); if ( xRow->wasNull() ) - sCatalog = ::rtl::OUString(); + sCatalog = OUString(); aSchema = xRow->getString(2); aName = xRow->getString(3); - const ::rtl::OUString sForeignKeyColumn = xRow->getString(8); + const OUString sForeignKeyColumn = xRow->getString(8); const sal_Int32 nUpdateRule = xRow->getInt(10); const sal_Int32 nDeleteRule = xRow->getInt(11); - const ::rtl::OUString sFkName = xRow->getString(12); + const OUString sFkName = xRow->getString(12); if ( pKeyProps.get() ) { @@ -387,7 +387,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames) if ( pKeyProps.get() ) m_pImpl->m_aKeys.insert(TKeyMap::value_type(sOldFKName,pKeyProps)); - const ::rtl::OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,sal_False,::dbtools::eInDataManipulation); + const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,sal_False,::dbtools::eInDataManipulation); pKeyProps.reset(new sdbcx::KeyProperties(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule)); pKeyProps->m_aKeyColumnNames.push_back(sForeignKeyColumn); _rNames.push_back(sFkName); @@ -446,9 +446,9 @@ void OTableHelper::refreshIndexes() if(xResult.is()) { Reference< XRow > xRow(xResult,UNO_QUERY); - ::rtl::OUString aName; - ::rtl::OUString sCatalogSep = getMetaData()->getCatalogSeparator(); - ::rtl::OUString sPreviousRoundName; + OUString aName; + OUString sCatalogSep = getMetaData()->getCatalogSeparator(); + OUString sPreviousRoundName; while( xResult->next() ) { aName = xRow->getString(5); @@ -473,19 +473,19 @@ void OTableHelper::refreshIndexes() m_pIndexes = createIndexes(aVector); } // ----------------------------------------------------------------------------- -::rtl::OUString OTableHelper::getRenameStart() const +OUString OTableHelper::getRenameStart() const { - ::rtl::OUString sSql("RENAME "); - if ( m_Type == ::rtl::OUString("VIEW") ) - sSql += ::rtl::OUString(" VIEW "); + OUString sSql("RENAME "); + if ( m_Type == OUString("VIEW") ) + sSql += OUString(" VIEW "); else - sSql += ::rtl::OUString(" TABLE "); + sSql += OUString(" TABLE "); return sSql; } // ------------------------------------------------------------------------- // XRename -void SAL_CALL OTableHelper::rename( const ::rtl::OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) +void SAL_CALL OTableHelper::rename( const OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); checkDisposed( @@ -504,15 +504,15 @@ void SAL_CALL OTableHelper::rename( const ::rtl::OUString& newName ) throw(SQLEx } else { - ::rtl::OUString sSql = getRenameStart(); + OUString sSql = getRenameStart(); - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - ::rtl::OUString sComposedName; + OUString sComposedName; sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sal_True,::dbtools::eInDataManipulation); sSql += sComposedName - + ::rtl::OUString(" TO "); + + OUString(" TO "); sComposedName = ::dbtools::composeTableName(getMetaData(),sCatalog,sSchema,sTable,sal_True,::dbtools::eInDataManipulation); sSql += sComposedName; @@ -552,9 +552,9 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL OTableHelper::getName() throw(RuntimeException) +OUString SAL_CALL OTableHelper::getName() throw(RuntimeException) { - ::rtl::OUString sComposedName; + OUString sComposedName; sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sal_False,::dbtools::eInDataManipulation); return sComposedName; } @@ -569,7 +569,7 @@ void SAL_CALL OTableHelper::release() throw() OTable_TYPEDEF::release(); } // ----------------------------------------------------------------------------- -sdbcx::TKeyProperties OTableHelper::getKeyProperties(const ::rtl::OUString& _sName) const +sdbcx::TKeyProperties OTableHelper::getKeyProperties(const OUString& _sName) const { sdbcx::TKeyProperties pKeyProps; TKeyMap::const_iterator aFind = m_pImpl->m_aKeys.find(_sName); @@ -586,14 +586,14 @@ sdbcx::TKeyProperties OTableHelper::getKeyProperties(const ::rtl::OUString& _sNa return pKeyProps; } // ----------------------------------------------------------------------------- -void OTableHelper::addKey(const ::rtl::OUString& _sName,const sdbcx::TKeyProperties& _aKeyProperties) +void OTableHelper::addKey(const OUString& _sName,const sdbcx::TKeyProperties& _aKeyProperties) { m_pImpl->m_aKeys.insert(TKeyMap::value_type(_sName,_aKeyProperties)); } // ----------------------------------------------------------------------------- -::rtl::OUString OTableHelper::getTypeCreatePattern() const +OUString OTableHelper::getTypeCreatePattern() const { - return ::rtl::OUString(); + return OUString(); } // ----------------------------------------------------------------------------- Reference< XConnection> OTableHelper::getConnection() const diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx index 2da06c8f9179..05e6a448122a 100644 --- a/connectivity/source/commontools/conncleanup.cxx +++ b/connectivity/source/commontools/conncleanup.cxx @@ -33,9 +33,9 @@ namespace dbtools using namespace ::com::sun::star::lang; //===================================================================== - static const ::rtl::OUString& getActiveConnectionPropertyName() + static const OUString& getActiveConnectionPropertyName() { - static const ::rtl::OUString s_sActiveConnectionPropertyName( "ActiveConnection" ); + static const OUString s_sActiveConnectionPropertyName( "ActiveConnection" ); return s_sActiveConnectionPropertyName; } diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index 93fac347ed4a..04c9aec71b10 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -99,7 +99,7 @@ namespace dbtools } //------------------------------------------------------------------------- - OCharsetMap::CharsetIterator OCharsetMap::find(const ::rtl::OUString& _rIanaName, const IANA&) const + OCharsetMap::CharsetIterator OCharsetMap::find(const OUString& _rIanaName, const IANA&) const { ensureConstructed( ); @@ -107,7 +107,7 @@ namespace dbtools if ( !_rIanaName.isEmpty() ) { // byte string conversion - ::rtl::OString sMimeByteString( _rIanaName.getStr(), _rIanaName.getLength(), RTL_TEXTENCODING_ASCII_US ); + OString sMimeByteString( _rIanaName.getStr(), _rIanaName.getLength(), RTL_TEXTENCODING_ASCII_US ); // look up eEncoding = rtl_getTextEncodingFromMimeCharset( sMimeByteString.getStr() ); @@ -139,7 +139,7 @@ namespace dbtools } //------------------------------------------------------------------------- - CharsetIteratorDerefHelper:: CharsetIteratorDerefHelper(const rtl_TextEncoding _eEncoding, const ::rtl::OUString& _rIanaName ) + CharsetIteratorDerefHelper:: CharsetIteratorDerefHelper(const rtl_TextEncoding _eEncoding, const OUString& _rIanaName ) :m_eEncoding( _eEncoding ) ,m_aIanaName( _rIanaName ) { @@ -174,14 +174,14 @@ namespace dbtools OSL_ENSURE( m_aPos != m_pContainer->m_aEncodings.end(), "OCharsetMap::CharsetIterator::operator*: invalid position!"); rtl_TextEncoding eEncoding = *m_aPos; - ::rtl::OUString sIanaName; + OUString sIanaName; if ( RTL_TEXTENCODING_DONTKNOW != eEncoding ) { // it's not the virtual "system charset" const char* pIanaName = rtl_getMimeCharsetFromTextEncoding( eEncoding ); OSL_ENSURE( pIanaName, "OCharsetMap::CharsetIterator: invalid mime name!" ); if ( pIanaName ) - sIanaName = ::rtl::OUString::createFromAscii( pIanaName ); + sIanaName = OUString::createFromAscii( pIanaName ); } return CharsetIteratorDerefHelper( eEncoding, sIanaName ); } diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 698ce2e37e18..0af54185befd 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -53,7 +53,7 @@ namespace dbtools return STANDARD_DB_DATE; } //------------------------------------------------------------------------------ - ::rtl::OUString DBTypeConversion::toDateString(const Date& rDate) + OUString DBTypeConversion::toDateString(const Date& rDate) { sal_Char s[11]; snprintf(s, @@ -63,10 +63,10 @@ namespace dbtools (int)rDate.Month, (int)rDate.Day); s[10] = 0; - return ::rtl::OUString::createFromAscii(s); + return OUString::createFromAscii(s); } //------------------------------------------------------------------ - ::rtl::OUString DBTypeConversion::toTimeString(const Time& rTime) + OUString DBTypeConversion::toTimeString(const Time& rTime) { sal_Char s[9]; snprintf(s, @@ -76,14 +76,14 @@ namespace dbtools (int)rTime.Minutes, (int)rTime.Seconds); s[8] = 0; - return ::rtl::OUString::createFromAscii(s); + return OUString::createFromAscii(s); } //------------------------------------------------------------------ - ::rtl::OUString DBTypeConversion::toDateTimeString(const DateTime& _rDateTime) + OUString DBTypeConversion::toDateTimeString(const DateTime& _rDateTime) { Date aDate(_rDateTime.Day,_rDateTime.Month,_rDateTime.Year); - ::rtl::OUStringBuffer aTemp(toDateString(aDate)); + OUStringBuffer aTemp(toDateString(aDate)); aTemp.appendAscii(" "); Time aTime(0,_rDateTime.Seconds,_rDateTime.Minutes,_rDateTime.Hours); aTemp.append( toTimeString(aTime) ); @@ -381,7 +381,7 @@ namespace dbtools return xRet; } //------------------------------------------------------------------------------ - Date DBTypeConversion::toDate(const ::rtl::OUString& _sSQLString) + Date DBTypeConversion::toDate(const OUString& _sSQLString) { // get the token out of a string static sal_Unicode sDateSep = '-'; @@ -402,7 +402,7 @@ namespace dbtools } //----------------------------------------------------------------------------- - DateTime DBTypeConversion::toDateTime(const ::rtl::OUString& _sSQLString) + DateTime DBTypeConversion::toDateTime(const OUString& _sSQLString) { //@see http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Timestamp.html#valueOf(java.lang.String) //@see http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Date.html#valueOf(java.lang.String) @@ -419,7 +419,7 @@ namespace dbtools } //----------------------------------------------------------------------------- - Time DBTypeConversion::toTime(const ::rtl::OUString& _sSQLString) + Time DBTypeConversion::toTime(const OUString& _sSQLString) { static sal_Unicode sTimeSep = ':'; @@ -436,12 +436,12 @@ namespace dbtools { nSecond = (sal_uInt16)_sSQLString.getToken(0,sTimeSep,nIndex).toInt32(); nIndex = 0; - ::rtl::OUString sNano(_sSQLString.getToken(1,'.',nIndex)); + OUString sNano(_sSQLString.getToken(1,'.',nIndex)); if ( !sNano.isEmpty() ) { // our time struct only supports hundredth seconds sNano = sNano.copy(0,::std::min<sal_Int32>(sNano.getLength(),2)); - const static ::rtl::OUString s_Zeros("00"); + const static OUString s_Zeros("00"); sNano += s_Zeros.copy(0,s_Zeros.getLength() - sNano.getLength()); nHundredthSeconds = static_cast<sal_uInt16>(sNano.toInt32()); } diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index 02ae48c75d83..5dcac1bec49c 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -70,7 +70,7 @@ SQLExceptionInfo::SQLExceptionInfo(const ::com::sun::star::sdb::SQLContext& _rEr } //------------------------------------------------------------------------------ -SQLExceptionInfo::SQLExceptionInfo( const ::rtl::OUString& _rSimpleErrorMessage ) +SQLExceptionInfo::SQLExceptionInfo( const OUString& _rSimpleErrorMessage ) { SQLException aError; aError.Message = _rSimpleErrorMessage; @@ -198,12 +198,12 @@ SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const } //------------------------------------------------------------------------------ -void SQLExceptionInfo::prepend( const ::rtl::OUString& _rErrorMessage, const sal_Char* _pAsciiSQLState, const sal_Int32 _nErrorCode ) +void SQLExceptionInfo::prepend( const OUString& _rErrorMessage, const sal_Char* _pAsciiSQLState, const sal_Int32 _nErrorCode ) { SQLException aException; aException.Message = _rErrorMessage; aException.ErrorCode = _nErrorCode; - aException.SQLState = _pAsciiSQLState ? ::rtl::OUString::createFromAscii( _pAsciiSQLState ) : ::rtl::OUString("S1000" ); + aException.SQLState = _pAsciiSQLState ? OUString::createFromAscii( _pAsciiSQLState ) : OUString("S1000" ); aException.NextException = m_aContent; m_aContent <<= aException; @@ -211,7 +211,7 @@ void SQLExceptionInfo::prepend( const ::rtl::OUString& _rErrorMessage, const sal } //------------------------------------------------------------------------------ -void SQLExceptionInfo::append( TYPE _eType, const ::rtl::OUString& _rErrorMessage, const sal_Char* _pAsciiSQLState, const sal_Int32 _nErrorCode ) +void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, const sal_Char* _pAsciiSQLState, const sal_Int32 _nErrorCode ) { // create the to-be-appended exception Any aAppend; @@ -227,7 +227,7 @@ void SQLExceptionInfo::append( TYPE _eType, const ::rtl::OUString& _rErrorMessag SQLException* pAppendException( static_cast< SQLException* >( const_cast< void* >( aAppend.getValue() ) ) ); pAppendException->Message = _rErrorMessage; - pAppendException->SQLState = ::rtl::OUString::createFromAscii( _pAsciiSQLState ); + pAppendException->SQLState = OUString::createFromAscii( _pAsciiSQLState ); pAppendException->ErrorCode = _nErrorCode; // find the end of the current chain @@ -386,7 +386,7 @@ void throwInvalidIndexException(const ::com::sun::star::uno::Reference< ::com::s ); } // ----------------------------------------------------------------------------- -void throwFunctionNotSupportedException(const ::rtl::OUString& _rMsg, +void throwFunctionNotSupportedException(const OUString& _rMsg, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _Context, const ::com::sun::star::uno::Any& _Next) throw ( ::com::sun::star::sdbc::SQLException ) { @@ -403,9 +403,9 @@ void throwFunctionNotSupportedException( const sal_Char* _pAsciiFunctionName, co const ::com::sun::star::uno::Any* _pNextException ) throw ( ::com::sun::star::sdbc::SQLException ) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution( + const OUString sError( aResources.getResourceStringWithSubstitution( STR_UNSUPPORTED_FUNCTION, - "$functionname$", ::rtl::OUString::createFromAscii( _pAsciiFunctionName ) + "$functionname$", OUString::createFromAscii( _pAsciiFunctionName ) ) ); throwFunctionNotSupportedException( sError, @@ -414,14 +414,14 @@ void throwFunctionNotSupportedException( const sal_Char* _pAsciiFunctionName, co ); } // ----------------------------------------------------------------------------- -void throwGenericSQLException(const ::rtl::OUString& _rMsg, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxSource) +void throwGenericSQLException(const OUString& _rMsg, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxSource) throw (::com::sun::star::sdbc::SQLException) { throwGenericSQLException(_rMsg, _rxSource, Any()); } // ----------------------------------------------------------------------------- -void throwGenericSQLException(const ::rtl::OUString& _rMsg, const Reference< XInterface >& _rxSource, const Any& _rNextException) +void throwGenericSQLException(const OUString& _rMsg, const Reference< XInterface >& _rxSource, const Any& _rNextException) throw (SQLException) { throw SQLException( _rMsg, _rxSource, getStandardSQLState( SQL_GENERAL_ERROR ), 0, _rNextException); @@ -432,9 +432,9 @@ void throwFeatureNotImplementedException( const sal_Char* _pAsciiFeatureName, co throw (SQLException) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution( + const OUString sError( aResources.getResourceStringWithSubstitution( STR_UNSUPPORTED_FEATURE, - "$featurename$", ::rtl::OUString::createFromAscii( _pAsciiFeatureName ) + "$featurename$", OUString::createFromAscii( _pAsciiFeatureName ) ) ); throw SQLException( @@ -451,9 +451,9 @@ void throwSQLException( const sal_Char* _pAsciiMessage, const sal_Char* _pAsciiS const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode, const Any* _pNextException ) throw (SQLException) { throw SQLException( - ::rtl::OUString::createFromAscii( _pAsciiMessage ), + OUString::createFromAscii( _pAsciiMessage ), _rxContext, - ::rtl::OUString::createFromAscii( _pAsciiState ), + OUString::createFromAscii( _pAsciiState ), _nErrorCode, _pNextException ? *_pNextException : Any() ); @@ -468,7 +468,7 @@ void throwSQLException( const sal_Char* _pAsciiMessage, StandardSQLState _eSQLSt } // ----------------------------------------------------------------------------- -void throwSQLException( const ::rtl::OUString& _rMessage, StandardSQLState _eSQLState, +void throwSQLException( const OUString& _rMessage, StandardSQLState _eSQLState, const Reference< XInterface >& _rxContext, const sal_Int32 _nErrorCode, const Any* _pNextException ) throw (SQLException) { @@ -518,9 +518,9 @@ const sal_Char* getStandardSQLStateAscii( StandardSQLState _eState ) } // ----------------------------------------------------------------------------- -::rtl::OUString getStandardSQLState( StandardSQLState _eState ) +OUString getStandardSQLState( StandardSQLState _eState ) { - return ::rtl::OUString::createFromAscii( getStandardSQLStateAscii( _eState ) ); + return OUString::createFromAscii( getStandardSQLStateAscii( _eState ) ); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 35030118ab74..79881a425d73 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -81,8 +81,8 @@ namespace dbtools Reference< XDatabaseMetaData > xConnectionMetaData; ::connectivity::DriversConfig aDriverConfig; - ::boost::optional< ::rtl::OUString > sCachedIdentifierQuoteString; - ::boost::optional< ::rtl::OUString > sCachedCatalogSeparator; + ::boost::optional< OUString > sCachedIdentifierQuoteString; + ::boost::optional< OUString > sCachedCatalogSeparator; DatabaseMetaData_Impl() :xConnection() @@ -115,7 +115,7 @@ namespace dbtools if ( !_metaDataImpl.xConnection.is() || !_metaDataImpl.xConnectionMetaData.is() ) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceString(STR_NO_CONNECTION_GIVEN)); + const OUString sError( aResources.getResourceString(STR_NO_CONNECTION_GIVEN)); throwSQLException( sError, SQL_CONNECTION_DOES_NOT_EXIST, NULL ); } } @@ -141,10 +141,10 @@ namespace dbtools { Reference< XPropertySet > xDataSource( xConnectionAsChild->getParent(), UNO_QUERY_THROW ); Reference< XPropertySet > xDataSourceSettings( - xDataSource->getPropertyValue( ::rtl::OUString( "Settings" ) ), + xDataSource->getPropertyValue( OUString( "Settings" ) ), UNO_QUERY_THROW ); - _out_setting = xDataSourceSettings->getPropertyValue( ::rtl::OUString::createFromAscii( _asciiName ) ); + _out_setting = xDataSourceSettings->getPropertyValue( OUString::createFromAscii( _asciiName ) ); } else { @@ -163,9 +163,9 @@ namespace dbtools } //................................................................ - static const ::rtl::OUString& lcl_getConnectionStringSetting( - const DatabaseMetaData_Impl& _metaData, ::boost::optional< ::rtl::OUString >& _cachedSetting, - ::rtl::OUString (SAL_CALL XDatabaseMetaData::*_getter)() ) + static const OUString& lcl_getConnectionStringSetting( + const DatabaseMetaData_Impl& _metaData, ::boost::optional< OUString >& _cachedSetting, + OUString (SAL_CALL XDatabaseMetaData::*_getter)() ) { if ( !_cachedSetting ) { @@ -265,13 +265,13 @@ namespace dbtools } //-------------------------------------------------------------------- - const ::rtl::OUString& DatabaseMetaData::getIdentifierQuoteString() const + const OUString& DatabaseMetaData::getIdentifierQuoteString() const { return lcl_getConnectionStringSetting( *m_pImpl, m_pImpl->sCachedIdentifierQuoteString, &XDatabaseMetaData::getIdentifierQuoteString ); } //-------------------------------------------------------------------- - const ::rtl::OUString& DatabaseMetaData::getCatalogSeparator() const + const OUString& DatabaseMetaData::getCatalogSeparator() const { return lcl_getConnectionStringSetting( *m_pImpl, m_pImpl->sCachedCatalogSeparator, &XDatabaseMetaData::getCatalogSeparator ); } @@ -341,7 +341,7 @@ namespace dbtools { if ( !bSupport ) { - const ::rtl::OUString url = m_pImpl->xConnectionMetaData->getURL(); + const OUString url = m_pImpl->xConnectionMetaData->getURL(); char pMySQL[] = "sdbc:mysql"; bSupport = url.matchAsciiL(pMySQL,(sizeof(pMySQL)/sizeof(pMySQL[0]))-1); } @@ -404,7 +404,7 @@ namespace dbtools try { Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW ); - ::rtl::OUString sConnectionURL( xMeta->getURL() ); + OUString sConnectionURL( xMeta->getURL() ); doDisplay = sConnectionURL.startsWith( "sdbc:mysql:mysqlc" ); } catch( const Exception& ) @@ -421,7 +421,7 @@ namespace dbtools try { Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW ); - ::rtl::OUString sConnectionURL( xMeta->getURL() ); + OUString sConnectionURL( xMeta->getURL() ); bSupported = !sConnectionURL.startsWith( "sdbc:mysql:mysqlc" ); } catch( const Exception& ) diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 8e6513dc7abd..f362bff17be2 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -133,10 +133,10 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, try { // determine the datatype of the column - _xColumn->getPropertyValue(::rtl::OUString("Type")) >>= nDataType; + _xColumn->getPropertyValue(OUString("Type")) >>= nDataType; if (DataType::NUMERIC == nDataType || DataType::DECIMAL == nDataType) - _xColumn->getPropertyValue(::rtl::OUString("Scale")) >>= nScale; + _xColumn->getPropertyValue(OUString("Scale")) >>= nScale; } catch (Exception&) { @@ -144,7 +144,7 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, } return getDefaultNumberFormat(nDataType, nScale, - ::cppu::any2bool(_xColumn->getPropertyValue(::rtl::OUString("IsCurrency"))), + ::cppu::any2bool(_xColumn->getPropertyValue(OUString("IsCurrency"))), _xTypes, _rLocale); } @@ -185,7 +185,7 @@ sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType, { // generate a new format if necessary Reference< XNumberFormats > xFormats(_xTypes, UNO_QUERY); - ::rtl::OUString sNewFormat = xFormats->generateFormat( 0L, _rLocale, sal_False, sal_False, (sal_Int16)_nScale, sal_True); + OUString sNewFormat = xFormats->generateFormat( 0L, _rLocale, sal_False, sal_False, (sal_Int16)_nScale, sal_True); // and add it to the formatter if necessary nFormat = xFormats->queryKey(sNewFormat, _rLocale, sal_False); @@ -247,7 +247,7 @@ Reference< XConnection> findConnection(const Reference< XInterface >& xParent) //------------------------------------------------------------------------------ Reference< XDataSource> getDataSource_allowException( - const ::rtl::OUString& _rsTitleOrPath, + const OUString& _rsTitleOrPath, const Reference< XComponentContext >& _rxContext ) { ENSURE_OR_RETURN( !_rsTitleOrPath.isEmpty(), "getDataSource_allowException: invalid arg !", NULL ); @@ -259,7 +259,7 @@ Reference< XDataSource> getDataSource_allowException( //------------------------------------------------------------------------------ Reference< XDataSource > getDataSource( - const ::rtl::OUString& _rsTitleOrPath, + const OUString& _rsTitleOrPath, const Reference< XComponentContext >& _rxContext ) { Reference< XDataSource > xDS; @@ -277,9 +277,9 @@ Reference< XDataSource > getDataSource( //------------------------------------------------------------------------------ Reference< XConnection > getConnection_allowException( - const ::rtl::OUString& _rsTitleOrPath, - const ::rtl::OUString& _rsUser, - const ::rtl::OUString& _rsPwd, + const OUString& _rsTitleOrPath, + const OUString& _rsUser, + const OUString& _rsPwd, const Reference< XComponentContext>& _rxContext) { Reference< XDataSource> xDataSource( getDataSource_allowException(_rsTitleOrPath, _rxContext) ); @@ -290,13 +290,13 @@ Reference< XConnection > getConnection_allowException( if(_rsUser.isEmpty() || _rsPwd.isEmpty()) { Reference<XPropertySet> xProp(xDataSource,UNO_QUERY); - ::rtl::OUString sPwd, sUser; + OUString sPwd, sUser; sal_Bool bPwdReq = sal_False; try { xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd; - bPwdReq = ::cppu::any2bool(xProp->getPropertyValue(::rtl::OUString("IsPasswordRequired"))); - xProp->getPropertyValue(::rtl::OUString("User")) >>= sUser; + bPwdReq = ::cppu::any2bool(xProp->getPropertyValue(OUString("IsPasswordRequired"))); + xProp->getPropertyValue(OUString("User")) >>= sUser; } catch(Exception&) { @@ -322,8 +322,8 @@ Reference< XConnection > getConnection_allowException( } //------------------------------------------------------------------------------ -Reference< XConnection> getConnection_withFeedback(const ::rtl::OUString& _rDataSourceName, - const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference< XComponentContext>& _rxContext) +Reference< XConnection> getConnection_withFeedback(const OUString& _rDataSourceName, + const OUString& _rUser, const OUString& _rPwd, const Reference< XComponentContext>& _rxContext) SAL_THROW ( (SQLException) ) { Reference< XConnection > xReturn; @@ -349,7 +349,7 @@ Reference< XConnection> getConnection(const Reference< XRowSet>& _rxRowSet) thro Reference< XConnection> xReturn; Reference< XPropertySet> xRowSetProps(_rxRowSet, UNO_QUERY); if (xRowSetProps.is()) - xRowSetProps->getPropertyValue(::rtl::OUString("ActiveConnection")) >>= xReturn; + xRowSetProps->getPropertyValue(OUString("ActiveConnection")) >>= xReturn; return xReturn; } @@ -371,7 +371,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R // 1. already connected? Reference< XConnection > xExistingConn( - xRowSetProps->getPropertyValue( ::rtl::OUString( "ActiveConnection" ) ), + xRowSetProps->getPropertyValue( OUString( "ActiveConnection" ) ), UNO_QUERY ); if ( xExistingConn.is() @@ -383,7 +383,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R { if ( _bSetAsActiveConnection ) { - xRowSetProps->setPropertyValue( ::rtl::OUString( "ActiveConnection" ), makeAny( xExistingConn ) ); + xRowSetProps->setPropertyValue( OUString( "ActiveConnection" ), makeAny( xExistingConn ) ); // no auto disposer needed, since we did not create the connection } @@ -393,17 +393,17 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R // build a connection with it's current settings (4. data source name, or 5. URL) - const ::rtl::OUString sUserProp( "User" ); - ::rtl::OUString sDataSourceName; - xRowSetProps->getPropertyValue(::rtl::OUString("DataSourceName")) >>= sDataSourceName; - ::rtl::OUString sURL; - xRowSetProps->getPropertyValue(::rtl::OUString("URL")) >>= sURL; + const OUString sUserProp( "User" ); + OUString sDataSourceName; + xRowSetProps->getPropertyValue(OUString("DataSourceName")) >>= sDataSourceName; + OUString sURL; + xRowSetProps->getPropertyValue(OUString("URL")) >>= sURL; Reference< XConnection > xPureConnection; if (!sDataSourceName.isEmpty()) { // the row set's data source property is set // -> try to connect, get user and pwd setting for that - ::rtl::OUString sUser, sPwd; + OUString sUser, sPwd; if (hasProperty(sUserProp, xRowSetProps)) xRowSetProps->getPropertyValue(sUserProp) >>= sUser; @@ -421,7 +421,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R } catch( const Exception& ) { } if (xDriverManager.is()) { - ::rtl::OUString sUser, sPwd; + OUString sUser, sPwd; if (hasProperty(sUserProp, xRowSetProps)) xRowSetProps->getPropertyValue(sUserProp) >>= sUser; if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), xRowSetProps)) @@ -458,7 +458,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R } else xRowSetProps->setPropertyValue( - ::rtl::OUString( "ActiveConnection" ), + OUString( "ActiveConnection" ), makeAny( xConnection.getTyped() ) ); } @@ -489,7 +489,7 @@ SharedConnection ensureRowSetConnection(const Reference< XRowSet>& _rxRowSet, co } //------------------------------------------------------------------------------ -Reference< XNameAccess> getTableFields(const Reference< XConnection>& _rxConn,const ::rtl::OUString& _rName) +Reference< XNameAccess> getTableFields(const Reference< XConnection>& _rxConn,const OUString& _rName) { Reference< XComponent > xDummy; return getFieldsByCommandDescriptor( _rxConn, CommandType::TABLE, _rName, xDummy ); @@ -511,7 +511,7 @@ Reference< XNameAccess> getPrimaryKeyColumns_throw(const Reference< XPropertySet if ( xKeys.is() ) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - const ::rtl::OUString sPropName = rPropMap.getNameByIndex(PROPERTY_ID_TYPE); + const OUString sPropName = rPropMap.getNameByIndex(PROPERTY_ID_TYPE); Reference<XPropertySet> xProp; const sal_Int32 nCount = xKeys->getCount(); for(sal_Int32 i = 0;i< nCount;++i) @@ -546,7 +546,7 @@ namespace //------------------------------------------------------------------------------ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnection >& _rxConnection, - const sal_Int32 _nCommandType, const ::rtl::OUString& _rCommand, + const sal_Int32 _nCommandType, const OUString& _rCommand, Reference< XComponent >& _rxKeepFieldsAlive, SQLExceptionInfo* _pErrorInfo ) SAL_THROW( ( ) ) { OSL_PRECOND( _rxConnection.is(), "::dbtools::getFieldsByCommandDescriptor: invalid connection!" ); @@ -656,7 +656,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect case HANDLE_SQL: { - ::rtl::OUString sStatementToExecute( _rCommand ); + OUString sStatementToExecute( _rCommand ); // well, the main problem here is to handle statements which contain a parameter // If we would simply execute a parametrized statement, then this will fail because @@ -672,14 +672,14 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect if ( xComposerFac.is() ) { - Reference< XSingleSelectQueryComposer > xComposer(xComposerFac->createInstance( ::rtl::OUString("com.sun.star.sdb.SingleSelectQueryComposer")),UNO_QUERY); + Reference< XSingleSelectQueryComposer > xComposer(xComposerFac->createInstance( OUString("com.sun.star.sdb.SingleSelectQueryComposer")),UNO_QUERY); if ( xComposer.is() ) { xComposer->setQuery( sStatementToExecute ); // Now set the filter to a dummy restriction which will result in an empty // result set. - xComposer->setFilter( ::rtl::OUString( "0=1" ) ); + xComposer->setFilter( OUString( "0=1" ) ); sStatementToExecute = xComposer->getQuery( ); } } @@ -703,7 +703,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect { if ( xStatementProps.is() ) xStatementProps->setPropertyValue( - ::rtl::OUString( "MaxRows" ), + OUString( "MaxRows" ), makeAny( sal_Int32( 0 ) ) ); } @@ -741,8 +741,8 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect } //------------------------------------------------------------------------------ -Sequence< ::rtl::OUString > getFieldNamesByCommandDescriptor( const Reference< XConnection >& _rxConnection, - const sal_Int32 _nCommandType, const ::rtl::OUString& _rCommand, +Sequence< OUString > getFieldNamesByCommandDescriptor( const Reference< XConnection >& _rxConnection, + const sal_Int32 _nCommandType, const OUString& _rCommand, SQLExceptionInfo* _pErrorInfo ) SAL_THROW( ( ) ) { // get the container for the fields @@ -750,7 +750,7 @@ Sequence< ::rtl::OUString > getFieldNamesByCommandDescriptor( const Reference< X Reference< XNameAccess > xFieldContainer = getFieldsByCommandDescriptor( _rxConnection, _nCommandType, _rCommand, xKeepFieldsAlive, _pErrorInfo ); // get the names of the fields - Sequence< ::rtl::OUString > aNames; + Sequence< OUString > aNames; if ( xFieldContainer.is() ) aNames = xFieldContainer->getElementNames(); @@ -762,16 +762,16 @@ Sequence< ::rtl::OUString > getFieldNamesByCommandDescriptor( const Reference< X } //------------------------------------------------------------------------------ -SQLContext prependContextInfo(const SQLException& _rException, const Reference< XInterface >& _rxContext, const ::rtl::OUString& _rContextDescription, const ::rtl::OUString& _rContextDetails) +SQLContext prependContextInfo(const SQLException& _rException, const Reference< XInterface >& _rxContext, const OUString& _rContextDescription, const OUString& _rContextDetails) { - return SQLContext( _rContextDescription, _rxContext, ::rtl::OUString(), 0, makeAny( _rException ), _rContextDetails ); + return SQLContext( _rContextDescription, _rxContext, OUString(), 0, makeAny( _rException ), _rContextDetails ); } //------------------------------------------------------------------------------ SQLException prependErrorInfo( const SQLException& _rChainedException, const Reference< XInterface >& _rxContext, - const ::rtl::OUString& _rAdditionalError, const StandardSQLState _eSQLState, const sal_Int32 _nErrorCode ) + const OUString& _rAdditionalError, const StandardSQLState _eSQLState, const sal_Int32 _nErrorCode ) { return SQLException( _rAdditionalError, _rxContext, - _eSQLState == SQL_ERROR_UNSPECIFIED ? ::rtl::OUString() : getStandardSQLState( _eSQLState ), + _eSQLState == SQL_ERROR_UNSPECIFIED ? OUString() : getStandardSQLState( _eSQLState ), _nErrorCode, makeAny( _rChainedException ) ); } @@ -837,21 +837,21 @@ namespace } //-------------------------------------------------------------------------- -static ::rtl::OUString impl_doComposeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, - const ::rtl::OUString& _rCatalog, const ::rtl::OUString& _rSchema, const ::rtl::OUString& _rName, +static OUString impl_doComposeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, + const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName, sal_Bool _bQuote, EComposeRule _eComposeRule ) { OSL_ENSURE(_rxMetaData.is(), "impl_doComposeTableName : invalid meta data !"); if ( !_rxMetaData.is() ) - return ::rtl::OUString(); + return OUString(); OSL_ENSURE(!_rName.isEmpty(), "impl_doComposeTableName : at least the name should be non-empty !"); - const ::rtl::OUString sQuoteString = _rxMetaData->getIdentifierQuoteString(); + const OUString sQuoteString = _rxMetaData->getIdentifierQuoteString(); const NameComponentSupport aNameComps( lcl_getNameComponentSupport( _rxMetaData, _eComposeRule ) ); - ::rtl::OUStringBuffer aComposedName; + OUStringBuffer aComposedName; - ::rtl::OUString sCatalogSep; + OUString sCatalogSep; sal_Bool bCatlogAtStart = sal_True; if ( !_rCatalog.isEmpty() && aNameComps.bCatalogs ) { @@ -887,25 +887,25 @@ static ::rtl::OUString impl_doComposeTableName( const Reference< XDatabaseMetaDa } //------------------------------------------------------------------------------ -::rtl::OUString quoteTableName(const Reference< XDatabaseMetaData>& _rxMeta - , const ::rtl::OUString& _rName +OUString quoteTableName(const Reference< XDatabaseMetaData>& _rxMeta + , const OUString& _rName , EComposeRule _eComposeRule) { - ::rtl::OUString sCatalog, sSchema, sTable; + OUString sCatalog, sSchema, sTable; qualifiedNameComponents(_rxMeta,_rName,sCatalog,sSchema,sTable,_eComposeRule); return impl_doComposeTableName( _rxMeta, sCatalog, sSchema, sTable, sal_True, _eComposeRule ); } //------------------------------------------------------------------------------ -void qualifiedNameComponents(const Reference< XDatabaseMetaData >& _rxConnMetaData, const ::rtl::OUString& _rQualifiedName, ::rtl::OUString& _rCatalog, ::rtl::OUString& _rSchema, ::rtl::OUString& _rName,EComposeRule _eComposeRule) +void qualifiedNameComponents(const Reference< XDatabaseMetaData >& _rxConnMetaData, const OUString& _rQualifiedName, OUString& _rCatalog, OUString& _rSchema, OUString& _rName,EComposeRule _eComposeRule) { OSL_ENSURE(_rxConnMetaData.is(), "QualifiedNameComponents : invalid meta data!"); NameComponentSupport aNameComps( lcl_getNameComponentSupport( _rxConnMetaData, _eComposeRule ) ); - ::rtl::OUString sSeparator = _rxConnMetaData->getCatalogSeparator(); + OUString sSeparator = _rxConnMetaData->getCatalogSeparator(); - ::rtl::OUString sName(_rQualifiedName); + OUString sName(_rQualifiedName); // do we have catalogs ? if ( aNameComps.bCatalogs ) { @@ -952,7 +952,7 @@ Reference< XNumberFormatsSupplier> getNumberFormats( // ask the parent of the connection (should be an DatabaseAccess) Reference< XNumberFormatsSupplier> xReturn; Reference< XChild> xConnAsChild(_rxConn, UNO_QUERY); - ::rtl::OUString sPropFormatsSupplier( "NumberFormatsSupplier" ); + OUString sPropFormatsSupplier( "NumberFormatsSupplier" ); if (xConnAsChild.is()) { Reference< XPropertySet> xConnParentProps(xConnAsChild->getParent(), UNO_QUERY); @@ -990,22 +990,22 @@ try Property* pOldProps = aOldProperties.getArray(); Property* pNewProps = aNewProperties.getArray(); - ::rtl::OUString sPropDefaultControl("DefaultControl"); - ::rtl::OUString sPropLabelControl("LabelControl"); - ::rtl::OUString sPropFormatsSupplier("FormatsSupplier"); - ::rtl::OUString sPropCurrencySymbol("CurrencySymbol"); - ::rtl::OUString sPropDecimals("Decimals"); - ::rtl::OUString sPropEffectiveMin("EffectiveMin"); - ::rtl::OUString sPropEffectiveMax("EffectiveMax"); - ::rtl::OUString sPropEffectiveDefault("EffectiveDefault"); - ::rtl::OUString sPropDefaultText("DefaultText"); - ::rtl::OUString sPropDefaultDate("DefaultDate"); - ::rtl::OUString sPropDefaultTime("DefaultTime"); - ::rtl::OUString sPropValueMin("ValueMin"); - ::rtl::OUString sPropValueMax("ValueMax"); - ::rtl::OUString sPropDecimalAccuracy("DecimalAccuracy"); - ::rtl::OUString sPropClassId("ClassId"); - ::rtl::OUString sFormattedServiceName( "com.sun.star.form.component.FormattedField" ); + OUString sPropDefaultControl("DefaultControl"); + OUString sPropLabelControl("LabelControl"); + OUString sPropFormatsSupplier("FormatsSupplier"); + OUString sPropCurrencySymbol("CurrencySymbol"); + OUString sPropDecimals("Decimals"); + OUString sPropEffectiveMin("EffectiveMin"); + OUString sPropEffectiveMax("EffectiveMax"); + OUString sPropEffectiveDefault("EffectiveDefault"); + OUString sPropDefaultText("DefaultText"); + OUString sPropDefaultDate("DefaultDate"); + OUString sPropDefaultTime("DefaultTime"); + OUString sPropValueMin("ValueMin"); + OUString sPropValueMax("ValueMax"); + OUString sPropDecimalAccuracy("DecimalAccuracy"); + OUString sPropClassId("ClassId"); + OUString sFormattedServiceName( "com.sun.star.form.component.FormattedField" ); for (sal_Int16 i=0; i<aOldProperties.getLength(); ++i) { @@ -1030,10 +1030,10 @@ try { OSL_UNUSED( e ); #ifdef DBG_UTIL - ::rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("TransferFormComponentProperties : could not transfer the value for property \"")); + OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("TransferFormComponentProperties : could not transfer the value for property \"")); sMessage += pResult->Name; - sMessage += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); - OSL_FAIL(::rtl::OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US).getStr()); + sMessage += OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + OSL_FAIL(OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US).getStr()); #endif } } @@ -1109,7 +1109,7 @@ try // The Effective-Properties should always be void or string or double .... if (hasProperty(sPropDefaultDate, xNewProps) && !bIsString) - { // (to convert a ::rtl::OUString into a date will not always succeed, because it might be bound to a text-column, + { // (to convert a OUString into a date will not always succeed, because it might be bound to a text-column, // but we can work with a double) Date aDate = DBTypeConversion::toDate(getDouble(aEffectiveDefault)); xNewProps->setPropertyValue(sPropDefaultDate, makeAny(aDate)); @@ -1127,11 +1127,11 @@ try } if (hasProperty(sPropDefaultText, xNewProps) && bIsString) - { // and here the ::rtl::OUString + { // and here the OUString xNewProps->setPropertyValue(sPropDefaultText, aEffectiveDefault); } - // nyi: The translation between doubles and ::rtl::OUString would offer more alternatives + // nyi: The translation between doubles and OUString would offer more alternatives } } @@ -1178,7 +1178,7 @@ try } // With this we can generate a new format ... - ::rtl::OUString sNewFormat = xFormats->generateFormat(nBaseKey, _rLocale, sal_False, sal_False, nDecimals, 0); + OUString sNewFormat = xFormats->generateFormat(nBaseKey, _rLocale, sal_False, sal_False, nDecimals, 0); // No thousands separator, negative numbers are not in red, no leading zeros // ... and add at FormatsSupplier (if needed) @@ -1216,7 +1216,7 @@ try aNewDefault <<= DBTypeConversion::toDouble(*(Time*)aTime.getValue()); } - // double or ::rtl::OUString will be copied directly + // double or OUString will be copied directly if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), xOldProps)) aNewDefault = xOldProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE)); if (hasProperty(sPropDefaultText, xOldProps)) @@ -1235,19 +1235,19 @@ catch(const Exception&) //------------------------------------------------------------------------------ sal_Bool canInsert(const Reference< XPropertySet>& _rxCursorSet) { - return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(::rtl::OUString("Privileges"))) & Privilege::INSERT) != 0)); + return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(OUString("Privileges"))) & Privilege::INSERT) != 0)); } //------------------------------------------------------------------------------ sal_Bool canUpdate(const Reference< XPropertySet>& _rxCursorSet) { - return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(::rtl::OUString("Privileges"))) & Privilege::UPDATE) != 0)); + return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(OUString("Privileges"))) & Privilege::UPDATE) != 0)); } //------------------------------------------------------------------------------ sal_Bool canDelete(const Reference< XPropertySet>& _rxCursorSet) { - return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(::rtl::OUString("Privileges"))) & Privilege::DELETE) != 0)); + return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(OUString("Privileges"))) & Privilege::DELETE) != 0)); } // ----------------------------------------------------------------------------- Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent) @@ -1281,22 +1281,22 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere // as this reflects the status after the last execute, not the currently set properties) sal_Int32 nCommandType = CommandType::COMMAND; - ::rtl::OUString sCommand; + OUString sCommand; sal_Bool bEscapeProcessing = sal_False; - OSL_VERIFY( _rxRowSet->getPropertyValue( ::rtl::OUString( "CommandType" ) ) >>= nCommandType ); - OSL_VERIFY( _rxRowSet->getPropertyValue( ::rtl::OUString( "Command" ) ) >>= sCommand ); - OSL_VERIFY( _rxRowSet->getPropertyValue( ::rtl::OUString( "EscapeProcessing" ) ) >>= bEscapeProcessing ); + OSL_VERIFY( _rxRowSet->getPropertyValue( OUString( "CommandType" ) ) >>= nCommandType ); + OSL_VERIFY( _rxRowSet->getPropertyValue( OUString( "Command" ) ) >>= sCommand ); + OSL_VERIFY( _rxRowSet->getPropertyValue( OUString( "EscapeProcessing" ) ) >>= bEscapeProcessing ); StatementComposer aComposer( xConn, sCommand, nCommandType, bEscapeProcessing ); // append sort - aComposer.setOrder( getString( _rxRowSet->getPropertyValue( ::rtl::OUString( "Order" ) ) ) ); + aComposer.setOrder( getString( _rxRowSet->getPropertyValue( OUString( "Order" ) ) ) ); // append filter sal_Bool bApplyFilter = sal_True; - _rxRowSet->getPropertyValue( ::rtl::OUString( "ApplyFilter" ) ) >>= bApplyFilter; + _rxRowSet->getPropertyValue( OUString( "ApplyFilter" ) ) >>= bApplyFilter; if ( bApplyFilter ) - aComposer.setFilter( getString( _rxRowSet->getPropertyValue( ::rtl::OUString( "Filter" ) ) ) ); + aComposer.setFilter( getString( _rxRowSet->getPropertyValue( OUString( "Filter" ) ) ) ); aComposer.getQuery(); @@ -1338,10 +1338,10 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer( return xReturn; } //-------------------------------------------------------------------------- -::rtl::OUString composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, - const ::rtl::OUString& _rCatalog, - const ::rtl::OUString& _rSchema, - const ::rtl::OUString& _rName, +OUString composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData, + const OUString& _rCatalog, + const OUString& _rSchema, + const OUString& _rName, sal_Bool _bQuote, EComposeRule _eComposeRule) { @@ -1349,16 +1349,16 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer( } // ----------------------------------------------------------------------------- -::rtl::OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection, - const ::rtl::OUString& _rCatalog, const ::rtl::OUString& _rSchema, const ::rtl::OUString& _rName ) +OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection, + const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName ) { - sal_Bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, ::rtl::OUString( "UseCatalogInSelect" ), sal_True ); - sal_Bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, ::rtl::OUString( "UseSchemaInSelect" ), sal_True ); + sal_Bool bUseCatalogInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseCatalogInSelect" ), sal_True ); + sal_Bool bUseSchemaInSelect = isDataSourcePropertyEnabled( _rxConnection, OUString( "UseSchemaInSelect" ), sal_True ); return impl_doComposeTableName( _rxConnection->getMetaData(), - bUseCatalogInSelect ? _rCatalog : ::rtl::OUString(), - bUseSchemaInSelect ? _rSchema : ::rtl::OUString(), + bUseCatalogInSelect ? _rCatalog : OUString(), + bUseSchemaInSelect ? _rSchema : OUString(), _rName, true, eInDataManipulation @@ -1369,7 +1369,7 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer( namespace { static void lcl_getTableNameComponents( const Reference<XPropertySet>& _xTable, - ::rtl::OUString& _out_rCatalog, ::rtl::OUString& _out_rSchema, ::rtl::OUString& _out_rName ) + OUString& _out_rCatalog, OUString& _out_rSchema, OUString& _out_rName ) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); Reference< XPropertySetInfo > xInfo; @@ -1392,29 +1392,29 @@ namespace } // ----------------------------------------------------------------------------- -::rtl::OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const Reference<XPropertySet>& _xTable ) +OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const Reference<XPropertySet>& _xTable ) { - ::rtl::OUString sCatalog, sSchema, sName; + OUString sCatalog, sSchema, sName; lcl_getTableNameComponents( _xTable, sCatalog, sSchema, sName ); return composeTableNameForSelect( _rxConnection, sCatalog, sSchema, sName ); } // ----------------------------------------------------------------------------- -::rtl::OUString composeTableName(const Reference<XDatabaseMetaData>& _xMetaData, +OUString composeTableName(const Reference<XDatabaseMetaData>& _xMetaData, const Reference<XPropertySet>& _xTable, EComposeRule _eComposeRule, bool _bSuppressCatalog, bool _bSuppressSchema, bool _bQuote ) { - ::rtl::OUString sCatalog, sSchema, sName; + OUString sCatalog, sSchema, sName; lcl_getTableNameComponents( _xTable, sCatalog, sSchema, sName ); return impl_doComposeTableName( _xMetaData, - _bSuppressCatalog ? ::rtl::OUString() : sCatalog, - _bSuppressSchema ? ::rtl::OUString() : sSchema, + _bSuppressCatalog ? OUString() : sCatalog, + _bSuppressSchema ? OUString() : sSchema, sName, _bQuote, _eComposeRule @@ -1441,32 +1441,32 @@ sal_Int32 getSearchColumnFlag( const Reference< XConnection>& _rxConn,sal_Int32 } // ----------------------------------------------------------------------------- -::rtl::OUString createUniqueName( const Sequence< ::rtl::OUString >& _rNames, const ::rtl::OUString& _rBaseName, sal_Bool _bStartWithNumber ) +OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString& _rBaseName, sal_Bool _bStartWithNumber ) { - ::std::set< ::rtl::OUString > aUsedNames; + ::std::set< OUString > aUsedNames; ::std::copy( _rNames.getConstArray(), _rNames.getConstArray() + _rNames.getLength(), - ::std::insert_iterator< ::std::set< ::rtl::OUString > >( aUsedNames, aUsedNames.end() ) + ::std::insert_iterator< ::std::set< OUString > >( aUsedNames, aUsedNames.end() ) ); - ::rtl::OUString sName( _rBaseName ); + OUString sName( _rBaseName ); sal_Int32 nPos = 1; if ( _bStartWithNumber ) - sName += ::rtl::OUString::valueOf( nPos ); + sName += OUString::valueOf( nPos ); while ( aUsedNames.find( sName ) != aUsedNames.end() ) { sName = _rBaseName; - sName += ::rtl::OUString::valueOf( ++nPos ); + sName += OUString::valueOf( ++nPos ); } return sName; } // ----------------------------------------------------------------------------- -::rtl::OUString createUniqueName(const Reference<XNameAccess>& _rxContainer,const ::rtl::OUString& _rBaseName,sal_Bool _bStartWithNumber) +OUString createUniqueName(const Reference<XNameAccess>& _rxContainer,const OUString& _rBaseName,sal_Bool _bStartWithNumber) { - Sequence< ::rtl::OUString > aElementNames; + Sequence< OUString > aElementNames; OSL_ENSURE( _rxContainer.is(), "createUniqueName: invalid container!" ); if ( _rxContainer.is() ) @@ -1514,7 +1514,7 @@ sal_Bool implUpdateObject(const Reference< XRowUpdate >& _rxUpdatedObject, break; case TypeClass_STRING: - _rxUpdatedObject->updateString(_nColumnIndex, *(rtl::OUString*)_rValue.getValue()); + _rxUpdatedObject->updateString(_nColumnIndex, *(OUString*)_rValue.getValue()); break; case TypeClass_BOOLEAN: @@ -1531,7 +1531,7 @@ sal_Bool implUpdateObject(const Reference< XRowUpdate >& _rxUpdatedObject, break; case TypeClass_CHAR: - _rxUpdatedObject->updateString(_nColumnIndex,::rtl::OUString((sal_Unicode *)_rValue.getValue(),1)); + _rxUpdatedObject->updateString(_nColumnIndex,OUString((sal_Unicode *)_rValue.getValue(),1)); break; case TypeClass_UNSIGNED_LONG: @@ -1615,7 +1615,7 @@ sal_Bool implSetObject( const Reference< XParameters >& _rxParameters, break; case TypeClass_STRING: - _rxParameters->setString(_nColumnIndex, *(rtl::OUString*)_rValue.getValue()); + _rxParameters->setString(_nColumnIndex, *(OUString*)_rValue.getValue()); break; case TypeClass_BOOLEAN: @@ -1632,7 +1632,7 @@ sal_Bool implSetObject( const Reference< XParameters >& _rxParameters, break; case TypeClass_CHAR: - _rxParameters->setString(_nColumnIndex, ::rtl::OUString((sal_Unicode *)_rValue.getValue(),1)); + _rxParameters->setString(_nColumnIndex, OUString((sal_Unicode *)_rValue.getValue(),1)); break; case TypeClass_UNSIGNED_LONG: @@ -1756,14 +1756,14 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer, ::std::vector<bool, std::allocator<bool> > aNewParameterSet( _aParametersSet ); if ( nParamCount && ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount ) { - static const ::rtl::OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)); + static const OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)); aNewParameterSet.resize(nParamCount ,false); - typedef ::std::map< ::rtl::OUString, ::std::vector<sal_Int32> > TParameterPositions; + typedef ::std::map< OUString, ::std::vector<sal_Int32> > TParameterPositions; TParameterPositions aParameterNames; for(sal_Int32 i = 0; i < nParamCount; ++i) { Reference<XPropertySet> xParam(xParamsAsIndicies->getByIndex(i),UNO_QUERY); - ::rtl::OUString sName; + OUString sName; xParam->getPropertyValue(PROPERTY_NAME) >>= sName; TParameterPositions::iterator aFind = aParameterNames.find(sName); @@ -1805,7 +1805,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer, Reference< XPropertySet > xParamColumn(xWrappedParameters->getByIndex(i),UNO_QUERY); if (xParamColumn.is()) { - ::rtl::OUString sName; + OUString sName; xParamColumn->getPropertyValue(PROPERTY_NAME) >>= sName; OSL_ENSURE(sName.equals(pFinalValues->Name), "::dbaui::askForParameters: inconsistent parameter names!"); @@ -1867,7 +1867,7 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams, case DataType::CLOB: { Any x(_rValue.makeAny()); - ::rtl::OUString sValue; + OUString sValue; if ( x >>= sValue ) _xParams->setString(parameterIndex,sValue); else @@ -1961,9 +1961,9 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams, default: { ::connectivity::SharedResources aResources; - const ::rtl::OUString sError( aResources.getResourceStringWithSubstitution( + const OUString sError( aResources.getResourceStringWithSubstitution( STR_UNKNOWN_PARA_TYPE, - "$position$", ::rtl::OUString::valueOf(parameterIndex) + "$position$", OUString::valueOf(parameterIndex) ) ); ::dbtools::throwGenericSQLException(sError,NULL); } @@ -1972,8 +1972,8 @@ void setObjectWithInfo(const Reference<XParameters>& _xParams, } // -------------------------------------------------------------------- -void getBoleanComparisonPredicate( const ::rtl::OUString& _rExpression, const sal_Bool _bValue, const sal_Int32 _nBooleanComparisonMode, - ::rtl::OUStringBuffer& _out_rSQLPredicate ) +void getBoleanComparisonPredicate( const OUString& _rExpression, const sal_Bool _bValue, const sal_Int32 _nBooleanComparisonMode, + OUStringBuffer& _out_rSQLPredicate ) { switch ( _nBooleanComparisonMode ) { @@ -2073,26 +2073,26 @@ void checkDisposed(sal_Bool _bThrow) throw ( DisposedException ) // ------------------------------------------------------------------------- OSQLColumns::Vector::const_iterator find( OSQLColumns::Vector::const_iterator __first, OSQLColumns::Vector::const_iterator __last, - const ::rtl::OUString& _rVal, + const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase) { - ::rtl::OUString sName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); + OUString sName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); return find(__first,__last,sName,_rVal,_rCase); } // ------------------------------------------------------------------------- OSQLColumns::Vector::const_iterator findRealName( OSQLColumns::Vector::const_iterator __first, OSQLColumns::Vector::const_iterator __last, - const ::rtl::OUString& _rVal, + const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase) { - ::rtl::OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME); + OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME); return find(__first,__last,sRealName,_rVal,_rCase); } // ------------------------------------------------------------------------- OSQLColumns::Vector::const_iterator find( OSQLColumns::Vector::const_iterator __first, OSQLColumns::Vector::const_iterator __last, - const ::rtl::OUString& _rProp, - const ::rtl::OUString& _rVal, + const OUString& _rProp, + const OUString& _rVal, const ::comphelper::UStringMixEqual& _rCase) { while (__first != __last && !_rCase(getString((*__first)->getPropertyValue(_rProp)),_rVal)) diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index fdccc155312f..df243d3b169c 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -60,20 +60,20 @@ namespace dbtools using namespace connectivity; using namespace comphelper; -::rtl::OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const ::rtl::OUString& _sCreatePattern) +OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const OUString& _sCreatePattern) { Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUString sTypeName; + OUString sTypeName; sal_Int32 nDataType = 0; sal_Int32 nPrecision = 0; sal_Int32 nScale = 0; - const ::rtl::OUString sQuoteString = xMetaData->getIdentifierQuoteString(); - ::rtl::OUStringBuffer aSql = ::dbtools::quoteName(sQuoteString,::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))); + const OUString sQuoteString = xMetaData->getIdentifierQuoteString(); + OUStringBuffer aSql = ::dbtools::quoteName(sQuoteString,::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))); aSql.appendAscii(" "); @@ -86,13 +86,13 @@ namespace dbtools xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bIsAutoIncrement; // check if the user enter a specific string to create autoincrement values - ::rtl::OUString sAutoIncrementValue; + OUString sAutoIncrementValue; Reference<XPropertySetInfo> xPropInfo = xColProp->getPropertySetInfo(); if ( xPropInfo.is() && xPropInfo->hasPropertyByName(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION)) ) xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION)) >>= sAutoIncrementValue; // look if we have to use precisions sal_Bool bUseLiteral = sal_False; - ::rtl::OUString sPreFix,sPostFix,sCreateParams; + OUString sPreFix,sPostFix,sCreateParams; { Reference<XResultSet> xRes = xMetaData->getTypeInfo(); if(xRes.is()) @@ -100,7 +100,7 @@ namespace dbtools Reference<XRow> xRow(xRes,UNO_QUERY); while(xRes->next()) { - ::rtl::OUString sTypeName2Cmp = xRow->getString(1); + OUString sTypeName2Cmp = xRow->getString(1); sal_Int32 nType = xRow->getShort(2); sPreFix = xRow->getString (4); sPostFix = xRow->getString (5); @@ -121,7 +121,7 @@ namespace dbtools sal_Int32 nIndex = 0; if ( !sAutoIncrementValue.isEmpty() && (nIndex = sTypeName.indexOf(sAutoIncrementValue)) != -1 ) { - sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,::rtl::OUString()); + sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,OUString()); } if ( (nPrecision > 0 || nScale > 0) && bUseLiteral ) @@ -157,17 +157,17 @@ namespace dbtools else aSql.append(sTypeName); // simply add the type name - ::rtl::OUString aDefault = ::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_DEFAULTVALUE))); + OUString aDefault = ::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_DEFAULTVALUE))); if ( !aDefault.isEmpty() ) { - aSql.append(::rtl::OUString(" DEFAULT ")); + aSql.append(OUString(" DEFAULT ")); aSql.append(sPreFix); aSql.append(aDefault); aSql.append(sPostFix); } // if ( aDefault.getLength() ) if(::comphelper::getINT32(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISNULLABLE))) == ColumnValue::NO_NULLS) - aSql.append(::rtl::OUString(" NOT NULL")); + aSql.append(OUString(" NOT NULL")); if ( bIsAutoIncrement && !sAutoIncrementValue.isEmpty()) { @@ -182,10 +182,10 @@ namespace dbtools } // ----------------------------------------------------------------------------- -::rtl::OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const ::rtl::OUString& _sCreatePattern) +OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const OUString& _sCreatePattern) { - ::rtl::OUStringBuffer aSql(::rtl::OUString("CREATE TABLE ")); - ::rtl::OUString sCatalog,sSchema,sTable,sComposedName; + OUStringBuffer aSql(OUString("CREATE TABLE ")); + OUString sCatalog,sSchema,sTable,sComposedName; Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); @@ -199,7 +199,7 @@ namespace dbtools ::dbtools::throwFunctionSequenceException(_xConnection); aSql.append(sComposedName); - aSql.append(::rtl::OUString(" (")); + aSql.append(OUString(" (")); // columns Reference<XColumnsSupplier> xColumnSup(descriptor,UNO_QUERY); @@ -223,13 +223,13 @@ namespace dbtools } namespace { - ::rtl::OUString generateColumnNames(const Reference<XIndexAccess>& _xColumns,const Reference<XDatabaseMetaData>& _xMetaData) + OUString generateColumnNames(const Reference<XIndexAccess>& _xColumns,const Reference<XDatabaseMetaData>& _xMetaData) { ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - static const ::rtl::OUString sComma(::rtl::OUString(",")); + static const OUString sComma(OUString(",")); - const ::rtl::OUString sQuote(_xMetaData->getIdentifierQuoteString()); - ::rtl::OUString sSql( " (" ); + const OUString sQuote(_xMetaData->getIdentifierQuoteString()); + OUString sSql( " (" ); Reference< XPropertySet > xColProp; sal_Int32 nColCount = _xColumns->getCount(); @@ -241,17 +241,17 @@ namespace } if ( nColCount ) - sSql = sSql.replaceAt(sSql.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); + sSql = sSql.replaceAt(sSql.getLength()-1,1,OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); return sSql; } } // ----------------------------------------------------------------------------- -::rtl::OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection) +OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection) { Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - ::rtl::OUStringBuffer aSql; + OUStringBuffer aSql; // keys Reference<XKeysSupplier> xKeySup(descriptor,UNO_QUERY); Reference<XIndexAccess> xKeys = xKeySup->getKeys(); @@ -260,7 +260,7 @@ namespace Reference< XPropertySet > xColProp; Reference<XIndexAccess> xColumns; Reference<XColumnsSupplier> xColumnSup; - ::rtl::OUString sCatalog,sSchema,sTable,sComposedName; + OUString sCatalog,sSchema,sTable,sComposedName; sal_Bool bPKey = sal_False; for(sal_Int32 i=0;i<xKeys->getCount();++i) { @@ -280,7 +280,7 @@ namespace if(!xColumns.is() || !xColumns->getCount()) ::dbtools::throwFunctionSequenceException(_xConnection); - aSql.append(::rtl::OUString(" PRIMARY KEY ")); + aSql.append(OUString(" PRIMARY KEY ")); aSql.append(generateColumnNames(xColumns,xMetaData)); } else if(nKeyType == KeyType::UNIQUE) @@ -290,7 +290,7 @@ namespace if(!xColumns.is() || !xColumns->getCount()) ::dbtools::throwFunctionSequenceException(_xConnection); - aSql.append(::rtl::OUString(" UNIQUE ")); + aSql.append(OUString(" UNIQUE ")); aSql.append(generateColumnNames(xColumns,xMetaData)); } else if(nKeyType == KeyType::FOREIGN) @@ -302,8 +302,8 @@ namespace if(!xColumns.is() || !xColumns->getCount()) ::dbtools::throwFunctionSequenceException(_xConnection); - aSql.append(::rtl::OUString(" FOREIGN KEY ")); - ::rtl::OUString sRefTable = getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_REFERENCEDTABLE))); + aSql.append(OUString(" FOREIGN KEY ")); + OUString sRefTable = getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_REFERENCEDTABLE))); ::dbtools::qualifiedNameComponents(xMetaData, sRefTable, sCatalog, @@ -321,16 +321,16 @@ namespace switch(nDeleteRule) { case KeyRule::CASCADE: - aSql.append(::rtl::OUString(" ON DELETE CASCADE ")); + aSql.append(OUString(" ON DELETE CASCADE ")); break; case KeyRule::RESTRICT: - aSql.append(::rtl::OUString(" ON DELETE RESTRICT ")); + aSql.append(OUString(" ON DELETE RESTRICT ")); break; case KeyRule::SET_NULL: - aSql.append(::rtl::OUString(" ON DELETE SET NULL ")); + aSql.append(OUString(" ON DELETE SET NULL ")); break; case KeyRule::SET_DEFAULT: - aSql.append(::rtl::OUString(" ON DELETE SET DEFAULT ")); + aSql.append(OUString(" ON DELETE SET DEFAULT ")); break; default: ; @@ -352,21 +352,21 @@ namespace } // ----------------------------------------------------------------------------- -::rtl::OUString createSqlCreateTableStatement( const Reference< XPropertySet >& descriptor, +OUString createSqlCreateTableStatement( const Reference< XPropertySet >& descriptor, const Reference< XConnection>& _xConnection, ISQLStatementHelper* _pHelper, - const ::rtl::OUString& _sCreatePattern) + const OUString& _sCreatePattern) { - ::rtl::OUString aSql = ::dbtools::createStandardCreateStatement(descriptor,_xConnection,_pHelper,_sCreatePattern); - const ::rtl::OUString sKeyStmt = ::dbtools::createStandardKeyStatement(descriptor,_xConnection); + OUString aSql = ::dbtools::createStandardCreateStatement(descriptor,_xConnection,_pHelper,_sCreatePattern); + const OUString sKeyStmt = ::dbtools::createStandardKeyStatement(descriptor,_xConnection); if ( !sKeyStmt.isEmpty() ) aSql += sKeyStmt; else { if ( aSql.lastIndexOf(',') == (aSql.getLength()-1) ) - aSql = aSql.replaceAt(aSql.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); + aSql = aSql.replaceAt(aSql.getLength()-1,1,OUString(RTL_CONSTASCII_USTRINGPARAM(")"))); else - aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); + aSql += OUString(RTL_CONSTASCII_USTRINGPARAM(")")); } return aSql; } @@ -375,10 +375,10 @@ namespace Reference<XPropertySet> lcl_createSDBCXColumn(const Reference<XNameAccess>& _xPrimaryKeyColumns, const Reference<XConnection>& _xConnection, const Any& _aCatalog, - const ::rtl::OUString& _aSchema, - const ::rtl::OUString& _aTable, - const ::rtl::OUString& _rQueryName, - const ::rtl::OUString& _rName, + const OUString& _aSchema, + const OUString& _aTable, + const OUString& _rQueryName, + const OUString& _rName, sal_Bool _bCase, sal_Bool _bQueryForInfo, sal_Bool _bIsAutoIncrement, @@ -388,7 +388,7 @@ namespace Reference<XPropertySet> xProp; Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); Reference< XResultSet > xResult = xMetaData->getColumns(_aCatalog, _aSchema, _aTable, _rQueryName); - ::rtl::OUString sCatalog; + OUString sCatalog; _aCatalog >>= sCatalog; if ( xResult.is() ) @@ -400,11 +400,11 @@ namespace if ( aMixCompare(xRow->getString(4),_rName) ) { sal_Int32 nField5 = xRow->getInt(5); - ::rtl::OUString aField6 = xRow->getString(6); + OUString aField6 = xRow->getString(6); sal_Int32 nField7 = xRow->getInt(7) , nField9 = xRow->getInt(9) , nField11= xRow->getInt(11); - ::rtl::OUString sField12 = xRow->getString(12), + OUString sField12 = xRow->getString(12), sField13 = xRow->getString(13); ::comphelper::disposeComponent(xRow); @@ -412,9 +412,9 @@ namespace ,bIsCurrency = _bIsCurrency; if ( _bQueryForInfo ) { - const ::rtl::OUString sQuote = xMetaData->getIdentifierQuoteString(); - ::rtl::OUString sQuotedName = ::dbtools::quoteName(sQuote,_rName); - ::rtl::OUString sComposedName; + const OUString sQuote = xMetaData->getIdentifierQuoteString(); + OUString sQuotedName = ::dbtools::quoteName(sQuote,_rName); + OUString sComposedName; sComposedName = composeTableNameForSelect(_xConnection, getString( _aCatalog ), _aSchema, _aTable ); ColumnInformationMap aInfo(_bCase); @@ -447,7 +447,7 @@ namespace Reference< XRow > xPKeyRow( xPKeys, UNO_QUERY_THROW ); while( xPKeys->next() ) // there can be only one primary key { - ::rtl::OUString sKeyColumn = xPKeyRow->getString(4); + OUString sKeyColumn = xPKeyRow->getString(4); if ( aMixCompare(_rName,sKeyColumn) ) { nField11 = ColumnValue::NO_NULLS; @@ -503,7 +503,7 @@ namespace // ----------------------------------------------------------------------------- Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable, const Reference<XConnection>& _xConnection, - const ::rtl::OUString& _rName, + const OUString& _rName, sal_Bool _bCase, sal_Bool _bQueryForInfo, sal_Bool _bIsAutoIncrement, @@ -519,10 +519,10 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); Any aCatalog; aCatalog = _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)); - ::rtl::OUString sCatalog; + OUString sCatalog; aCatalog >>= sCatalog; - ::rtl::OUString aSchema, aTable; + OUString aSchema, aTable; _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; @@ -531,10 +531,10 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, _rName,_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); if ( !xProp.is() ) { - xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, ::rtl::OUString("%"),_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); + xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, OUString("%"),_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); if ( !xProp.is() ) xProp = new connectivity::sdbcx::OColumn(_rName, - ::rtl::OUString(),::rtl::OUString(),::rtl::OUString(), + OUString(),OUString(),OUString(), ColumnValue::NULLABLE_UNKNOWN, 0, 0, @@ -563,10 +563,10 @@ bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, if ( xDataSourceProperties.is() ) { Reference< XPropertySet > xSettings( - xDataSourceProperties->getPropertyValue( ::rtl::OUString( "Settings") ), + xDataSourceProperties->getPropertyValue( OUString( "Settings") ), UNO_QUERY_THROW ); - OSL_VERIFY( xSettings->getPropertyValue( ::rtl::OUString::createFromAscii( _pAsciiSettingName ) ) >>= bValue ); + OSL_VERIFY( xSettings->getPropertyValue( OUString::createFromAscii( _pAsciiSettingName ) ) >>= bValue ); } } catch( const Exception& ) @@ -576,7 +576,7 @@ bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, return bValue; } // ------------------------------------------------------------------------- -bool getDataSourceSetting( const Reference< XInterface >& _xChild, const ::rtl::OUString& _sAsciiSettingsName, +bool getDataSourceSetting( const Reference< XInterface >& _xChild, const OUString& _sAsciiSettingsName, Any& /* [out] */ _rSettingsValue ) { bool bIsPresent = false; @@ -587,7 +587,7 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const ::rtl:: return false; const Reference< XPropertySet > xSettings( - xDataSourceProperties->getPropertyValue( ::rtl::OUString( "Settings") ), + xDataSourceProperties->getPropertyValue( OUString( "Settings") ), UNO_QUERY_THROW ); @@ -604,11 +604,11 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const ::rtl:: bool getDataSourceSetting( const Reference< XInterface >& _rxDataSource, const sal_Char* _pAsciiSettingsName, Any& /* [out] */ _rSettingsValue ) { - ::rtl::OUString sAsciiSettingsName = ::rtl::OUString::createFromAscii(_pAsciiSettingsName); + OUString sAsciiSettingsName = OUString::createFromAscii(_pAsciiSettingsName); return getDataSourceSetting( _rxDataSource, sAsciiSettingsName,_rSettingsValue ); } // ----------------------------------------------------------------------------- -sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const ::rtl::OUString& _sProperty,sal_Bool _bDefault) +sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const OUString& _sProperty,sal_Bool _bDefault) { sal_Bool bEnabled = _bDefault; try @@ -617,7 +617,7 @@ sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const : if ( xProp.is() ) { Sequence< PropertyValue > aInfo; - xProp->getPropertyValue(::rtl::OUString("Info")) >>= aInfo; + xProp->getPropertyValue(OUString("Info")) >>= aInfo; const PropertyValue* pValue =::std::find_if(aInfo.getConstArray(), aInfo.getConstArray() + aInfo.getLength(), ::std::bind2nd(TPropertyValueEqualFunctor(),_sProperty)); @@ -633,7 +633,7 @@ sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const : } // ----------------------------------------------------------------------------- Reference< XTablesSupplier> getDataDefinitionByURLAndConnection( - const ::rtl::OUString& _rsUrl, + const OUString& _rsUrl, const Reference< XConnection>& _xConnection, const Reference< XComponentContext >& _rxContext) { @@ -658,9 +658,9 @@ Reference< XTablesSupplier> getDataDefinitionByURLAndConnection( // ----------------------------------------------------------------------------- sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, - const ::rtl::OUString& _sCatalog, - const ::rtl::OUString& _sSchema, - const ::rtl::OUString& _sTable) + const OUString& _sCatalog, + const OUString& _sSchema, + const OUString& _sTable) { OSL_ENSURE(_xMetaData.is(),"Invalid metadata!"); sal_Int32 nPrivileges = 0; @@ -672,25 +672,25 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, Reference< XResultSet > xPrivileges = _xMetaData->getTablePrivileges(aVal, _sSchema, _sTable); Reference< XRow > xCurrentRow(xPrivileges, UNO_QUERY); - const ::rtl::OUString sUserWorkingFor = _xMetaData->getUserName(); - 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" ); + const OUString sUserWorkingFor = _xMetaData->getUserName(); + 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" ); if ( xCurrentRow.is() ) { // after creation the set is positioned before the first record, per definition - ::rtl::OUString sPrivilege, sGrantee; + OUString sPrivilege, sGrantee; while ( xPrivileges->next() ) { #ifdef DBG_UTIL - ::rtl::OUString sCat, sSchema, sName, sGrantor, sGrantable; + OUString sCat, sSchema, sName, sGrantor, sGrantable; sCat = xCurrentRow->getString(1); sSchema = xCurrentRow->getString(2); sName = xCurrentRow->getString(3); @@ -730,16 +730,16 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, // Some drivers put a table privilege as soon as any column has the privilege, // some drivers only if all columns have the privilege. // To unifiy the situation, collect column privileges here, too. - Reference< XResultSet > xColumnPrivileges = _xMetaData->getColumnPrivileges(aVal, _sSchema, _sTable, ::rtl::OUString("%")); + Reference< XResultSet > xColumnPrivileges = _xMetaData->getColumnPrivileges(aVal, _sSchema, _sTable, OUString("%")); Reference< XRow > xColumnCurrentRow(xColumnPrivileges, UNO_QUERY); if ( xColumnCurrentRow.is() ) { // after creation the set is positioned before the first record, per definition - ::rtl::OUString sPrivilege, sGrantee; + OUString sPrivilege, sGrantee; while ( xColumnPrivileges->next() ) { #ifdef DBG_UTIL - ::rtl::OUString sCat, sSchema, sTableName, sColumnName, sGrantor, sGrantable; + OUString sCat, sSchema, sTableName, sColumnName, sGrantor, sGrantable; sCat = xColumnCurrentRow->getString(1); sSchema = xColumnCurrentRow->getString(2); sTableName = xColumnCurrentRow->getString(3); @@ -779,7 +779,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, } catch(const SQLException& e) { - static ::rtl::OUString sNotSupportedState( "IM001" ); + static OUString sNotSupportedState( "IM001" ); // some drivers don't support any privileges so we assume that we are allowed to do all we want :-) if(e.SQLState == sNotSupportedState) nPrivileges |= Privilege::DROP | @@ -799,18 +799,18 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData, // ----------------------------------------------------------------------------- // we need some more information about the column void collectColumnInformation(const Reference< XConnection>& _xConnection, - const ::rtl::OUString& _sComposedName, - const ::rtl::OUString& _rName, + const OUString& _sComposedName, + const OUString& _rName, ColumnInformationMap& _rInfo) { - static ::rtl::OUString STR_WHERE = ::rtl::OUString(" WHERE "); + static OUString STR_WHERE = OUString(" WHERE "); - ::rtl::OUString sSelect = ::rtl::OUString("SELECT "); + OUString sSelect = OUString("SELECT "); sSelect += _rName; - sSelect += ::rtl::OUString(" FROM "); + sSelect += OUString(" FROM "); sSelect += _sComposedName; sSelect += STR_WHERE; - sSelect += ::rtl::OUString("0 = 1"); + sSelect += OUString("0 = 1"); try { @@ -880,9 +880,9 @@ bool isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Referenc // ----------------------------------------------------------------------------- namespace { - ::rtl::OUString lcl_getEncodingName( rtl_TextEncoding _eEncoding ) + OUString lcl_getEncodingName( rtl_TextEncoding _eEncoding ) { - ::rtl::OUString sEncodingName; + OUString sEncodingName; OCharsetMap aCharsets; OCharsetMap::CharsetIterator aEncodingPos = aCharsets.find( _eEncoding ); @@ -895,7 +895,7 @@ namespace } // ----------------------------------------------------------------------------- -sal_Int32 DBTypeConversion::convertUnicodeString( const ::rtl::OUString& _rSource, ::rtl::OString& _rDest, rtl_TextEncoding _eEncoding ) SAL_THROW((com::sun::star::sdbc::SQLException)) +sal_Int32 DBTypeConversion::convertUnicodeString( const OUString& _rSource, OString& _rDest, rtl_TextEncoding _eEncoding ) SAL_THROW((com::sun::star::sdbc::SQLException)) { if ( !rtl_convertUStringToString( &_rDest.pData, _rSource.getStr(), _rSource.getLength(), _eEncoding, @@ -906,7 +906,7 @@ sal_Int32 DBTypeConversion::convertUnicodeString( const ::rtl::OUString& _rSourc ) { SharedResources aResources; - ::rtl::OUString sMessage = aResources.getResourceStringWithSubstitution( STR_CANNOT_CONVERT_STRING, + OUString sMessage = aResources.getResourceStringWithSubstitution( STR_CANNOT_CONVERT_STRING, "$string$", _rSource, "$charset$", lcl_getEncodingName( _eEncoding ) ); @@ -914,7 +914,7 @@ sal_Int32 DBTypeConversion::convertUnicodeString( const ::rtl::OUString& _rSourc throw SQLException( sMessage, NULL, - ::rtl::OUString( "22018" ), + OUString( "22018" ), 22018, Any() ); @@ -924,23 +924,23 @@ sal_Int32 DBTypeConversion::convertUnicodeString( const ::rtl::OUString& _rSourc } // ----------------------------------------------------------------------------- -sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const ::rtl::OUString& _rSource, ::rtl::OString& _rDest, +sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSource, OString& _rDest, sal_Int32 _nMaxLen, rtl_TextEncoding _eEncoding ) SAL_THROW((SQLException)) { sal_Int32 nLen = convertUnicodeString( _rSource, _rDest, _eEncoding ); if ( nLen > _nMaxLen ) { SharedResources aResources; - ::rtl::OUString sMessage = aResources.getResourceStringWithSubstitution( STR_STRING_LENGTH_EXCEEDED, + OUString sMessage = aResources.getResourceStringWithSubstitution( STR_STRING_LENGTH_EXCEEDED, "$string$", _rSource, - "$maxlen$", ::rtl::OUString::valueOf( _nMaxLen ), + "$maxlen$", OUString::valueOf( _nMaxLen ), "$charset$", lcl_getEncodingName( _eEncoding ) ); throw SQLException( sMessage, NULL, - ::rtl::OUString( "22001" ), + OUString( "22001" ), 22001, Any() ); @@ -948,32 +948,32 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const ::rtl::OUString& return nLen; } -::rtl::OUString lcl_getReportEngines() +OUString lcl_getReportEngines() { - static ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines"); + static OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines"); return s_sNodeName; } // ----------------------------------------------------------------------------- -::rtl::OUString lcl_getDefaultReportEngine() +OUString lcl_getDefaultReportEngine() { - static ::rtl::OUString s_sNodeName("DefaultReportEngine"); + static OUString s_sNodeName("DefaultReportEngine"); return s_sNodeName; } // ----------------------------------------------------------------------------- -::rtl::OUString lcl_getReportEngineNames() +OUString lcl_getReportEngineNames() { - static ::rtl::OUString s_sNodeName("ReportEngineNames"); + static OUString s_sNodeName("ReportEngineNames"); return s_sNodeName; } // ----------------------------------------------------------------------------- -::rtl::OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB) +OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB) { ::utl::OConfigurationTreeRoot aReportEngines = ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxORB, lcl_getReportEngines(), -1, ::utl::OConfigurationTreeRoot::CM_READONLY); if ( aReportEngines.isValid() ) { - ::rtl::OUString sDefaultReportEngineName; + OUString sDefaultReportEngineName; aReportEngines.getNodeValue(lcl_getDefaultReportEngine()) >>= sDefaultReportEngineName; if ( !sDefaultReportEngineName.isEmpty() ) { @@ -983,19 +983,19 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const ::rtl::OUString& ::utl::OConfigurationNode aReportEngine = aReportEngineNames.openNode(sDefaultReportEngineName); if ( aReportEngine.isValid() ) { - ::rtl::OUString sRet; - const static ::rtl::OUString s_sService("ServiceName"); + OUString sRet; + const static OUString s_sService("ServiceName"); aReportEngine.getNodeValue(s_sService) >>= sRet; return sRet; } } } else - return ::rtl::OUString("org.libreoffice.report.pentaho.SOReportJobFactory"); + return OUString("org.libreoffice.report.pentaho.SOReportJobFactory"); } else - return ::rtl::OUString("org.libreoffice.report.pentaho.SOReportJobFactory"); - return ::rtl::OUString(); + return OUString("org.libreoffice.report.pentaho.SOReportJobFactory"); + return OUString(); } // ----------------------------------------------------------------------------- //......................................................................... diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx index 1388c5b69c29..be526c38409e 100644 --- a/connectivity/source/commontools/filtermanager.cxx +++ b/connectivity/source/commontools/filtermanager.cxx @@ -66,13 +66,13 @@ namespace dbtools } //-------------------------------------------------------------------- - const ::rtl::OUString& FilterManager::getFilterComponent( FilterComponent _eWhich ) const + const OUString& FilterManager::getFilterComponent( FilterComponent _eWhich ) const { return m_aFilterComponents[ _eWhich ]; } //-------------------------------------------------------------------- - void FilterManager::setFilterComponent( FilterComponent _eWhich, const ::rtl::OUString& _rComponent ) + void FilterManager::setFilterComponent( FilterComponent _eWhich, const OUString& _rComponent ) { m_aFilterComponents[ _eWhich ] = _rComponent; try @@ -108,7 +108,7 @@ namespace dbtools } //-------------------------------------------------------------------- - void FilterManager::appendFilterComponent( ::rtl::OUStringBuffer& io_appendTo, const ::rtl::OUString& i_component ) const + void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component ) const { if ( io_appendTo.getLength() > 0 ) { @@ -123,7 +123,7 @@ namespace dbtools } //-------------------------------------------------------------------- - bool FilterManager::isThereAtMostOneComponent( ::rtl::OUStringBuffer& o_singleComponent ) const + bool FilterManager::isThereAtMostOneComponent( OUStringBuffer& o_singleComponent ) const { sal_Int32 nOnlyNonEmpty = -1; sal_Int32 i; @@ -154,9 +154,9 @@ namespace dbtools } //-------------------------------------------------------------------- - ::rtl::OUString FilterManager::getComposedFilter( ) const + OUString FilterManager::getComposedFilter( ) const { - ::rtl::OUStringBuffer aComposedFilter; + OUStringBuffer aComposedFilter; // if we have only one non-empty component, then there's no need to compose anything if ( !isThereAtMostOneComponent( aComposedFilter ) ) diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index f079083150bd..daff9098e88a 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -129,7 +129,7 @@ namespace dbtools _rData.m_xColumnUpdate.set( _rxColumn, UNO_QUERY ); // determine the field type, and whether it's a numeric field - OSL_VERIFY( _rxColumn->getPropertyValue( ::rtl::OUString( "Type" ) ) >>= _rData.m_nFieldType ); + OSL_VERIFY( _rxColumn->getPropertyValue( OUString( "Type" ) ) >>= _rData.m_nFieldType ); switch ( _rData.m_nFieldType ) { @@ -156,7 +156,7 @@ namespace dbtools // get the format key of our bound field Reference< XPropertySetInfo > xPSI( _rxColumn->getPropertySetInfo(), UNO_QUERY_THROW ); bool bHaveFieldFormat = false; - const ::rtl::OUString sFormatKeyProperty( ::rtl::OUString( "FormatKey" ) ); + const OUString sFormatKeyProperty( OUString( "FormatKey" ) ); if ( xPSI->hasPropertyByName( sFormatKeyProperty ) ) { bHaveFieldFormat = ( _rxColumn->getPropertyValue( sFormatKeyProperty ) >>= _rData.m_nFormatKey ); @@ -172,7 +172,7 @@ namespace dbtools // some more formatter settings _rData.m_nKeyType = ::comphelper::getNumberFormatType( xNumberFormatsSupp->getNumberFormats(), _rData.m_nFormatKey ); Reference< XPropertySet > xFormatSettings( xNumberFormatsSupp->getNumberFormatSettings(), UNO_QUERY_THROW ); - OSL_VERIFY( xFormatSettings->getPropertyValue( ::rtl::OUString( "NullDate" ) ) >>= _rData.m_aNullDate ); + OSL_VERIFY( xFormatSettings->getPropertyValue( OUString( "NullDate" ) ) >>= _rData.m_aNullDate ); // remember the formatter _rData.m_xFormatter = i_rNumberFormatter; @@ -273,7 +273,7 @@ namespace dbtools } //-------------------------------------------------------------------- - bool FormattedColumnValue::setFormattedValue( const ::rtl::OUString& _rFormattedStringValue ) const + bool FormattedColumnValue::setFormattedValue( const OUString& _rFormattedStringValue ) const { OSL_PRECOND( m_pData->m_xColumnUpdate.is(), "FormattedColumnValue::setFormattedValue: no column!" ); if ( !m_pData->m_xColumnUpdate.is() ) @@ -300,11 +300,11 @@ namespace dbtools } //-------------------------------------------------------------------- - ::rtl::OUString FormattedColumnValue::getFormattedValue() const + OUString FormattedColumnValue::getFormattedValue() const { OSL_PRECOND( m_pData->m_xColumn.is(), "FormattedColumnValue::setFormattedValue: no column!" ); - ::rtl::OUString sStringValue; + OUString sStringValue; if ( m_pData->m_xColumn.is() ) { if ( m_pData->m_bNumericField ) diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index 5f2a7079f193..32ac6e89ee54 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -112,7 +112,7 @@ namespace dbtools m_aParameterInformation.swap( aEmptyInfo ); m_aMasterFields.realloc( 0 ); m_aDetailFields.realloc( 0 ); - m_sIdentifierQuoteString = ::rtl::OUString(); + m_sIdentifierQuoteString = OUString(); ::std::vector< bool > aEmptyArray; m_aParametersVisited.swap( aEmptyArray ); m_bUpToDate = false; @@ -194,7 +194,7 @@ namespace dbtools xParam.clear(); m_xInnerParamColumns->getByIndex( i ) >>= xParam; - ::rtl::OUString sName; + OUString sName; xParam->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME) ) >>= sName; // only append additonal parameters when they are not already in the list @@ -220,22 +220,22 @@ namespace dbtools } //-------------------------------------------------------------------- - ::rtl::OUString ParameterManager::createFilterConditionFromColumnLink( - const ::rtl::OUString& _rMasterColumn, const ::rtl::OUString& _rDetailLink, ::rtl::OUString& _rNewParamName ) + OUString ParameterManager::createFilterConditionFromColumnLink( + const OUString& _rMasterColumn, const OUString& _rDetailLink, OUString& _rNewParamName ) { - ::rtl::OUString sFilter; + OUString sFilter; // format is: // <detail_column> = :<new_param_name> sFilter = quoteName( m_sIdentifierQuoteString, _rDetailLink ); - sFilter += ::rtl::OUString( " = :" ); + sFilter += OUString( " = :" ); // generate a parameter name which is not already used - _rNewParamName = ::rtl::OUString( "link_from_" ); + _rNewParamName = OUString( "link_from_" ); _rNewParamName += convertName2SQLName( _rMasterColumn, m_sSpecialCharacters ); while ( m_aParameterInformation.find( _rNewParamName ) != m_aParameterInformation.end() ) { - _rNewParamName += ::rtl::OUString( "_" ); + _rNewParamName += OUString( "_" ); } return sFilter += _rNewParamName; @@ -243,7 +243,7 @@ namespace dbtools //-------------------------------------------------------------------- void ParameterManager::classifyLinks( const Reference< XNameAccess >& _rxParentColumns, - const Reference< XNameAccess >& _rxColumns, ::std::vector< ::rtl::OUString >& _out_rAdditionalFilterComponents ) SAL_THROW(( Exception )) + const Reference< XNameAccess >& _rxColumns, ::std::vector< OUString >& _out_rAdditionalFilterComponents ) SAL_THROW(( Exception )) { OSL_PRECOND( m_aMasterFields.getLength() == m_aDetailFields.getLength(), "ParameterManager::classifyLinks: master and detail fields should have the same length!" ); @@ -254,15 +254,15 @@ namespace dbtools // we may need to strip any links which are invalid, so here go the containers // for temporarirly holding the new pairs - ::std::vector< ::rtl::OUString > aStrippedMasterFields; - ::std::vector< ::rtl::OUString > aStrippedDetailFields; + ::std::vector< OUString > aStrippedMasterFields; + ::std::vector< OUString > aStrippedDetailFields; bool bNeedExchangeLinks = false; // classify the links - const ::rtl::OUString* pMasterFields = m_aMasterFields.getConstArray(); - const ::rtl::OUString* pDetailFields = m_aDetailFields.getConstArray(); - const ::rtl::OUString* pDetailFieldsEnd = pDetailFields + m_aDetailFields.getLength(); + const OUString* pMasterFields = m_aMasterFields.getConstArray(); + const OUString* pDetailFields = m_aDetailFields.getConstArray(); + const OUString* pDetailFieldsEnd = pDetailFields + m_aDetailFields.getLength(); for ( ; pDetailFields < pDetailFieldsEnd; ++pDetailFields, ++pMasterFields ) { if ( pMasterFields->isEmpty() || pDetailFields->isEmpty() ) @@ -292,8 +292,8 @@ namespace dbtools // does the detail name denote a column? if ( _rxColumns->hasByName( *pDetailFields ) ) { - ::rtl::OUString sNewParamName; - const ::rtl::OUString sFilterCondition = createFilterConditionFromColumnLink( *pMasterFields, *pDetailFields, sNewParamName ); + OUString sNewParamName; + const OUString sFilterCondition = createFilterConditionFromColumnLink( *pMasterFields, *pDetailFields, sNewParamName ); OSL_PRECOND( !sNewParamName.isEmpty(), "ParameterManager::classifyLinks: createFilterConditionFromColumnLink returned nonsense!" ); // remember meta information about this new parameter @@ -327,10 +327,10 @@ namespace dbtools if ( bNeedExchangeLinks ) { - ::rtl::OUString *pFields = aStrippedMasterFields.empty() ? 0 : &aStrippedMasterFields[0]; - m_aMasterFields = Sequence< ::rtl::OUString >( pFields, aStrippedMasterFields.size() ); + OUString *pFields = aStrippedMasterFields.empty() ? 0 : &aStrippedMasterFields[0]; + m_aMasterFields = Sequence< OUString >( pFields, aStrippedMasterFields.size() ); pFields = aStrippedDetailFields.empty() ? 0 : &aStrippedDetailFields[0]; - m_aDetailFields = Sequence< ::rtl::OUString >( pFields, aStrippedDetailFields.size() ); + m_aDetailFields = Sequence< OUString >( pFields, aStrippedDetailFields.size() ); } } @@ -374,16 +374,16 @@ namespace dbtools return; // classify the links - depending on what the detail fields in each link pair denotes - ::std::vector< ::rtl::OUString > aAdditionalFilterComponents; + ::std::vector< OUString > aAdditionalFilterComponents; classifyLinks( xParentColumns, xColumns, aAdditionalFilterComponents ); // did we find links where the detail field refers to a detail column (instead of a parameter name)? if ( !aAdditionalFilterComponents.empty() ) { - const static ::rtl::OUString s_sAnd( " AND " ); + const static OUString s_sAnd( " AND " ); // build a conjunction of all the filter components - ::rtl::OUStringBuffer sAdditionalFilter; - for ( ::std::vector< ::rtl::OUString >::const_iterator aComponent = aAdditionalFilterComponents.begin(); + OUStringBuffer sAdditionalFilter; + for ( ::std::vector< OUString >::const_iterator aComponent = aAdditionalFilterComponents.begin(); aComponent != aAdditionalFilterComponents.end(); ++aComponent ) @@ -547,8 +547,8 @@ namespace dbtools try { // the master and detail field( name)s of the - const ::rtl::OUString* pMasterFields = m_aMasterFields.getConstArray(); - const ::rtl::OUString* pDetailFields = m_aDetailFields.getConstArray(); + const OUString* pMasterFields = m_aMasterFields.getConstArray(); + const OUString* pDetailFields = m_aDetailFields.getConstArray(); sal_Int32 nMasterLen = m_aMasterFields.getLength(); Any aParamType, aScale, aValue; @@ -667,7 +667,7 @@ namespace dbtools if ( xParamColumn.is() ) { #ifdef DBG_UTIL - ::rtl::OUString sName; + OUString sName; xParamColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME) ) >>= sName; OSL_ENSURE( sName == pFinalValues->Name, "ParameterManager::completeParameters: inconsistent parameter names!" ); #endif @@ -870,14 +870,14 @@ namespace dbtools return; // loop through all links pairs - const ::rtl::OUString* pMasterFields = m_aMasterFields.getConstArray(); - const ::rtl::OUString* pDetailFields = m_aDetailFields.getConstArray(); + const OUString* pMasterFields = m_aMasterFields.getConstArray(); + const OUString* pDetailFields = m_aDetailFields.getConstArray(); Reference< XPropertySet > xMasterField; Reference< XPropertySet > xDetailField; // now really .... - const ::rtl::OUString* pDetailFieldsEnd = pDetailFields + m_aDetailFields.getLength(); + const OUString* pDetailFieldsEnd = pDetailFields + m_aDetailFields.getLength(); for ( ; pDetailFields < pDetailFieldsEnd; ++pDetailFields, ++pMasterFields ) { if ( !xParentColumns->hasByName( *pMasterFields ) ) @@ -914,7 +914,7 @@ namespace dbtools if ( !xInnerParameter.is() ) continue; - ::rtl::OUString sParamColumnRealName; + OUString sParamColumnRealName; xInnerParameter->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME) ) >>= sParamColumnRealName; if ( xColumns->hasByName( sParamColumnRealName ) ) { // our own columns have a column which's name equals the real name of the param column @@ -960,7 +960,7 @@ namespace dbtools } //-------------------------------------------------------------------- - void ParameterManager::setObjectNull( sal_Int32 _nIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) + void ParameterManager::setObjectNull( sal_Int32 _nIndex, sal_Int32 sqlType, const OUString& typeName ) { VISIT_PARAMETER( setObjectNull( _nIndex, sqlType, typeName ) ); } @@ -1008,7 +1008,7 @@ namespace dbtools } //-------------------------------------------------------------------- - void ParameterManager::setString( sal_Int32 _nIndex, const ::rtl::OUString& x ) + void ParameterManager::setString( sal_Int32 _nIndex, const OUString& x ) { VISIT_PARAMETER( setString( _nIndex, x ) ); } diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx index 25215c93b0c7..bcf49827364c 100644 --- a/connectivity/source/commontools/paramwrapper.cxx +++ b/connectivity/source/commontools/paramwrapper.cxx @@ -115,7 +115,7 @@ namespace param IMPLEMENT_GET_IMPLEMENTATION_ID( ParameterWrapper ) //-------------------------------------------------------------------- - ::rtl::OUString ParameterWrapper::impl_getPseudoAggregatePropertyName( sal_Int32 _nHandle ) const + OUString ParameterWrapper::impl_getPseudoAggregatePropertyName( sal_Int32 _nHandle ) const { Reference< XPropertySetInfo > xInfo = const_cast<ParameterWrapper*>( this )->getPropertySetInfo(); Sequence< Property > aProperties = xInfo->getProperties(); @@ -127,7 +127,7 @@ namespace param } OSL_FAIL( "ParameterWrapper::impl_getPseudoAggregatePropertyName: invalid argument!" ); - return ::rtl::OUString(); + return OUString(); } //-------------------------------------------------------------------- @@ -148,7 +148,7 @@ namespace param sal_Int32 nProperties( aProperties.getLength() ); aProperties.realloc( nProperties + 1 ); aProperties[ nProperties ] = Property( - ::rtl::OUString( "Value" ), + OUString( "Value" ), PROPERTY_ID_VALUE, ::cppu::UnoType< Any >::get(), PropertyAttribute::TRANSIENT | PropertyAttribute::MAYBEVOID @@ -185,11 +185,11 @@ namespace param { // TODO : aParamType & nScale can be obtained within the constructor .... sal_Int32 nParamType = DataType::VARCHAR; - OSL_VERIFY( m_xDelegator->getPropertyValue( ::rtl::OUString( "Type" ) ) >>= nParamType ); + OSL_VERIFY( m_xDelegator->getPropertyValue( OUString( "Type" ) ) >>= nParamType ); sal_Int32 nScale = 0; - if ( m_xDelegatorPSI->hasPropertyByName( ::rtl::OUString( "Scale" ) ) ) - OSL_VERIFY( m_xDelegator->getPropertyValue( ::rtl::OUString( "Scale" ) ) >>= nScale ); + if ( m_xDelegatorPSI->hasPropertyByName( OUString( "Scale" ) ) ) + OSL_VERIFY( m_xDelegator->getPropertyValue( OUString( "Scale" ) ) >>= nScale ); if ( m_xValueDestination.is() ) { @@ -213,7 +213,7 @@ namespace param } else { - ::rtl::OUString aName = impl_getPseudoAggregatePropertyName( nHandle ); + OUString aName = impl_getPseudoAggregatePropertyName( nHandle ); m_xDelegator->setPropertyValue( aName, rValue ); } } @@ -227,7 +227,7 @@ namespace param } else { - ::rtl::OUString aName = impl_getPseudoAggregatePropertyName( nHandle ); + OUString aName = impl_getPseudoAggregatePropertyName( nHandle ); rValue = m_xDelegator->getPropertyValue( aName ); } } @@ -323,7 +323,7 @@ namespace param void ParameterWrapperContainer::impl_checkDisposed_throw() { if ( rBHelper.bDisposed ) - throw DisposedException( ::rtl::OUString(), *this ); + throw DisposedException( OUString(), *this ); } //-------------------------------------------------------------------- diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index ba5ed7692625..a7f8f04f2b57 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -61,7 +61,7 @@ namespace dbtools //===================================================================== //--------------------------------------------------------------------- - static sal_Unicode lcl_getSeparatorChar( const ::rtl::OUString& _rSeparator, sal_Unicode _nFallback ) + static sal_Unicode lcl_getSeparatorChar( const OUString& _rSeparator, sal_Unicode _nFallback ) { OSL_ENSURE( !_rSeparator.isEmpty(), "::lcl_getSeparatorChar: invalid separator string!" ); @@ -134,13 +134,13 @@ namespace dbtools } //--------------------------------------------------------------------- - OSQLParseNode* OPredicateInputController::implPredicateTree(::rtl::OUString& _rErrorMessage, const ::rtl::OUString& _rStatement, const Reference< XPropertySet > & _rxField) const + OSQLParseNode* OPredicateInputController::implPredicateTree(OUString& _rErrorMessage, const OUString& _rStatement, const Reference< XPropertySet > & _rxField) const { OSQLParseNode* pReturn = const_cast< OSQLParser& >( m_aParser ).predicateTree( _rErrorMessage, _rStatement, m_xFormatter, _rxField ); if ( !pReturn ) { // is it a text field ? sal_Int32 nType = DataType::OTHER; - _rxField->getPropertyValue( ::rtl::OUString( "Type" ) ) >>= nType; + _rxField->getPropertyValue( OUString( "Type" ) ) >>= nType; if ( ( DataType::CHAR == nType ) || ( DataType::VARCHAR == nType ) @@ -148,15 +148,15 @@ namespace dbtools || ( DataType::CLOB == nType ) ) { // yes -> force a quoted text and try again - ::rtl::OUString sQuoted( _rStatement ); + OUString sQuoted( _rStatement ); if ( !sQuoted.isEmpty() && ( (sQuoted.getStr()[0] != '\'') || (sQuoted.getStr()[ sQuoted.getLength() - 1 ] != '\'' ) ) ) { - static const ::rtl::OUString sSingleQuote( "'" ); - static const ::rtl::OUString sDoubleQuote( "''" ); + static const OUString sSingleQuote( "'" ); + static const OUString sDoubleQuote( "''" ); sal_Int32 nIndex = -1; sal_Int32 nTemp = 0; @@ -166,7 +166,7 @@ namespace dbtools nTemp = nIndex+2; } - ::rtl::OUString sTemp( sSingleQuote ); + OUString sTemp( sSingleQuote ); ( sTemp += sQuoted ) += sSingleQuote; sQuoted = sTemp; } @@ -199,17 +199,17 @@ namespace dbtools try { Reference< XPropertySetInfo > xPSI( _rxField->getPropertySetInfo() ); - if ( xPSI.is() && xPSI->hasPropertyByName( ::rtl::OUString( "FormatKey" ) ) ) + if ( xPSI.is() && xPSI->hasPropertyByName( OUString( "FormatKey" ) ) ) { sal_Int32 nFormatKey = 0; - _rxField->getPropertyValue( ::rtl::OUString( "FormatKey" ) ) >>= nFormatKey; + _rxField->getPropertyValue( OUString( "FormatKey" ) ) >>= nFormatKey; if ( nFormatKey && m_xFormatter.is() ) { Locale aFormatLocale; ::comphelper::getNumberFormatProperty( m_xFormatter, nFormatKey, - ::rtl::OUString( "Locale" ) + OUString( "Locale" ) ) >>= aFormatLocale; // valid locale @@ -230,7 +230,7 @@ namespace dbtools if ( bDecDiffers || bFmtDiffers ) { // okay, at least one differs // "translate" the value into the "format locale" - ::rtl::OUString sTranslated( _rStatement ); + OUString sTranslated( _rStatement ); const sal_Unicode nIntermediate( '_' ); sTranslated = sTranslated.replace( nCtxDecSep, nIntermediate ); sTranslated = sTranslated.replace( nCtxThdSep, nFmtThdSep ); @@ -245,7 +245,7 @@ namespace dbtools //--------------------------------------------------------------------- sal_Bool OPredicateInputController::normalizePredicateString( - ::rtl::OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, ::rtl::OUString* _pErrorMessage ) const + OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, OUString* _pErrorMessage ) const { OSL_ENSURE( m_xConnection.is() && m_xFormatter.is() && _rxField.is(), "OPredicateInputController::normalizePredicateString: invalid state or params!" ); @@ -254,8 +254,8 @@ namespace dbtools if ( m_xConnection.is() && m_xFormatter.is() && _rxField.is() ) { // parse the string - ::rtl::OUString sError; - ::rtl::OUString sTransformedText( _rPredicateValue ); + OUString sError; + OUString sTransformedText( _rPredicateValue ); OSQLParseNode* pParseNode = implPredicateTree( sError, sTransformedText, _rxField ); if ( _pErrorMessage ) *_pErrorMessage = sError; @@ -266,7 +266,7 @@ namespace dbtools getSeparatorChars( rParseContext.getPreferredLocale(), nDecSeparator, nThousandSeparator ); // translate it back into a string - sTransformedText = ::rtl::OUString(); + sTransformedText = OUString(); pParseNode->parseNodeToPredicateStr( sTransformedText, m_xConnection, m_xFormatter, _rxField, rParseContext.getPreferredLocale(), (sal_Char)nDecSeparator, &rParseContext @@ -282,15 +282,15 @@ namespace dbtools } //--------------------------------------------------------------------- - ::rtl::OUString OPredicateInputController::getPredicateValue( - const ::rtl::OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, - sal_Bool _bForStatementUse, ::rtl::OUString* _pErrorMessage ) const + OUString OPredicateInputController::getPredicateValue( + const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, + sal_Bool _bForStatementUse, OUString* _pErrorMessage ) const { OSL_ENSURE( _rxField.is(), "OPredicateInputController::getPredicateValue: invalid params!" ); - ::rtl::OUString sReturn; + OUString sReturn; if ( _rxField.is() ) { - ::rtl::OUString sValue( _rPredicateValue ); + OUString sValue( _rPredicateValue ); // a little problem : if the field is a text field, the normalizePredicateString added two // '-characters to the text. If we would give this to predicateTree this would add @@ -305,8 +305,8 @@ namespace dbtools if ( bValidQuotedText ) { sValue = sValue.copy( 1, sValue.getLength() - 2 ); - static const ::rtl::OUString sSingleQuote( "'" ); - static const ::rtl::OUString sDoubleQuote( "''" ); + static const OUString sSingleQuote( "'" ); + static const OUString sDoubleQuote( "''" ); sal_Int32 nIndex = -1; sal_Int32 nTemp = 0; @@ -320,7 +320,7 @@ namespace dbtools // The following is mostly stolen from the former implementation in the parameter dialog // (dbaccess/source/ui/dlg/paramdialog.cxx). I do not fully understand this ..... - ::rtl::OUString sError; + OUString sError; OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField ); if ( _pErrorMessage ) *_pErrorMessage = sError; @@ -331,12 +331,12 @@ namespace dbtools return sReturn; } - ::rtl::OUString OPredicateInputController::getPredicateValue( - const ::rtl::OUString& _sField, const ::rtl::OUString& _rPredicateValue, sal_Bool _bForStatementUse, ::rtl::OUString* _pErrorMessage ) const + OUString OPredicateInputController::getPredicateValue( + const OUString& _sField, const OUString& _rPredicateValue, sal_Bool _bForStatementUse, OUString* _pErrorMessage ) const { - ::rtl::OUString sReturn = _rPredicateValue; - ::rtl::OUString sError; - ::rtl::OUString sField = _sField; + OUString sReturn = _rPredicateValue; + OUString sError; + OUString sField = _sField; sal_Int32 nIndex = 0; sField = sField.getToken(0,'(',nIndex); if(nIndex == -1) @@ -345,9 +345,9 @@ namespace dbtools if ( nType == DataType::OTHER || sField.isEmpty() ) { // first try the international version - ::rtl::OUString sSql; - sSql += ::rtl::OUString("SELECT * "); - sSql += ::rtl::OUString(" FROM x WHERE "); + OUString sSql; + sSql += OUString("SELECT * "); + sSql += OUString(" FROM x WHERE "); sSql += sField; sSql += _rPredicateValue; ::std::auto_ptr<OSQLParseNode> pParseNode( const_cast< OSQLParser& >( m_aParser ).parseTree( sError, sSql, sal_True ) ); @@ -363,9 +363,9 @@ namespace dbtools Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); parse::OParseColumn* pColumn = new parse::OParseColumn( sField, - ::rtl::OUString(), - ::rtl::OUString(), - ::rtl::OUString(), + OUString(), + OUString(), + OUString(), ColumnValue::NULLABLE_UNKNOWN, 0, 0, @@ -373,9 +373,9 @@ namespace dbtools sal_False, sal_False, xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(), - ::rtl::OUString(), - ::rtl::OUString(), - ::rtl::OUString()); + OUString(), + OUString(), + OUString()); Reference<XPropertySet> xColumn = pColumn; pColumn->setFunction(sal_True); pColumn->setRealName(sField); @@ -386,9 +386,9 @@ namespace dbtools return pParseNode ? implParseNode(pParseNode,_bForStatementUse) : sReturn; } - ::rtl::OUString OPredicateInputController::implParseNode(OSQLParseNode* pParseNode,sal_Bool _bForStatementUse) const + OUString OPredicateInputController::implParseNode(OSQLParseNode* pParseNode,sal_Bool _bForStatementUse) const { - ::rtl::OUString sReturn; + OUString sReturn; if ( pParseNode ) { boost::shared_ptr<OSQLParseNode> xTakeOwnership(pParseNode); diff --git a/connectivity/source/commontools/propertyids.cxx b/connectivity/source/commontools/propertyids.cxx index 9534664d650f..30df7cb335ae 100644 --- a/connectivity/source/commontools/propertyids.cxx +++ b/connectivity/source/commontools/propertyids.cxx @@ -101,9 +101,9 @@ namespace dbtools rtl_uString_release(aIter->second); } // ------------------------------------------------------------------------------ - ::rtl::OUString OPropertyMap::getNameByIndex(sal_Int32 _nIndex) const + OUString OPropertyMap::getNameByIndex(sal_Int32 _nIndex) const { - ::rtl::OUString sRet; + OUString sRet; ::std::map<sal_Int32 , rtl_uString*>::const_iterator aIter = m_aPropertyMap.find(_nIndex); if(aIter == m_aPropertyMap.end()) sRet = const_cast<OPropertyMap*>(this)->fillValue(_nIndex); @@ -112,7 +112,7 @@ namespace dbtools return sRet; } // ------------------------------------------------------------------------------ - ::rtl::OUString OPropertyMap::fillValue(sal_Int32 _nIndex) + OUString OPropertyMap::fillValue(sal_Int32 _nIndex) { rtl_uString* pStr = NULL; switch(_nIndex) diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index 435472aed1a6..bcf4a2cf18cc 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -61,9 +61,9 @@ namespace connectivity ~SQLError_Impl(); // versions of the public SQLError methods which are just delegated to this impl-class - static const ::rtl::OUString& getMessagePrefix(); - ::rtl::OUString getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); - ::rtl::OUString getSQLState( const ErrorCondition _eCondition ); + static const OUString& getMessagePrefix(); + OUString getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); + OUString getSQLState( const ErrorCondition _eCondition ); static ErrorCode getErrorCode( const ErrorCondition _eCondition ); void raiseException( const ErrorCondition _eCondition, const Reference< XInterface >& _rxContext, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); void raiseException( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ); @@ -72,11 +72,11 @@ namespace connectivity private: /// returns the basic error message associated with the given error condition, without any parameter replacements - ::rtl::OUString + OUString impl_getErrorMessage( const ErrorCondition& _eCondition ); /// returns the SQLState associated with the given error condition - ::rtl::OUString + OUString impl_getSQLState( const ErrorCondition& _eCondition ); /// returns an SQLException describing the given error condition @@ -111,9 +111,9 @@ namespace connectivity } //-------------------------------------------------------------------- - const ::rtl::OUString& SQLError_Impl::getMessagePrefix() + const OUString& SQLError_Impl::getMessagePrefix() { - static ::rtl::OUString s_sMessagePrefix( "[OOoBase]" ); + static OUString s_sMessagePrefix( "[OOoBase]" ); return s_sMessagePrefix; } @@ -123,7 +123,7 @@ namespace connectivity //................................................................ /** substitutes a given placeholder in the given message with the given value */ - void lcl_substitutePlaceholder( ::rtl::OUString& _rMessage, const sal_Char* _pPlaceholder, ParamValue _rParamValue ) + void lcl_substitutePlaceholder( OUString& _rMessage, const sal_Char* _pPlaceholder, ParamValue _rParamValue ) { size_t nPlaceholderLen( strlen( _pPlaceholder ) ); sal_Int32 nIndex = _rMessage.indexOfAsciiL( _pPlaceholder, nPlaceholderLen ); @@ -146,9 +146,9 @@ namespace connectivity } //-------------------------------------------------------------------- - ::rtl::OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) + OUString SQLError_Impl::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) { - ::rtl::OUString sErrorMessage( impl_getErrorMessage( _eCondition ) ); + OUString sErrorMessage( impl_getErrorMessage( _eCondition ) ); lcl_substitutePlaceholder( sErrorMessage, "$1$", _rParamValue1 ); lcl_substitutePlaceholder( sErrorMessage, "$2$", _rParamValue2 ); @@ -158,7 +158,7 @@ namespace connectivity } //-------------------------------------------------------------------- - ::rtl::OUString SQLError_Impl::getSQLState( const ErrorCondition _eCondition ) + OUString SQLError_Impl::getSQLState( const ErrorCondition _eCondition ) { return impl_getSQLState( _eCondition ); } @@ -234,13 +234,13 @@ namespace connectivity } //-------------------------------------------------------------------- - ::rtl::OUString SQLError_Impl::impl_getErrorMessage( const ErrorCondition& _eCondition ) + OUString SQLError_Impl::impl_getErrorMessage( const ErrorCondition& _eCondition ) { - ::rtl::OUStringBuffer aMessage; + OUStringBuffer aMessage; if ( impl_initResources() ) { - ::rtl::OUString sResMessage( m_pResources->loadString( lcl_getResourceID( _eCondition, false ) ) ); + OUString sResMessage( m_pResources->loadString( lcl_getResourceID( _eCondition, false ) ) ); OSL_ENSURE( !sResMessage.isEmpty(), "SQLError_Impl::impl_getErrorMessage: illegal error condition, or invalid resource!" ); aMessage.append( getMessagePrefix() ).appendAscii( " " ).append( sResMessage ); } @@ -249,9 +249,9 @@ namespace connectivity } //-------------------------------------------------------------------- - ::rtl::OUString SQLError_Impl::impl_getSQLState( const ErrorCondition& _eCondition ) + OUString SQLError_Impl::impl_getSQLState( const ErrorCondition& _eCondition ) { - ::rtl::OUString sState; + OUString sState; if ( impl_initResources() ) { @@ -261,7 +261,7 @@ namespace connectivity } if ( sState.isEmpty() ) - sState = ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) ); + sState = OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) ); return sState; } @@ -296,13 +296,13 @@ namespace connectivity } //-------------------------------------------------------------------- - const ::rtl::OUString& SQLError::getMessagePrefix() + const OUString& SQLError::getMessagePrefix() { return SQLError_Impl::getMessagePrefix(); } //-------------------------------------------------------------------- - ::rtl::OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const + OUString SQLError::getErrorMessage( const ErrorCondition _eCondition, const ParamValue& _rParamValue1, const ParamValue& _rParamValue2, const ParamValue& _rParamValue3 ) const { return m_pImpl->getErrorMessage( _eCondition, _rParamValue1, _rParamValue2, _rParamValue3 ); } diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index d92adb8072f2..0954fd02de9f 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -59,9 +59,9 @@ namespace dbtools { const Reference< XConnection > xConnection; Reference< XSingleSelectQueryComposer > xComposer; - ::rtl::OUString sCommand; - ::rtl::OUString sFilter; - ::rtl::OUString sOrder; + OUString sCommand; + OUString sFilter; + OUString sOrder; sal_Int32 nCommandType; sal_Bool bEscapeProcessing; bool bComposerDirty; @@ -112,7 +112,7 @@ namespace dbtools try { - ::rtl::OUString sStatement; + OUString sStatement; switch ( _rData.nCommandType ) { case CommandType::COMMAND: @@ -126,9 +126,9 @@ namespace dbtools if ( _rData.sCommand.isEmpty() ) break; - sStatement = ::rtl::OUString( "SELECT * FROM " ); + sStatement = OUString( "SELECT * FROM " ); - ::rtl::OUString sCatalog, sSchema, sTable; + OUString sCatalog, sSchema, sTable; qualifiedNameComponents( _rData.xConnection->getMetaData(), _rData.sCommand, sCatalog, sSchema, sTable, eInDataManipulation ); sStatement += composeTableNameForSelect( _rData.xConnection, sCatalog, sSchema, sTable ); @@ -148,12 +148,12 @@ namespace dbtools // a native query ? sal_Bool bQueryEscapeProcessing = sal_False; - xQuery->getPropertyValue( ::rtl::OUString( "EscapeProcessing" ) ) >>= bQueryEscapeProcessing; + xQuery->getPropertyValue( OUString( "EscapeProcessing" ) ) >>= bQueryEscapeProcessing; if ( !bQueryEscapeProcessing ) break; // the command used by the query - xQuery->getPropertyValue( ::rtl::OUString( "Command" ) ) >>= sStatement; + xQuery->getPropertyValue( OUString( "Command" ) ) >>= sStatement; if ( sStatement.isEmpty() ) break; @@ -161,7 +161,7 @@ namespace dbtools Reference< XMultiServiceFactory > xFactory( _rData.xConnection, UNO_QUERY_THROW ); ::utl::SharedUNOComponent< XSingleSelectQueryComposer > xComposer; xComposer.set( - xFactory->createInstance( ::rtl::OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), + xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY_THROW ); @@ -169,17 +169,17 @@ namespace dbtools xComposer->setElementaryQuery( sStatement ); // the sort order - const ::rtl::OUString sPropOrder( ::rtl::OUString( "Order" ) ); + const OUString sPropOrder( OUString( "Order" ) ); if ( ::comphelper::hasProperty( sPropOrder, xQuery ) ) { - ::rtl::OUString sOrder; + OUString sOrder; OSL_VERIFY( xQuery->getPropertyValue( sPropOrder ) >>= sOrder ); xComposer->setOrder( sOrder ); } // the filter sal_Bool bApplyFilter = sal_True; - const ::rtl::OUString sPropApply( "ApplyFilter" ); + const OUString sPropApply( "ApplyFilter" ); if ( ::comphelper::hasProperty( sPropApply, xQuery ) ) { OSL_VERIFY( xQuery->getPropertyValue( sPropApply ) >>= bApplyFilter ); @@ -187,8 +187,8 @@ namespace dbtools if ( bApplyFilter ) { - ::rtl::OUString sFilter; - OSL_VERIFY( xQuery->getPropertyValue( ::rtl::OUString( "Filter" ) ) >>= sFilter ); + OUString sFilter; + OSL_VERIFY( xQuery->getPropertyValue( OUString( "Filter" ) ) >>= sFilter ); xComposer->setFilter( sFilter ); } @@ -206,7 +206,7 @@ namespace dbtools { // create an composer Reference< XMultiServiceFactory > xFactory( _rData.xConnection, UNO_QUERY_THROW ); - Reference< XSingleSelectQueryComposer > xComposer( xFactory->createInstance( ::rtl::OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), + Reference< XSingleSelectQueryComposer > xComposer( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY_THROW ); xComposer->setElementaryQuery( sStatement ); @@ -238,7 +238,7 @@ namespace dbtools //==================================================================== //-------------------------------------------------------------------- StatementComposer::StatementComposer( const Reference< XConnection >& _rxConnection, - const ::rtl::OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing ) + const OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing ) :m_pData( new StatementComposer_Data( _rxConnection ) ) { OSL_PRECOND( _rxConnection.is(), "StatementComposer::StatementComposer: illegal connection!" ); @@ -260,14 +260,14 @@ namespace dbtools } //-------------------------------------------------------------------- - void StatementComposer::setFilter( const ::rtl::OUString& _rFilter ) + void StatementComposer::setFilter( const OUString& _rFilter ) { m_pData->sFilter = _rFilter; m_pData->bComposerDirty = true; } //-------------------------------------------------------------------- - void StatementComposer::setOrder( const ::rtl::OUString& _rOrder ) + void StatementComposer::setOrder( const OUString& _rOrder ) { m_pData->sOrder = _rOrder; m_pData->bComposerDirty = true; @@ -281,14 +281,14 @@ namespace dbtools } //-------------------------------------------------------------------- - ::rtl::OUString StatementComposer::getQuery() + OUString StatementComposer::getQuery() { if ( lcl_ensureUpToDateComposer_nothrow( *m_pData ) ) { return m_pData->xComposer->getQuery(); } - return ::rtl::OUString(); + return OUString(); } //........................................................................ diff --git a/connectivity/source/commontools/warningscontainer.cxx b/connectivity/source/commontools/warningscontainer.cxx index 3a65fc438173..44b7a69de9e8 100644 --- a/connectivity/source/commontools/warningscontainer.cxx +++ b/connectivity/source/commontools/warningscontainer.cxx @@ -103,9 +103,9 @@ namespace dbtools } //-------------------------------------------------------------------- - void WarningsContainer::appendWarning( const ::rtl::OUString& _rWarning, const sal_Char* _pAsciiSQLState, const Reference< XInterface >& _rxContext ) + void WarningsContainer::appendWarning( const OUString& _rWarning, const sal_Char* _pAsciiSQLState, const Reference< XInterface >& _rxContext ) { - appendWarning( SQLWarning( _rWarning, _rxContext, ::rtl::OUString::createFromAscii( _pAsciiSQLState ), 0, Any() ) ); + appendWarning( SQLWarning( _rWarning, _rxContext, OUString::createFromAscii( _pAsciiSQLState ), 0, Any() ) ); } //........................................................................ |