summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 12:24:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 18:25:31 +0200
commit04aafba860f613c20e7078d038cc83eb02de0b54 (patch)
tree8153152b87089419bde17313d9ac7b9de6fcce32 /xmloff
parent76c793d2acf66f46e9edcda43d2f4327e8374841 (diff)
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx5
-rw-r--r--xmloff/source/style/xmlnume.cxx3
2 files changed, 2 insertions, 6 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 32312229c1a9..c5bcc2a4db95 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -882,10 +882,7 @@ SvXMLExport::EnsureNamespace(OUString const & i_rNamespace)
// add the namespace to the map and as attribute
mpNamespaceMap->Add( sPrefix, i_rNamespace );
- buf.append( GetXMLToken(XML_XMLNS) );
- buf.append( ':' );
- buf.append( sPrefix );
- AddAttribute( buf.makeStringAndClear(), i_rNamespace );
+ AddAttribute( GetXMLToken(XML_XMLNS) + ":" + sPrefix, i_rNamespace );
}
else
{
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index b676d26e898c..027bef033031 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -242,8 +242,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
// text:level
OUStringBuffer sTmp;
- sTmp.append( nLevel + 1 );
- GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() );
+ GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, OUString::number( nLevel + 1 ) );
// #i110694#: no style-name on list-level-style-image
// #i116149#: neither prefix/suffix
if (NumberingType::BITMAP != eType)