diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-08-21 15:07:31 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-08-21 15:10:35 +0200 |
commit | 64b993e046f23baaacaff1572b7d2a816588b5ef (patch) | |
tree | 237dce36a1d4787d168a0520839f6aab22500487 /dbaccess | |
parent | 75f41baab6ce75786a91fe461835ee16a23ec18e (diff) |
finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.
Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
Diffstat (limited to 'dbaccess')
20 files changed, 36 insertions, 36 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 6ef538afff9a..b0d300d10e0c 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1845,7 +1845,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi sal_Int32 searchIndex=1; while(aColumnMap.find(sAlias) != aColumnMap.end()) { - (sAlias = sName) += OUString::valueOf(searchIndex++); + (sAlias = sName) += OUString::number(searchIndex++); } sName = sAlias; } diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 9143aff769be..0863f0ff57e5 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -953,7 +953,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr sal_Int32 j = 0; while ( aFindName != aNames.end() ) { - sColumnName += OUString::valueOf(++j); + sColumnName += OUString::number(++j); aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName)); } diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 956c58cdcb65..c28643c4bf02 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -222,7 +222,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments const static OUString sBaseName("Obj"); sPersistentName = sBaseName; - sPersistentName += OUString::valueOf(sal_Int32(rDefinitions.size() + 1)); + sPersistentName += OUString::number(rDefinitions.size() + 1); Reference<XNameAccess> xElements(getContainerStorage(),UNO_QUERY); if ( xElements.is() ) sPersistentName = ::dbtools::createUniqueName(xElements,sPersistentName); diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 55b7c4ec5b10..5ed81181b33e 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -2113,7 +2113,7 @@ void ODocumentDefinition::updateDocumentTitle() sName = DBACORE_RESSTRING( RID_STR_REPORT ); Reference< XUntitledNumbers > xUntitledProvider(m_pImpl->m_pDataSource->getModel_noCreate(), UNO_QUERY ); if ( xUntitledProvider.is() ) - sName += OUString::valueOf( xUntitledProvider->leaseNumber(getComponent()) ); + sName += OUString::number( xUntitledProvider->leaseNumber(getComponent()) ); } Reference< XTitle > xDatabaseDocumentModel(m_pImpl->m_pDataSource->getModel_noCreate(),uno::UNO_QUERY); diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 6c2b992f5a5b..9168e10575d0 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -201,7 +201,7 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat uno::Reference< chart::XChartDataArray> xChartData( m_xInternal, uno::UNO_QUERY_THROW ); xChartData->setData( uno::Sequence< uno::Sequence< double > >() ); xChartData->setColumnDescriptions( uno::Sequence< OUString >() ); - if ( m_xInternal->hasDataByRangeRepresentation( OUString::valueOf( sal_Int32(0) ) ) ) + if ( m_xInternal->hasDataByRangeRepresentation( OUString::number( 0 ) ) ) m_xInternal->deleteSequence(0); } catch( const uno::Exception& ) @@ -754,7 +754,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_TYPE ) >>= col->nDataType ); const sal_Int32 columnIndex = col - aColumns.begin(); - const OUString sRangeName = OUString::valueOf( columnIndex ); + const OUString sRangeName = OUString::number( columnIndex ); m_aNumberFormats.insert( ::std::map< OUString, uno::Any >::value_type( sRangeName, aNumberFormat ) ); } @@ -803,7 +803,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat 4.30, 9.02, 6.20 }; for(sal_Int32 h = 0,k = 0; h < nRowCount; ++h,++k ) { - aRowLabels.push_back(OUString::valueOf(h+1)); + aRowLabels.push_back(OUString::number(h+1)); ::std::vector< double > aRow; const sal_Int32 nSize = sizeof(fDefaultData)/sizeof(fDefaultData[0]); for (size_t j = 0; j < (aColumns.size()-1); ++j,++k) diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index 8d0b5f1ce63d..b9a12d11362d 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -1018,7 +1018,7 @@ namespace dbmm sal_Int32 nOverallRange( m_aSubDocs.size() ); OUString sProgressSkeleton( MacroMigrationResId( STR_OVERALL_PROGRESS).toString(). - replaceFirst("$overall$", OUString::valueOf(nOverallRange))); + replaceFirst("$overall$", OUString::number(nOverallRange))); m_rProgress.start( nOverallRange ); @@ -1031,7 +1031,7 @@ namespace dbmm // update overall progress text OUString sOverallProgress( sProgressSkeleton.replaceFirst("$current$", - OUString::valueOf(nOverallProgressValue))); + OUString::number(nOverallProgressValue))); m_rProgress.setOverallProgressText( sOverallProgress ); // migrate document @@ -1262,7 +1262,7 @@ namespace dbmm // (The latter is valid, since there can be multiple sub documents with the same base name, // in different levels in the hierarchy.) // In this case, just use the umambiguous sub document number. - return sPrefix + OUString::valueOf( sal_Int64( _rDocument.nNumber ) ) + "_" + _rSourceLibName; + return sPrefix + OUString::number( _rDocument.nNumber ) + "_" + _rSourceLibName; } } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 0ca0dfa61770..10cad9b7b4b0 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -312,7 +312,7 @@ void ODBExport::exportDataSource() break; case TypeClass_DOUBLE: // let the unit converter format is as string - sValue = OUString::valueOf( getDouble( aValue ) ); + sValue = OUString::number( getDouble( aValue ) ); break; case TypeClass_BOOLEAN: sValue = ::xmloff::token::GetXMLToken( getBOOL( aValue ) ? XML_TRUE : XML_FALSE ); @@ -321,7 +321,7 @@ void ODBExport::exportDataSource() case TypeClass_SHORT: case TypeClass_LONG: // let the unit converter format is as string - sValue = OUString::valueOf( getINT32( aValue ) ); + sValue = OUString::number( getINT32( aValue ) ); break; default: break; @@ -607,7 +607,7 @@ void ODBExport::exportConnectionData() AddAttribute(XML_NAMESPACE_DB,XML_TYPE,sType); AddAttribute(XML_NAMESPACE_DB,XML_HOSTNAME,sHostName); if ( nPort != -1 ) - AddAttribute(XML_NAMESPACE_DB,XML_PORT,OUString::valueOf(nPort)); + AddAttribute(XML_NAMESPACE_DB,XML_PORT,OUString::number(nPort)); if ( sDatabaseName.getLength() ) AddAttribute(XML_NAMESPACE_DB,XML_DATABASE_NAME,sDatabaseName); diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index a8d32fa66f05..15d80947b54d 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -2942,7 +2942,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer OUString sMessage( OUString( OUString(ModuleRes(RID_STR_UNSUPPORTED_OBJECT_TYPE))). - replaceFirst("$type$", OUString::valueOf(sal_Int32(pObject->Type)))); + replaceFirst("$type$", OUString::number(pObject->Type))); throw IllegalArgumentException(sMessage, *this, sal_Int16( pObject - aSelectedObjects.getConstArray() )); } } diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 67bd3736b2e7..2b2a9f77dbb0 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -602,7 +602,7 @@ void OGenericUnoController::InvalidateFeature_Impl() if ( m_aSupportedFeatures.end() == aFeaturePos ) { OString sMessage( "OGenericUnoController::InvalidateFeature_Impl: feature id " ); - sMessage += OString::valueOf( aNextFeature.nId ); + sMessage += OString::number( aNextFeature.nId ); sMessage += OString( " has been invalidated, but is not supported!" ); SAL_WARN("dbaccess.ui", sMessage.getStr() ); } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index aee6df61a43b..b318b97b7d8e 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -526,7 +526,7 @@ String OFieldDescControl::GetControlText( sal_uInt16 nControlId ) break; case FIELD_PROPERTY_TEXTLEN: if (pTextLen) - return OUString::valueOf(static_cast<sal_Int64>(pTextLen->GetValue())); + return OUString::number(pTextLen->GetValue()); case FIELD_PROPERTY_NUMTYPE: if (pNumType) return pNumType->GetSelectEntry(); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 3b52da5bd7ab..ed8c3e29fdaf 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -894,7 +894,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() if (bFolderExists == sal_True) { i++; - pURL->setName(sLastSegmentName.concat(OUString::valueOf(i))); + pURL->setName(sLastSegmentName.concat(OUString::number(i))); } } } @@ -913,7 +913,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() bElementExists = xSimpleFileAccess->exists( aExistenceCheck.GetMainURL( INetURLObject::NO_DECODE ) ); if ( bElementExists ) { - aExistenceCheck.setBase( BaseName.concat( OUString::valueOf( i ) ) ); + aExistenceCheck.setBase( BaseName.concat( OUString::number( i ) ) ); ++i; } } diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 8d2cd7defcc6..58799dee088a 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -656,12 +656,12 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName) while(m_aDestColumns.find(sName) != m_aDestColumns.end()) { sName = aAlias; - sName += OUString::valueOf(++nPos); + sName += OUString::number(++nPos); if(nMaxNameLen && sName.getLength() > nMaxNameLen) { aAlias = aAlias.copy(0,::std::min<sal_Int32>( nMaxNameLen-nCount, aAlias.getLength() )); sName = aAlias; - sName += OUString::valueOf(nPos); + sName += OUString::number(nPos); ++nCount; } } diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index b3d88ae23915..53d45f81adcc 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -810,11 +810,11 @@ void OHTMLImportExport::WriteTables() aStrOut = aStrOut + " "; aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_cellspacing; aStrOut = aStrOut + "="; - aStrOut = aStrOut + OString::valueOf((sal_Int32)nCellSpacing); + aStrOut = aStrOut + OString::number(nCellSpacing); aStrOut = aStrOut + " "; aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_cols; aStrOut = aStrOut + "="; - aStrOut = aStrOut + OString::valueOf(aNames.getLength()); + aStrOut = aStrOut + OString::number(aNames.getLength()); aStrOut = aStrOut + " "; aStrOut = aStrOut + OOO_STRING_SVTOOLS_HTML_O_border; aStrOut = aStrOut + "=1"; @@ -964,12 +964,12 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I aStrTD = aStrTD + " "; aStrTD = aStrTD + OOO_STRING_SVTOOLS_HTML_O_width; aStrTD = aStrTD + "="; - aStrTD = aStrTD + OString::valueOf((sal_Int32)nWidthPixel); + aStrTD = aStrTD + OString::number(nWidthPixel); // line height aStrTD = aStrTD + " "; aStrTD = aStrTD + OOO_STRING_SVTOOLS_HTML_O_height; aStrTD = aStrTD + "="; - aStrTD = aStrTD + OString::valueOf((sal_Int32)nHeightPixel); + aStrTD = aStrTD + OString::number(nHeightPixel); aStrTD = aStrTD + " "; aStrTD = aStrTD + OOO_STRING_SVTOOLS_HTML_O_align; diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index f27844576089..81e3fb2a13ec 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -1485,12 +1485,12 @@ OUString OCopyTableWizard::convertColumnName(const TColumnFindFunctor& _rCmpFu OUString sName(sAlias); sal_Int32 nPos = 1; - sName += OUString::valueOf(nPos); + sName += OUString::number(nPos); while(_rCmpFunctor(sName)) { sName = sAlias; - sName += OUString::valueOf(++nPos); + sName += OUString::number(++nPos); } sAlias = sName; // we have to check again, it could happen that the name is already to long @@ -1634,7 +1634,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName) while(m_vSourceColumns.find(sName) != m_vSourceColumns.end()) { sName = _sName; - sName += OUString::valueOf(++nPos); + sName += OUString::number(++nPos); } } } diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index 31c939058c26..20e976d70197 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -440,7 +440,7 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rV aWindowData.put( "WindowHeight", static_cast<sal_Int32>((*aIter)->GetSize().Height()) ); aWindowData.put( "ShowAll", (*aIter)->IsShowAll() ); - const OUString sTableName( OUString( "Table" ) + OUString::valueOf( i ) ); + const OUString sTableName( OUString( "Table" ) + OUString::number( i ) ); aAllTablesData.put( sTableName, aWindowData.getPropertyValues() ); } diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index 3e890c8550cf..928245ab9c73 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -103,7 +103,7 @@ sal_Bool OQueryTableWindow::Init() if (pContainer->CountTableAlias(sAliasName, m_nAliasNum)) { sAliasName += OUString('_'); - sAliasName += OUString::valueOf(m_nAliasNum); + sAliasName += OUString::number(m_nAliasNum); } diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx index 020e5d07eb0f..a36b9f777731 100644 --- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx @@ -216,7 +216,7 @@ void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, con ++crit, ++c ) { - aCriteria[c].Name = OUString( "Criterion_" ) + OUString::valueOf( c ); + aCriteria[c].Name = OUString( "Criterion_" ) + OUString::number( c ); aCriteria[c].Value <<= *crit; } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 82c1422c12ae..fdeac5a1f35a 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1106,7 +1106,7 @@ OUString OQueryController::getPrivateTitle( ) const ::osl::MutexGuard aGuard( getMutex() ); String aDefaultName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) ); sName = aDefaultName.GetToken(0,' '); - sName += OUString::valueOf(getCurrentStartNumber()); + sName += OUString::number(getCurrentStartNumber()); } } return sName; @@ -1243,7 +1243,7 @@ void OQueryController::saveViewSettings( ::comphelper::NamedValueCollection& o_r aFieldData.clear(); (*field)->Save( aFieldData, i_includingCriteria ); - const OUString sFieldSettingName = "Field" + OUString::valueOf( i ); + const OUString sFieldSettingName = "Field" + OUString::number( i ); aAllFieldsData.put( sFieldSettingName, aFieldData.getPropertyValues() ); } } diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index f75b3e8b8ffe..2b53bef2d5d7 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -1511,7 +1511,7 @@ OUString OTableController::createUniqueName(const OUString& _rName) OFieldDescription* pFieldDesc = (*aIter)->GetActFieldDescr(); if (pFieldDesc && !pFieldDesc->GetName().isEmpty() && bCase(sName,pFieldDesc->GetName())) { // found a second name of _rName so we need another - sName = _rName + OUString::valueOf(++i); + sName = _rName + OUString::number(++i); aIter = m_vRowList.begin(); // and retry } } @@ -1535,7 +1535,7 @@ OUString OTableController::getPrivateTitle() const { String aName = String(ModuleRes(STR_TBL_TITLE)); sTitle = aName.GetToken(0,' '); - sTitle += OUString::valueOf(getCurrentStartNumber()); + sTitle += OUString::number(getCurrentStartNumber()); } } catch( const Exception& ) diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index cf71cbd28647..4aaf66d14709 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1342,8 +1342,8 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou { OUString aMessage( String( ModuleRes( STR_CTW_UNSUPPORTED_COLUMN_TYPE ) ) ); - aMessage = aMessage.replaceAt( aMessage.indexOfAsciiL( "$type$", 6 ), 6, OUString::valueOf( aSourceColTypes[ nSourceColumn ] ) ); - aMessage = aMessage.replaceAt( aMessage.indexOfAsciiL( "$pos$", 5 ), 5, OUString::valueOf( nSourceColumn ) ); + aMessage = aMessage.replaceAt( aMessage.indexOfAsciiL( "$type$", 6 ), 6, OUString::number( aSourceColTypes[ nSourceColumn ] ) ); + aMessage = aMessage.replaceAt( aMessage.indexOfAsciiL( "$pos$", 5 ), 5, OUString::number( nSourceColumn ) ); ::dbtools::throwSQLException( aMessage, |