summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlexppr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-23 16:07:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-27 14:07:56 +0200
commitc7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch)
tree4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /xmloff/source/style/xmlexppr.cxx
parent99482297c7dd497e41fad2e7193759043e305101 (diff)
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/style/xmlexppr.cxx')
-rw-r--r--xmloff/source/style/xmlexppr.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 291c2ee36041..bd3ee809ec1a 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -1005,7 +1005,7 @@ void SvXMLExportPropertyMapper::_exportXML(
sPrefix = pNamespaceMap->GetPrefixByKey( nKey );
}
// In any case, the attribute name has to be adapted.
- sNameBuffer.append(sPrefix).append(":").append(rAttribName.subView(nColonPos+1));
+ sNameBuffer.append(sPrefix + ":" + rAttribName.subView(nColonPos+1));
sAttribName = sNameBuffer.makeStringAndClear();
}
@@ -1017,9 +1017,8 @@ void SvXMLExportPropertyMapper::_exportXML(
pNamespaceMap = pNewNamespaceMap.get();
}
pNewNamespaceMap->Add( sPrefix, sNamespace );
- sNameBuffer.append( GetXMLToken(XML_XMLNS) ).append( ":" ).append( sPrefix );
- rAttrList.AddAttribute( sNameBuffer.makeStringAndClear(),
- sNamespace );
+ OUString sAttr = GetXMLToken(XML_XMLNS) + ":" + sPrefix;
+ rAttrList.AddAttribute( sAttr, sNamespace );
}
}
}