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 /xmloff | |
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 'xmloff')
33 files changed, 80 insertions, 80 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 15b7278e019a..710a72fd06a9 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1630,7 +1630,7 @@ void SchXMLExportHelper_Impl::exportTable() sal_Int64 nRepeat = static_cast< sal_Int64 >( nHiddenIndex - nNextIndex ); if(nRepeat>1) mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, - OUString::valueOf( nRepeat )); + OUString::number( nRepeat )); SvXMLElementExport aColumn( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, sal_True, sal_True ); } mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_VISIBILITY, GetXMLToken( XML_COLLAPSE ) ); @@ -1644,7 +1644,7 @@ void SchXMLExportHelper_Impl::exportTable() sal_Int64 nRepeat = static_cast< sal_Int64 >( nEndIndex - nNextIndex + 1 ); if(nRepeat>1) mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, - OUString::valueOf( nRepeat )); + OUString::number( nRepeat )); SvXMLElementExport aColumn( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, sal_True, sal_True ); } } @@ -3413,7 +3413,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( if( aLastPoint.mnRepeat > 1 ) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED, - OUString::valueOf( (sal_Int64)( aLastPoint.mnRepeat ) )); + OUString::number( ( aLastPoint.mnRepeat ) )); SvXMLElementExport aPointElem( mrExport, XML_NAMESPACE_CHART, XML_DATA_POINT, sal_True, sal_True ); } @@ -3427,7 +3427,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( if( aLastPoint.mnRepeat > 1 ) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_REPEATED, - OUString::valueOf( (sal_Int64)( aLastPoint.mnRepeat ) )); + OUString::number( ( aLastPoint.mnRepeat ) )); SvXMLElementExport aPointElem( mrExport, XML_NAMESPACE_CHART, XML_DATA_POINT, sal_True, sal_True ); } diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 902dad163ca5..c5377e39a83a 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -130,7 +130,7 @@ void lcl_fillRangeMapping( } else { - OUString aColNumStr = OUString::valueOf( static_cast< sal_Int32 >( nCol - nColOffset )); + OUString aColNumStr = OUString::number( nCol - nColOffset); if( nRow == 0 && rTable.bHasHeaderRow ) rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type( aRangeId, lcl_aLabelPrefix + aColNumStr )); @@ -149,7 +149,7 @@ void lcl_fillRangeMapping( } else { - OUString aRowNumStr = OUString::valueOf( static_cast< sal_Int32 >( nRow - nRowOffset )); + OUString aRowNumStr = OUString::number( nRow - nRowOffset); if( nCol == 0 && rTable.bHasHeaderColumn ) rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type( aRangeId, lcl_aLabelPrefix + aRowNumStr )); @@ -935,7 +935,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( else { Reference< beans::XPropertySet > xOldSequenceProp( aLSeqIt->second->getValues(), uno::UNO_QUERY ); - OUString aRep( OUString::valueOf( aLSeqIt->first.first )); + OUString aRep( OUString::number( aLSeqIt->first.first )); Reference< chart2::data::XDataSequence > xNewSequence( xDataProv->createDataSequenceByRangeRepresentation( aRep )); SchXMLTools::copyProperties( @@ -967,7 +967,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( else if( ! lcl_tableOfRangeMatches( aRange, rTable.aTableNameOfFile )) { OUString aRep("label "); - aRep += OUString::valueOf( aLSeqIt->first.first ); + aRep += OUString::number( aLSeqIt->first.first ); Reference< chart2::data::XDataSequence > xNewSeq( xDataProv->createDataSequenceByRangeRepresentation( aRep )); diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index 29047f8be210..3b3097b60033 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -121,7 +121,7 @@ RDFaExportHelper::LookupBlankNode( m_BlankNodeMap[ i_xBlankNode->getStringValue() ] ); if (rEntry.isEmpty()) { - rEntry = "_:b" + OUString::valueOf(++m_Counter); + rEntry = "_:b" + OUString::number(++m_Counter); } return rEntry; } diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index a2ff42abfe07..9f8968033ea4 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -233,7 +233,7 @@ void XMLSettingsExportHelper::exportLong(const sal_Int64 nValue, const OUString& m_rContext.AddAttribute( XML_NAME, rName ); m_rContext.AddAttribute( XML_TYPE, XML_LONG ); m_rContext.StartElement( XML_CONFIG_ITEM, sal_True ); - OUString sValue(OUString::valueOf(nValue)); + OUString sValue(OUString::number(nValue)); m_rContext.Characters( sValue ); m_rContext.EndElement( sal_False ); } diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx index 5ef2156acc60..be14e0eeeba6 100644 --- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx +++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx @@ -45,7 +45,7 @@ const OUString& UnoInterfaceToUniqueIdentifierMapper::registerReference( const R else { OUString aId( "id" ); - aId += OUString::valueOf( mnNextId++ ); + aId += OUString::number( mnNextId++ ); return (*maEntries.insert( IdMap_t::value_type( aId, xRef ) ).first).first; } } diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 3ccb7e1ec95c..2672ad72f5ac 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -954,7 +954,7 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod { sal_Int32 nGroupId = 0; if( pValue->Value >>= nGroupId ) - mrExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_GROUP_ID, OUString::valueOf( nGroupId ) ); + mrExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_GROUP_ID, OUString::number( nGroupId ) ); } else { diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 2ea06e1b9695..2bc55ba92815 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -496,7 +496,7 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport ) if( rEffect.mnPathShapeId != -1 ) { - rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_PATH_ID, OUString::valueOf( rEffect.mnPathShapeId ) ); + rExport.AddAttribute( XML_NAMESPACE_PRESENTATION, XML_PATH_ID, OUString::number( rEffect.mnPathShapeId ) ); } enum XMLTokenEnum eLocalName; diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 2174743fe8b4..092c5a0b8956 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -800,9 +800,9 @@ sal_Bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, O { mpAutoLayoutInfoList->push_back( pNew ); OUString sNewName = "AL"; - sNewName += OUString::valueOf(sal_Int32( mpAutoLayoutInfoList->size() - 1 )); + sNewName += OUString::number(mpAutoLayoutInfoList->size() - 1); sNewName += "T"; - sNewName += OUString::valueOf(sal_Int32(nType)); + sNewName += OUString::number(nType); pNew->SetLayoutName(sNewName); } @@ -1334,7 +1334,7 @@ void SdXMLExport::ImpWritePageMasterInfos() // create name OUString sNewName("PM"); - sNewName += OUString::valueOf((sal_Int32)nCnt); + sNewName += OUString::number(nCnt); pInfo->SetName(sNewName); // prepare page-master attributes @@ -1450,7 +1450,7 @@ static OUString findOrAppendImpl( std::vector< OUString >& rVector, const OUStri // create a reference string with pPrefix and the index of the // found or created rText OUString aStr( OUString::createFromAscii( pPrefix ) ); - aStr += OUString::valueOf( nIndex ); + aStr += OUString::number( nIndex ); return aStr; } @@ -1481,7 +1481,7 @@ static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, cons // create a reference string with pPrefix and the index of the // found or created DateTimeDeclImpl OUString aStr( OUString::createFromAscii( pPrefix ) ); - aStr += OUString::valueOf( nIndex ); + aStr += OUString::number( nIndex ); return aStr; } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index d56dea2cc547..6274da4c7f30 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1133,7 +1133,7 @@ void XMLShapeExport::ImpExportGluePoints( const uno::Reference< drawing::XShape { // export only user defined glue points - const OUString sId( OUString::valueOf( nIdentifier ) ); + const OUString sId( OUString::number( nIdentifier ) ); mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_ID, sId ); mrExport.GetMM100UnitConverter().convertMeasureToXML(msBuffer, diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index 70593e608879..8cac9a7d1532 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -1362,7 +1362,7 @@ void XMLShapeExport::ImpExportConnectorShape( { if( nGluePointId != -1 ) { - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_GLUE_POINT, OUString::valueOf( nGluePointId )); + mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_GLUE_POINT, OUString::number( nGluePointId )); } } } @@ -1380,7 +1380,7 @@ void XMLShapeExport::ImpExportConnectorShape( { if( nGluePointId != -1 ) { - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_GLUE_POINT, OUString::valueOf( nGluePointId )); + mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_GLUE_POINT, OUString::number( nGluePointId )); } } } @@ -1724,7 +1724,7 @@ void XMLShapeExport::ImpExportPageShape( sal_Int32 nPageNumber = 0; xPropSet->getPropertyValue(aPageNumberStr) >>= nPageNumber; if( nPageNumber ) - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_PAGE_NUMBER, OUString::valueOf(nPageNumber)); + mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_PAGE_NUMBER, OUString::number(nPageNumber)); } // a presentation page shape, normally used on notes pages only. If diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx index a3b1cc437bcd..b2d6cbb7e864 100644 --- a/xmloff/source/draw/shapeexport3.cxx +++ b/xmloff/source/draw/shapeexport3.cxx @@ -437,7 +437,7 @@ void XMLShapeExport::export3DLamps( const com::sun::star::uno::Reference< com::s sal_Bool bLightOnOff = false; for(sal_Int32 nLamp = 1; nLamp <= 8; nLamp++) { - aIndexStr = OUString::valueOf( nLamp ); + aIndexStr = OUString::number( nLamp ); // lightcolor aPropName = aColorPropName; diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 111f0151a222..472d6ae732cd 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -99,7 +99,7 @@ void ExportParameter( OUStringBuffer& rStrBuffer, const com::sun::star::drawing: case com::sun::star::drawing::EnhancedCustomShapeParameterType::ADJUSTMENT : { rStrBuffer.append( (sal_Unicode)'$' ); - rStrBuffer.append( OUString::valueOf( nValue ) ); + rStrBuffer.append( OUString::number( nValue ) ); } break; @@ -128,7 +128,7 @@ void ExportParameter( OUStringBuffer& rStrBuffer, const com::sun::star::drawing: case com::sun::star::drawing::EnhancedCustomShapeParameterType::LOGHEIGHT : rStrBuffer.append( GetXMLToken( XML_LOGHEIGHT ) ); break; default : - rStrBuffer.append( OUString::valueOf( nValue ) ); + rStrBuffer.append( OUString::number( nValue ) ); } } } @@ -139,7 +139,7 @@ void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< OUString >& for ( i = 0; i < rEquations.getLength(); i++ ) { OUString aStr(static_cast<sal_Unicode>('f')); - aStr += OUString::valueOf( i ); + aStr += OUString::number( i ); rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aStr ); aStr = rEquations[ i ]; @@ -619,7 +619,7 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean { sal_Int32 nExtrusionNumberOfLineSegments = 0; if ( rProp.Value >>= nExtrusionNumberOfLineSegments ) - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_EXTRUSION_NUMBER_OF_LINE_SEGMENTS, OUString::valueOf( nExtrusionNumberOfLineSegments ) ); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_EXTRUSION_NUMBER_OF_LINE_SEGMENTS, OUString::number( nExtrusionNumberOfLineSegments ) ); } break; case EAS_LightFace : @@ -1020,14 +1020,14 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean { sal_Int32 nStretchPoint = 0; if ( rProp.Value >>= nStretchPoint ) - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_PATH_STRETCHPOINT_X, OUString::valueOf( nStretchPoint ) ); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_PATH_STRETCHPOINT_X, OUString::number( nStretchPoint ) ); } break; case EAS_StretchY : { sal_Int32 nStretchPoint = 0; if ( rProp.Value >>= nStretchPoint ) - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_PATH_STRETCHPOINT_Y, OUString::valueOf( nStretchPoint ) ); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_PATH_STRETCHPOINT_Y, OUString::number( nStretchPoint ) ); } break; case EAS_TextFrames : @@ -1251,7 +1251,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape do { sPictureName = sPrefix; - sPictureName += OUString::valueOf( ++nIndex ); + sPictureName += OUString::number( ++nIndex ); sPictureName += sSuffix; } while( xPictureStorage->hasByName( sPictureName ) ); diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index 64ac91b9c881..d4ae9adb1975 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -1284,7 +1284,7 @@ void XMLEnhancedCustomShapeContext::EndElement() EquationHashMap::iterator aHashIter( pH->find( aEquationName ) ); if ( aHashIter != pH->end() ) nIndex = (*aHashIter).second; - aNew += OUString::valueOf( nIndex ); + aNew += OUString::number( nIndex ); aNew += aEquationIter->copy( nIndexOf + aEquationName.getLength() + 1 ); *aEquationIter = aNew; } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 2981f74d6cda..4aa64f3d6dcd 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -475,7 +475,7 @@ namespace xmloff { // assemble the new name (suggestion) sReturn = sUnnamedName; - sReturn += OUString::valueOf(i); + sReturn += OUString::number(i); // check the existence (this is the bad performance part ....) for (pNames = aNames.getConstArray(); pNames<pNamesEnd; ++pNames) { diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index 5bf3b982a364..88fc19d395e6 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -480,7 +480,7 @@ namespace xmloff OUString sControlId = sControlIdBase; size_t nKnownControlCount = ::std::accumulate( _rAllPagesControlIds.begin(), _rAllPagesControlIds.end(), (size_t)0, AccumulateSize() ); - sControlId += OUString::valueOf( (sal_Int32)nKnownControlCount + 1 ); + sControlId += OUString::number( (sal_Int32)nKnownControlCount + 1 ); #ifdef DBG_UTIL // Check if the id is already used. It shouldn't, as we currently have no mechanism for removing entries diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index e48ac2054228..90f4e9c94e37 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -155,8 +155,8 @@ void SvXMLMetaExport::_MExport() SvXMLElementExport aElem( mrExport, XML_NAMESPACE_META, XML_EDITING_CYCLES, sal_True, sal_False ); - mrExport.Characters( OUString::valueOf( - static_cast<sal_Int32>(mxDocProps->getEditingCycles()) ) ); + mrExport.Characters( OUString::number( + mxDocProps->getEditingCycles() ) ); } // editing duration @@ -259,7 +259,7 @@ void SvXMLMetaExport::_MExport() sal_Int32 nValue = 0; if ( aDocStatistic[nInd].Value >>= nValue ) { - OUString aValue = OUString::valueOf( nValue ); + OUString aValue = OUString::number( nValue ); if ( aDocStatistic[nInd].Name == "TableCount" ) mrExport.AddAttribute( XML_NAMESPACE_META, XML_TABLE_COUNT, aValue ); diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx index fc4137dc9a1c..ecf8efab18a4 100644 --- a/xmloff/source/style/DashStyle.cxx +++ b/xmloff/source/style/DashStyle.cxx @@ -254,7 +254,7 @@ sal_Bool XMLDashStyleExport::exportXML( // dots if( aLineDash.Dots ) { - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS1, OUString::valueOf( (sal_Int32)aLineDash.Dots ) ); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS1, OUString::number( aLineDash.Dots ) ); if( aLineDash.DotLen ) { @@ -276,7 +276,7 @@ sal_Bool XMLDashStyleExport::exportXML( // dashes if( aLineDash.Dashes ) { - rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS2, OUString::valueOf( (sal_Int32)aLineDash.Dashes ) ); + rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_DOTS2, OUString::number( aLineDash.Dashes ) ); if( aLineDash.DashLen ) { diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index e02d62f94603..7886b84fae71 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -174,17 +174,17 @@ OUString XMLFontAutoStylePool::Add( } if( sName.isEmpty() ) - sName = OUString::valueOf( sal_Unicode( 'F' ) ); + sName = OUString( sal_Unicode( 'F' ) ); if( m_aNames.find(sName) != m_aNames.end() ) { sal_Int32 nCount = 1; OUString sPrefix( sName ); - sName += OUString::valueOf( nCount ); + sName += OUString::number( nCount ); while( m_aNames.find(sName) != m_aNames.end() ) { sName = sPrefix; - sName += OUString::valueOf( ++nCount ); + sName += OUString::number( ++nCount ); } } diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx index e248491d5452..154505af43fb 100644 --- a/xmloff/source/style/cdouthdl.cxx +++ b/xmloff/source/style/cdouthdl.cxx @@ -294,7 +294,7 @@ sal_Bool XMLCrossedOutTextPropHdl::exportXML( OUString& rStrExpValue, const uno: if( (rValue >>= nValue) && (awt::FontStrikeout::SLASH == nValue || awt::FontStrikeout::X == nValue) ) { - rStrExpValue = OUString::valueOf( + rStrExpValue = OUString( static_cast< sal_Unicode>( awt::FontStrikeout::SLASH == nValue ? '/' : 'X' ) ); bRet = sal_True; diff --git a/xmloff/source/style/impastp2.cxx b/xmloff/source/style/impastp2.cxx index 8c6b50d1bd97..74a591da2aaf 100644 --- a/xmloff/source/style/impastp2.cxx +++ b/xmloff/source/style/impastp2.cxx @@ -36,7 +36,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam { rFamilyData.mnName++; sBuffer.append( rFamilyData.maStrPrefix ); - sBuffer.append( OUString::valueOf( (sal_Int32)rFamilyData.mnName ) ); + sBuffer.append( OUString::number( rFamilyData.mnName ) ); msName = sBuffer.makeStringAndClear(); } while (rFamilyData.maNameList.find(msName) != rFamilyData.maNameList.end()); diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 61d36b1b9040..466331671809 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -505,7 +505,7 @@ void SvXMLNumFmtExport::WriteRepeatedElement_Impl( sal_Unicode nChar ) FinishTextElement_Impl(); SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, XML_FILL_CHARACTER, sal_True, sal_False ); - rExport.Characters( OUString::valueOf( nChar ) ); + rExport.Characters( OUString( nChar ) ); } void SvXMLNumFmtExport::WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDecimals ) @@ -516,7 +516,7 @@ void SvXMLNumFmtExport::WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDe if ( nDecimals > 0 ) { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES, - OUString::valueOf( (sal_Int32) nDecimals ) ); + OUString::number( nDecimals ) ); } SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, XML_SECONDS, @@ -545,14 +545,14 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl( if ( nDecimals >= 0 ) // negative = automatic { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES, - OUString::valueOf( nDecimals ) ); + OUString::number( nDecimals ) ); } // integer digits if ( nInteger >= 0 ) // negative = automatic { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_INTEGER_DIGITS, - OUString::valueOf( nInteger ) ); + OUString::number( nInteger ) ); } // decimal replacement (dashes) or variable decimals (#) @@ -592,7 +592,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl( // position attribute rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_POSITION, - OUString::valueOf( pObj->nFormatPos ) ); + OUString::number( pObj->nFormatPos ) ); SvXMLElementExport aChildElem( rExport, XML_NAMESPACE_NUMBER, XML_EMBEDDED_TEXT, sal_True, sal_False ); @@ -620,14 +620,14 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl( if ( nDecimals >= 0 ) // negative = automatic { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES, - OUString::valueOf( nDecimals ) ); + OUString::number( nDecimals ) ); } // integer digits if ( nInteger >= 0 ) // negative = automatic { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_INTEGER_DIGITS, - OUString::valueOf( nInteger ) ); + OUString::number( nInteger ) ); } // (automatic) grouping separator @@ -640,7 +640,7 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl( if ( nExp >= 0 ) { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_EXPONENT_DIGITS, - OUString::valueOf( nExp ) ); + OUString::number( nExp ) ); } SvXMLElementExport aElem( rExport, @@ -658,7 +658,7 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl( if ( nInteger >= 0 ) // negative = default (no integer part) { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_INTEGER_DIGITS, - OUString::valueOf( nInteger ) ); + OUString::number( nInteger ) ); } // (automatic) grouping separator @@ -671,20 +671,20 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl( if ( nNumeratorDigits >= 0 ) { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_NUMERATOR_DIGITS, - OUString::valueOf( nNumeratorDigits ) ); + OUString::number( nNumeratorDigits ) ); } if ( nDenominator ) { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DENOMINATOR_VALUE, - OUString::valueOf( nDenominator) ); + OUString::number( nDenominator) ); } // I guess it's not necessary to export nDenominatorDigits // if we have a forced denominator ( remove ? ) if ( nDenominatorDigits >= 0 ) { rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_MIN_DENOMINATOR_DIGITS, - OUString::valueOf( nDenominatorDigits ) ); + OUString::number( nDenominatorDigits ) ); } SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, XML_FRACTION, diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 601771e020f8..99a7ecc7df3a 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1203,7 +1203,7 @@ void SvXMLNumFmtElementContext::EndElement() rParent.AddToCode( (sal_Unicode)'/' ); if ( aNumInfo.nFracDenominator > 0 ) { - rParent.AddToCode( OUString::valueOf( aNumInfo.nFracDenominator ) ); + rParent.AddToCode( OUString::number( aNumInfo.nFracDenominator ) ); } else { @@ -1394,7 +1394,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport, { aFormatCode.append( "][$-" ); // language code in upper hex: - aFormatCode.append(OUString::valueOf(sal_Int32(eLang), 16).toAsciiUpperCase()); + aFormatCode.append(OUString::number(eLang, 16).toAsciiUpperCase()); } aFormatCode.append( sal_Unicode(']') ); } diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 84792c7e536d..9f1d64a7cd15 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -418,11 +418,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // table:number-columns-spanned if( nColSpan > 1 ) - mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_SPANNED, OUString::valueOf( nColSpan ) ); + mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_SPANNED, OUString::number( nColSpan ) ); // table:number-rows-spanned if( nRowSpan > 1 ) - mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_SPANNED, OUString::valueOf( nRowSpan ) ); + mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_SPANNED, OUString::number( nRowSpan ) ); // <table:table-cell> or <table:covered-table-cell> SvXMLElementExport tableCellElement( mrExport, XML_NAMESPACE_TABLE, bIsMerged ? XML_COVERED_TABLE_CELL : XML_TABLE_CELL, sal_True, sal_True ); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index f5f763dfe752..236f0f7951b1 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -1521,7 +1521,7 @@ void XMLSectionExport::ExportIndexTemplateElement( //---> i53420 if (bLevelOK) GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, - OUString::valueOf((sal_Int32)nLevel)); + OUString::number(nLevel)); } //--->i53420 @@ -1534,7 +1534,7 @@ void XMLSectionExport::ExportIndexTemplateElement( if (bLevelOK) GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, - OUString::valueOf((sal_Int32)nLevel)); + OUString::number(nLevel)); } // export template SvXMLElementExport aTemplateElement(GetExport(), XML_NAMESPACE_TEXT, diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index dfaa7c2f6410..4888f07881c1 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -571,7 +571,7 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ ) while( xTextImportHelper->HasFrameByName( sName ) ) { sName = sOldName; - sName += OUString::valueOf( ++i ); + sName += OUString::number( ++i ); } xNamed->setName( sName ); if( sName != sOldName ) diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 2adbfafc9953..a1e080bf3615 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2560,7 +2560,7 @@ void XMLTextFieldExport::ProcessInteger(enum XMLTokenEnum eName, return; GetExport().AddAttribute(XML_NAMESPACE_TEXT, eName, - OUString::valueOf(nNum)); + OUString::number(nNum)); } /// export an integer attribute, omit if default diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index bba2e717be45..1c35a54fcfaa 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -234,7 +234,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const n += Date( Date::SYSTEM ).GetDate(); n += rand(); // Value of xml:id in element <text:list> has to be a valid ID type (#i92478#) - sTmpStr += OUString::valueOf( n ); + sTmpStr += OUString::number( n ); OUString sNewListId( sTmpStr ); if ( mpProcessedLists != 0 ) @@ -244,7 +244,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const { ++nHitCount; sNewListId = sTmpStr; - sNewListId += OUString::valueOf( nHitCount ); + sNewListId += OUString::number( nHitCount ); } } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 7dc6bd6558a3..eac056cf22e0 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2323,7 +2323,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( if (sName.isEmpty()) { // name attribute is mandatory, so have to pull a // rabbit out of the hat here - sName = sFieldMarkName + OUString::valueOf( + sName = sFieldMarkName + OUString::number( m_pImpl->AddFieldMarkStart(xFormField)); } GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, @@ -2382,7 +2382,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( if (sName.isEmpty()) { // name attribute is mandatory, so have to pull a // rabbit out of the hat here - sName = sFieldMarkName + OUString::valueOf( + sName = sFieldMarkName + OUString::number( m_pImpl->GetFieldMarkIndex(xFormField)); } GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index f837a561ffff..c000917e4262 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -395,7 +395,7 @@ XMLSequenceFieldImportContext::XMLSequenceFieldImportContext( sPropertyNumberFormat(sAPI_number_format), sPropertySequenceValue(sAPI_sequence_value), - sNumFormat(OUString::valueOf(sal_Unicode('1'))), + sNumFormat(OUString(sal_Unicode('1'))), sNumFormatSync(GetXMLToken(XML_FALSE)), bRefNameOK(sal_False) { diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 333b5d174b03..628b223fd25f 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1422,7 +1422,7 @@ void XMLTabStopOASISTContext_Impl::StartElement( XML_NAMESPACE_STYLE, ::xmloff::token::GetXMLToken( XML_LEADER_CHAR ) ) ); pMutableAttrList->AddAttribute( aNewAttrQName, - OUString::valueOf( cStyleLeaderChar ) ); + OUString( cStyleLeaderChar ) ); } } else @@ -1521,7 +1521,7 @@ void XMLConfigItemTContext_Impl::Characters( const OUString& rChars ) else if (m_bIsCursorY && nPos > 31999) nPos = 31999; - sChars = OUString::valueOf(nPos); + sChars = OUString::number(nPos); } XMLTransformerContext::Characters( sChars ); diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index db8fbe3a3853..a8d817f577ae 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -322,7 +322,7 @@ void XMLPropertiesTContext_Impl::StartElement( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_SPLINES )), - OUString::valueOf( nSplineType )); + OUString::number( nSplineType )); } break; case XML_OPTACTION_INTERVAL_MAJOR: @@ -350,7 +350,7 @@ void XMLPropertiesTContext_Impl::StartElement( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_SYMBOL )), - OUString::valueOf( nSymbolType )); + OUString::number( nSymbolType )); } break; case XML_OPTACTION_SYMBOL_NAME: @@ -394,7 +394,7 @@ void XMLPropertiesTContext_Impl::StartElement( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_SYMBOL )), - OUString::valueOf( nSymbolType )); + OUString::number( nSymbolType )); } break; // #i25616# @@ -532,7 +532,7 @@ void XMLPropertiesTContext_Impl::StartElement( sal_Int32 nValue; ::sax::Converter::convertPercent( nValue, rAttrValue ); const double fValue = ((double)nValue) / 100.0; - pAttrList->AddAttribute( rAttrName, OUString::valueOf( fValue ) ); + pAttrList->AddAttribute( rAttrName, OUString::number( fValue ) ); } break; case XML_ATACTION_OPACITY_FIX: diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 26f30cf27fbb..4f39cc3e93d2 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -341,7 +341,7 @@ XMLTypedPropertiesOOoTContext_Impl GetTransformer().GetNamespaceMap().GetPrefixByKey( nPrefix ); aTmp += OString( rPrefix.getStr(), rPrefix.getLength(), RTL_TEXTENCODING_ASCII_US ); - aTmp += OString::valueOf( ':' ); + aTmp += OString( ':' ); aTmp += OString( rLocalName.getStr(), rLocalName.getLength(), RTL_TEXTENCODING_ASCII_US ); aTmp += OString(", assuming <style:"); @@ -349,7 +349,7 @@ XMLTypedPropertiesOOoTContext_Impl ::xmloff::token::GetXMLToken( aPropTokens[m_aPropTypes[0]] ); aTmp += OString( rName.getStr(), rName.getLength(), RTL_TEXTENCODING_ASCII_US ); - aTmp += OString::valueOf( '>' ); + aTmp += OString( '>' ); OSL_FAIL(aTmp.getStr()); } @@ -667,7 +667,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken( XML_TEXT_LINE_THROUGH_TEXT ) ), - OUString::valueOf( c ) ); + OUString( c ) ); } break; case XML_PTACTION_SPLINES: @@ -990,7 +990,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( if( bMoveProtect && -1 == aProtectAttrValue.indexOf( rPosition ) ) { if( !aProtectAttrValue.isEmpty() ) - aProtectAttrValue += OUString::valueOf( sal_Unicode( ' ' ) ); + aProtectAttrValue += OUString( sal_Unicode( ' ' ) ); aProtectAttrValue += rPosition; } @@ -998,7 +998,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( if( bSizeProtect && -1 == aProtectAttrValue.indexOf( rSize ) ) { if( !aProtectAttrValue.isEmpty() ) - aProtectAttrValue += OUString::valueOf( sal_Unicode( ' ' ) ); + aProtectAttrValue += OUString( sal_Unicode( ' ' ) ); aProtectAttrValue += rSize; } diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 6863a5ea70dd..e93d04adc560 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -1376,7 +1376,7 @@ sal_Bool XMLTransformerBase::ConvertURIToOOo( OUString& rURI, if( bPackage && bSupportPackage ) { - OUString sTmp( OUString::valueOf( sal_Unicode( '#' ) ) ); + OUString sTmp( OUString( sal_Unicode( '#' ) ) ); if( rURI.startsWith( "./" ) ) rURI = rURI.copy( 2 ); sTmp += rURI; |