summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-08-21 15:07:31 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-21 15:10:35 +0200
commit64b993e046f23baaacaff1572b7d2a816588b5ef (patch)
tree237dce36a1d4787d168a0520839f6aab22500487 /oox
parent75f41baab6ce75786a91fe461835ee16a23ec18e (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 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx18
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx4
-rw-r--r--oox/source/dump/dumperbase.cxx6
-rw-r--r--oox/source/dump/oledumper.cxx6
-rw-r--r--oox/source/export/drawingml.cxx6
-rw-r--r--oox/source/export/shapes.cxx4
-rw-r--r--oox/source/export/vmlexport.cxx16
-rw-r--r--oox/source/helper/modelobjecthelper.cxx2
-rw-r--r--oox/source/ole/oleobjecthelper.cxx2
-rw-r--r--oox/source/ppt/commontimenodecontext.cxx2
-rw-r--r--oox/source/ppt/timenode.cxx2
-rw-r--r--oox/source/vml/vmldrawing.cxx2
-rw-r--r--oox/source/vml/vmlshape.cxx2
-rw-r--r--oox/source/vml/vmlshapecontext.cxx2
15 files changed, 38 insertions, 38 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index c7cfe1d8723f..0b723a4a3c69 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -461,7 +461,7 @@ static void
writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue )
{
pDoc->startElement( nXmlElement, FSEND );
- pDoc->write( OUString::valueOf( nValue ) );
+ pDoc->write( OUString::number( nValue ) );
pDoc->endElement( nXmlElement );
}
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 526ea26308c2..115d3fbe3d6a 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -99,13 +99,13 @@ OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
{
double fValue = 0.0;
if ( rParameter.Value >>= fValue )
- aRet = OUString::valueOf( fValue );
+ aRet = OUString::number( fValue );
}
else
{
sal_Int32 nValue = 0;
if ( rParameter.Value >>= nValue )
- aRet = OUString::valueOf( nValue );
+ aRet = OUString::number( nValue );
}
}
break;
@@ -117,7 +117,7 @@ OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
if ( rParameter.Value >>= nFormulaIndex )
{
aRet = "?"
- + OUString::valueOf( nFormulaIndex )
+ + OUString::number( nFormulaIndex )
+ " ";
}
}
@@ -135,7 +135,7 @@ OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
if ( rParameter.Value >>= nAdjustmentIndex )
{
aRet = "$"
- + OUString::valueOf( nAdjustmentIndex )
+ + OUString::number( nAdjustmentIndex )
+ " ";
}
}
@@ -281,7 +281,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
CustomShapeGuide aGuide;
aGuide.maName = rValue;
- aGuide.maFormula = "logheight/" + OUString::valueOf( nIntVal );
+ aGuide.maFormula = "logheight/" + OUString::number( nIntVal );
aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
@@ -332,7 +332,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
CustomShapeGuide aGuide;
aGuide.maName = rValue;
- aGuide.maFormula = "min(logwidth,logheight)/" + OUString::valueOf( nIntVal );
+ aGuide.maFormula = "min(logwidth,logheight)/" + OUString::number( nIntVal );
aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
@@ -379,7 +379,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
CustomShapeGuide aGuide;
aGuide.maName = rValue;
- aGuide.maFormula = "logwidth/" + OUString::valueOf( nIntVal );
+ aGuide.maFormula = "logwidth/" + OUString::number( nIntVal );
aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
@@ -1086,7 +1086,7 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken,
sal_Int32 nArcNum = mrCustomShapeProperties.getArcNum();
// start angle
- aGuide.maName = "arctosa" + OUString::valueOf( nArcNum );
+ aGuide.maName = "arctosa" + OUString::number( nArcNum );
aGuide.maFormula = "("
+ GetFormulaParameter( GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_stAng ).get() ) )
+ ")/60000.0";
@@ -1094,7 +1094,7 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken,
aAngles.First.Type = EnhancedCustomShapeParameterType::EQUATION;
// swing angle
- aGuide.maName = "arctosw" + OUString::valueOf( nArcNum );
+ aGuide.maName = "arctosw" + OUString::number( nArcNum );
aGuide.maFormula = "("
+ GetFormulaParameter( GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_swAng ).get() ) )
+ ")/60000.0";
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index c84c17171239..036849b4878d 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -126,9 +126,9 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent,
const OUString sNotesSlide( "notesSlide" );
const OUString aSlideType( sHref.copy( 0, nIndex2 ) );
if ( aSlideType.match( sSlide ) )
- sURL = OUString( "#Slide " ).concat( OUString::valueOf( nPageNumber ) );
+ sURL = OUString( "#Slide " ).concat( OUString::number( nPageNumber ) );
else if ( aSlideType.match( sNotesSlide ) )
- sURL = OUString( "#Notes " ).concat( OUString::valueOf( nPageNumber ) );
+ sURL = OUString( "#Notes " ).concat( OUString::number( nPageNumber ) );
// else: todo for other types such as notesMaster or slideMaster as they can't be referenced easily
}
}
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 6f1c744fc1bb..cd2920411c2d 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -246,7 +246,7 @@ void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt32 nData, sal_Int32
void StringHelper::appendDec( OUStringBuffer& rStr, sal_Int32 nData, sal_Int32 nWidth, sal_Unicode cFill )
{
- appendString( rStr, OUString::valueOf( nData ), nWidth, cFill );
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
}
void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt64 nData, sal_Int32 nWidth, sal_Unicode cFill )
@@ -256,14 +256,14 @@ void StringHelper::appendDec( OUStringBuffer& rStr, sal_uInt64 nData, sal_Int32
will be written separately. */
OUStringBuffer aBuffer;
if( nData > 9 )
- aBuffer.append( OUString::valueOf( static_cast< sal_Int64 >( nData / 10 ) ) );
+ aBuffer.append( OUString::number( nData / 10 ) );
aBuffer.append( static_cast< sal_Unicode >( '0' + (nData % 10) ) );
appendString( rStr, aBuffer.makeStringAndClear(), nWidth, cFill );
}
void StringHelper::appendDec( OUStringBuffer& rStr, sal_Int64 nData, sal_Int32 nWidth, sal_Unicode cFill )
{
- appendString( rStr, OUString::valueOf( nData ), nWidth, cFill );
+ appendString( rStr, OUString::number( nData ), nWidth, cFill );
}
void StringHelper::appendDec( OUStringBuffer& rStr, double fData, sal_Int32 nWidth, sal_Unicode cFill )
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index bd38cd4dc64b..59ce8a6652f7 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -59,13 +59,13 @@ sal_Int32 OleInputObjectBase::dumpStdClipboardFormat( const String& rName )
OUString OleInputObjectBase::dumpAnsiString32OrStdClip( const String& rName )
{
sal_Int32 nLen = mxStrm->readInt32();
- return (nLen < 0) ? OUString::valueOf( dumpStdClipboardFormat( rName ) ) : dumpCharArray( rName, nLen, RTL_TEXTENCODING_MS_1252 );
+ return (nLen < 0) ? OUString::number( dumpStdClipboardFormat( rName ) ) : dumpCharArray( rName, nLen, RTL_TEXTENCODING_MS_1252 );
}
OUString OleInputObjectBase::dumpUniString32OrStdClip( const String& rName )
{
sal_Int32 nLen = mxStrm->readInt32();
- return (nLen < 0) ? OUString::valueOf( dumpStdClipboardFormat( rName ) ) : dumpUnicodeArray( rName, nLen );
+ return (nLen < 0) ? OUString::number( dumpStdClipboardFormat( rName ) ) : dumpUnicodeArray( rName, nLen );
}
void OleInputObjectBase::writeOleColorItem( const String& rName, sal_uInt32 nColor )
@@ -1944,7 +1944,7 @@ bool VbaContainerStorageObject::isFormStorage( const OUString& rStrgPath ) const
if( (aId.getLength() == 2) && (aId[ 0 ] == '0') )
aId = aId.copy( 1 );
sal_Int32 nId = aId.toInt32();
- if( (nId > 0) && (OUString::valueOf( nId ) == aId) )
+ if( (nId > 0) && (OUString::number( nId ) == aId) )
for( VbaFormSiteInfoVector::const_iterator aIt = maFormData.maSiteInfos.begin(), aEnd = maFormData.maSiteInfos.end(); aIt != aEnd; ++aIt )
if( aIt->mnId == nId )
return true;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 7d08cabed790..db4b534e6d08 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -147,7 +147,7 @@ bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropSet, Refere
void DrawingML::WriteColor( sal_uInt32 nColor )
{
- OString sColor = OString::valueOf( ( sal_Int64 ) nColor, 16 );
+ OString sColor = OString::number( nColor, 16 );
if( sColor.getLength() < 6 ) {
OStringBuffer sBuf( "0" );
int remains = 5 - sColor.getLength();
@@ -1371,8 +1371,8 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, sal_Bo
for( sal_Int32 i=0; i < nLength; i++ )
if( EscherPropertyContainer::GetAdjustmentValue( aAdjustmentSeq[ i ], i, nAdjustmentsWhichNeedsToBeConverted, nValue ) )
mpFS->singleElementNS( XML_a, XML_gd,
- XML_name, aAdjustmentSeq[ i ].Name.getLength() > 0 ? USS(aAdjustmentSeq[ i ].Name) : (nLength > 1 ? OString( "adj" + OString::valueOf( i + 1 ) ).getStr() : "adj"),
- XML_fmla, OString("val " + OString::valueOf( nValue )).getStr(),
+ XML_name, aAdjustmentSeq[ i ].Name.getLength() > 0 ? USS(aAdjustmentSeq[ i ].Name) : (nLength > 1 ? OString( "adj" + OString::number( i + 1 ) ).getStr() : "adj"),
+ XML_fmla, OString("val " + OString::number( nValue )).getStr(),
FSEND );
}
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 74fa5b945357..968d07953acd 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -107,7 +107,7 @@ using ::com::sun::star::sheet::XSpreadsheetDocument;
using ::comphelper::MediaDescriptor;
using ::sax_fastparser::FSHelperPtr;
-#define IDS(x) OString(OStringLiteral(#x " ") + OString::valueOf( mnShapeIdMax++ )).getStr()
+#define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr()
struct CustomShapeTypeTranslationTable
{
@@ -846,7 +846,7 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, bHaveName ? USS( sName ) : OString( "Picture " + OString::valueOf( mnPictureIdMax++ )).getStr(),
+ XML_name, bHaveName ? USS( sName ) : OString( "Picture " + OString::number( mnPictureIdMax++ )).getStr(),
XML_descr, bHaveDesc ? USS( sDescr ) : NULL,
FSEND );
// OOXTODO: //cNvPr children: XML_extLst, XML_hlinkClick, XML_hlinkHover
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index cba9ea17b663..0c24040f0b91 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -816,17 +816,17 @@ void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
if ( mnGroupLevel == 1 )
{
const OString aPt( "pt" );
- aLeft = OString::valueOf( double( rRectangle.Left() ) / 20 ) + aPt;
- aTop = OString::valueOf( double( rRectangle.Top() ) / 20 ) + aPt;
- aRight = OString::valueOf( double( rRectangle.Right() ) / 20 ) + aPt;
- aBottom = OString::valueOf( double( rRectangle.Bottom() ) / 20 ) + aPt;
+ aLeft = OString::number( double( rRectangle.Left() ) / 20 ) + aPt;
+ aTop = OString::number( double( rRectangle.Top() ) / 20 ) + aPt;
+ aRight = OString::number( double( rRectangle.Right() ) / 20 ) + aPt;
+ aBottom = OString::number( double( rRectangle.Bottom() ) / 20 ) + aPt;
}
else
{
- aLeft = OString::valueOf( rRectangle.Left() );
- aTop = OString::valueOf( rRectangle.Top() );
- aRight = OString::valueOf( rRectangle.Right() );
- aBottom = OString::valueOf( rRectangle.Bottom() );
+ aLeft = OString::number( rRectangle.Left() );
+ aTop = OString::number( rRectangle.Top() );
+ aRight = OString::number( rRectangle.Right() );
+ aBottom = OString::number( rRectangle.Bottom() );
}
m_pShapeAttrList->add( XML_from,
diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx
index 7d3954710974..eec597ada47c 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -62,7 +62,7 @@ OUString ObjectContainer::insertObject( const OUString& rObjName, const Any& rOb
if( mxContainer.is() )
{
if( bInsertByUnusedName )
- return ContainerHelper::insertByUnusedName( mxContainer, rObjName + OUString::valueOf( ++mnIndex ), ' ', rObj );
+ return ContainerHelper::insertByUnusedName( mxContainer, rObjName + OUString::number( ++mnIndex ), ' ', rObj );
if( ContainerHelper::insertByName( mxContainer, rObjName, rObj ) )
return rObjName;
}
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
index 9d089607517e..9f3f27da30c6 100644
--- a/oox/source/ole/oleobjecthelper.cxx
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -95,7 +95,7 @@ bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInf
// embedded OLE object - import the embedded data
if( rOleObject.maEmbeddedData.hasElements() && mxResolver.is() ) try
{
- OUString aObjectId = "Obj" + OUString::valueOf( mnObjectId++ );
+ OUString aObjectId = "Obj" + OUString::number( mnObjectId++ );
Reference< XNameAccess > xResolverNA( mxResolver, UNO_QUERY_THROW );
Reference< XOutputStream > xOutStrm( xResolverNA->getByName( aObjectId ), UNO_QUERY_THROW );
diff --git a/oox/source/ppt/commontimenodecontext.cxx b/oox/source/ppt/commontimenodecontext.cxx
index ddc4c14aeb3a..c551a74250a7 100644
--- a/oox/source/ppt/commontimenodecontext.cxx
+++ b/oox/source/ppt/commontimenodecontext.cxx
@@ -358,7 +358,7 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId
if( pStr )
return OUString::createFromAscii( pStr );
else
- return OUString::valueOf( nPresetSubType );
+ return OUString::number( nPresetSubType );
}
// END
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index 309d3bf0b2fa..ea483c1137f3 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -595,7 +595,7 @@ namespace oox { namespace ppt {
void TimeNode::setId( sal_Int32 nId )
{
- msId = OUString::valueOf(nId);
+ msId = OUString::number(nId);
}
void TimeNode::setTo( const Any & aTo )
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index 89972853dd4f..f76777d6c12c 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -58,7 +58,7 @@ OUString lclGetShapeId( sal_Int32 nShapeId )
{
// identifier consists of a literal NUL character, a lowercase 's', and the id
sal_Unicode aStr[2] = { '\0', 's' };
- return OUString( aStr, 2 ) + OUString::valueOf( nShapeId );
+ return OUString( aStr, 2 ) + OUString::number( nShapeId );
}
/** Returns the numeric VML shape identifier from its textual representation. */
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 47d8ceb65727..40281cf545df 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -858,7 +858,7 @@ Reference< XShape > CustomShape::implConvertAndInsert( const Reference< XShapes
{
// create the custom shape geometry
Reference< XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY_THROW );
- xDefaulter->createCustomShapeDefaults( OUString::valueOf( getShapeType() ) );
+ xDefaulter->createCustomShapeDefaults( OUString::number( getShapeType() ) );
// convert common properties
convertShapeProperties( xShape );
}
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 48340d55c8f1..be12b954224e 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -298,7 +298,7 @@ ShapeTypeContext::ShapeTypeContext( ContextHandler2Helper& rParent, ShapeType& r
// - given width is used only if explicit o:hrpct="0" is given
OUString hrpct = rAttribs.getString( O_TOKEN( hrpct ), "1000" );
if( hrpct != "0" )
- mrTypeModel.maWidth = OUString::valueOf( hrpct.toInt32() / 10 ) + "%";
+ mrTypeModel.maWidth = OUString::number( hrpct.toInt32() / 10 ) + "%";
}
// stroke settings (may be overridden by v:stroke element later)