summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-21 13:48:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-22 21:42:14 +0200
commit75997f13ee3a71d6c994392264b0190bd7bb6756 (patch)
tree4dc35a2e62e41d4b1f7953367419ff3fb072635f /xmloff
parentb546af03ab9e371c70ce72562bc0a492972a8585 (diff)
no need to create temporaries when appending number to O[U]StringBuffer
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/animationexport.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx6
-rw-r--r--xmloff/source/forms/propertyexport.cxx2
-rw-r--r--xmloff/source/style/impastpl.cxx8
-rw-r--r--xmloff/source/style/xmlbahdl.cxx6
-rw-r--r--xmloff/source/xforms/xformsexport.cxx6
6 files changed, 15 insertions, 15 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 339d3b268768..f003717193a2 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1207,7 +1207,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
if( !sTmp.isEmpty() )
sTmp.append( ';' );
- sTmp.append( OUString::number(rPair.Time) ).append( "," ).append( OUString::number(rPair.Progress) );
+ sTmp.append(rPair.Time).append( "," ).append(rPair.Progress);
}
mxExport->AddAttribute( XML_NAMESPACE_SMIL, XML_KEYSPLINES, sTmp.makeStringAndClear() );
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 37e9258f2861..37d49afd1f12 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3799,14 +3799,14 @@ static void ExportParameter( OUStringBuffer& rStrBuffer, const css::drawing::Enh
{
case css::drawing::EnhancedCustomShapeParameterType::EQUATION :
{
- rStrBuffer.append( "?f" ).append(OUString::number( nValue ) );
+ rStrBuffer.append( "?f" ).append( nValue );
}
break;
case css::drawing::EnhancedCustomShapeParameterType::ADJUSTMENT :
{
rStrBuffer.append( '$' );
- rStrBuffer.append( OUString::number( nValue ) );
+ rStrBuffer.append( nValue );
}
break;
@@ -3835,7 +3835,7 @@ static void ExportParameter( OUStringBuffer& rStrBuffer, const css::drawing::Enh
case css::drawing::EnhancedCustomShapeParameterType::LOGHEIGHT :
rStrBuffer.append( GetXMLToken( XML_LOGHEIGHT ) ); break;
default :
- rStrBuffer.append( OUString::number( nValue ) );
+ rStrBuffer.append( nValue );
}
}
}
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 74ea521322c6..de9ee4ec27a4 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -547,7 +547,7 @@ namespace xmloff
aBuffer.append(getINT64(_rValue));
break;
case TypeClass_UNSIGNED_HYPER:
- aBuffer.append(OUString::number(_rValue.get<sal_uInt64>()));
+ aBuffer.append(static_cast<sal_Int64>(_rValue.get<sal_uInt64>()));
break;
case TypeClass_ENUM:
{
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index 3ad50034cb13..34dc16a32cc0 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -174,7 +174,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
if (sXMLName.isEmpty())
continue;
aStemBuffer.append("-");
- aStemBuffer.append(OUString::number(rFamilyData.mxMapper->getPropertySetMapper()->GetEntryNameSpace(rState.mnIndex)));
+ aStemBuffer.append(static_cast<sal_Int32>(rFamilyData.mxMapper->getPropertySetMapper()->GetEntryNameSpace(rState.mnIndex)));
aStemBuffer.append(":");
aStemBuffer.append(sXMLName);
aStemBuffer.append("=");
@@ -186,7 +186,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
// styles always come out in the same order. Will see if this works.
aStemBuffer.append("-z");
static sal_Int32 nCounter = 0;
- aStemBuffer.append(OUString::number(nCounter++));
+ aStemBuffer.append(nCounter++));
#endif
// create a name that hasn't been used before. The created name has not
@@ -204,7 +204,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
rFamilyData.mnName++;
aTry.append( aStemBuffer );
aTry.append( "-" );
- aTry.append( OUString::number( rFamilyData.mnName ) );
+ aTry.append( static_cast<sal_Int64>(rFamilyData.mnName) );
msName = aTry.makeStringAndClear();
}
rFamilyData.maNameSet.insert(msName);
@@ -218,7 +218,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
{
rFamilyData.mnName++;
sBuffer.append( rFamilyData.maStrPrefix );
- sBuffer.append( OUString::number( rFamilyData.mnName ) );
+ sBuffer.append( static_cast<sal_Int64>(rFamilyData.mnName) );
msName = sBuffer.makeStringAndClear();
}
while (rFamilyData.maNameSet.find(msName) != rFamilyData.maNameSet.end() || rFamilyData.maReservedNameSet.find(msName) != rFamilyData.maReservedNameSet.end());
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index 0a728467e4ba..8bb6352408b1 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -482,9 +482,9 @@ bool XMLColorPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, cons
Sequence< double > aHSL;
if( (rValue >>= aHSL) && (aHSL.getLength() == 3) )
{
- aOut.append( "hsl(" ).append( OUString::number(aHSL[0]) ).append( "," )
- .append( OUString::number(aHSL[1] * 100.0) ).append( "%," )
- .append( OUString::number(aHSL[2] * 100.0) ).append( "%)" );
+ aOut.append( "hsl(" ).append(aHSL[0]).append( "," )
+ .append(aHSL[1] * 100.0).append( "%," )
+ .append(aHSL[2] * 100.0).append( "%)" );
rStrExpValue = aOut.makeStringAndClear();
bRet = true;
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index 7641e9ec3fad..d875d6545f7f 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -659,9 +659,9 @@ OUString xforms_bool( const Any& rAny )
void xforms_formatDate( OUStringBuffer& aBuffer, const util::Date& rDate )
{
- aBuffer.append(OUString::number(static_cast<sal_Int32>( rDate.Year ) ))
- .append("-").append(OUString::number(static_cast<sal_Int32>( rDate.Month )))
- .append("-").append(OUString::number(static_cast<sal_Int32>( rDate.Day )));
+ aBuffer.append(static_cast<sal_Int32>( rDate.Year ))
+ .append("-").append(static_cast<sal_Int32>( rDate.Month ))
+ .append("-").append(static_cast<sal_Int32>( rDate.Day ));
}
void xforms_formatTime( OUStringBuffer& aBuffer, const css::util::Time& rTime )