summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 11:43:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 13:06:27 +0200
commit733a6b4f8eac9d9b93d7ea9c605bebab9f5345dd (patch)
tree7040cc7515cd9eef8d0e463c2a124fcf15f79e91 /xmloff/source/draw
parentd79c527c2a599c7821d27cf03b95cb79e2abe685 (diff)
elide some makeStringAndClear() class
when we are passing the result to a string_view, it is pointless. Change-Id: I1e11d2610d70ed49c0b00d0c908829e8f1252bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/animationexport.cxx12
-rw-r--r--xmloff/source/draw/xexptran.cxx5
-rw-r--r--xmloff/source/draw/ximppage.cxx4
3 files changed, 12 insertions, 9 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 62781694e28f..2a48e16c34f5 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1485,7 +1485,8 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
if( !sTmp.isEmpty() )
sTmp.append( ';' );
convertValue( eAttributeName, sTmp2, *pAny );
- sTmp.append( sTmp2.makeStringAndClear() );
+ sTmp.append( sTmp2 );
+ sTmp2.setLength(0);
}
}
else
@@ -1567,7 +1568,8 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
if( !sTmp.isEmpty() )
sTmp.append( ';' );
convertTiming( sTmp2, *pAny );
- sTmp.append( sTmp2.makeStringAndClear() );
+ sTmp.append( sTmp2 );
+ sTmp2.setLength(0);
}
}
else if( auto x = o3tl::tryAccess<double>(rValue) )
@@ -1593,7 +1595,8 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
SvXMLUnitConverter::convertEnum( sTmp2, pEvent->Trigger, aAnimations_EnumMap_EventTrigger );
- sTmp.append( sTmp2.makeStringAndClear() );
+ sTmp.append( sTmp2 );
+ sTmp2.setLength(0);
}
if( pEvent->Offset.hasValue() )
@@ -1603,7 +1606,8 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
if( !sTmp.isEmpty() )
sTmp.append( '+' );
- sTmp.append( sTmp2.makeStringAndClear() );
+ sTmp.append( sTmp2 );
+ sTmp2.setLength(0);
}
}
else
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index c8e7f51bb403..776401fb2840 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -129,11 +129,10 @@ static double Imp_GetDoubleChar(std::u16string_view rStr, sal_Int32& rPos, const
if(!sNumberString.isEmpty())
{
if(bLookForUnits)
- rConv.convertDouble(fRetval, sNumberString.makeStringAndClear());
+ rConv.convertDouble(fRetval, sNumberString);
else
{
- ::sax::Converter::convertDouble(fRetval,
- sNumberString.makeStringAndClear());
+ ::sax::Converter::convertDouble(fRetval, sNumberString);
}
}
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index c37b2de99f6c..3d5cdf006f45 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -202,11 +202,11 @@ void DrawAnnotationContext::endFastElement(sal_Int32)
mxAnnotation->setInitials( maInitialsBuffer.makeStringAndClear() );
util::DateTime aDateTime;
- if (::sax::Converter::parseDateTime(aDateTime,
- maDateBuffer.makeStringAndClear()))
+ if (::sax::Converter::parseDateTime(aDateTime, maDateBuffer))
{
mxAnnotation->setDateTime(aDateTime);
}
+ maDateBuffer.setLength(0);
}
}