summaryrefslogtreecommitdiff
path: root/svl/source
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 /svl/source
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 'svl/source')
-rw-r--r--svl/source/misc/urihelper.cxx8
-rw-r--r--svl/source/numbers/zforlist.cxx4
-rw-r--r--svl/source/numbers/zformat.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 43a4cd500e1b..f5ac858474c2 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -786,16 +786,16 @@ OUString URIHelper::resolveIdnaHost(OUString const & url) {
return url;
}
OUStringBuffer buf(uri->getScheme());
- buf.append("://").append(auth.subView(0, hostStart));
+ buf.append(OUString::Concat("://") + auth.subView(0, hostStart));
buf.append(
reinterpret_cast<sal_Unicode const *>(ascii.getBuffer()),
ascii.length());
- buf.append(auth.subView(hostEnd)).append(uri->getPath());
+ buf.append(auth.subView(hostEnd) + uri->getPath());
if (uri->hasQuery()) {
- buf.append('?').append(uri->getQuery());
+ buf.append("?" + uri->getQuery());
}
if (uri->hasFragment()) {
- buf.append('#').append(uri->getFragment());
+ buf.append("#" + uri->getFragment());
}
return buf.makeStringAndClear();
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 85ee27638587..a3207d20831b 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -4335,7 +4335,7 @@ OUString NfCurrencyEntry::BuildSymbolString(bool bBank,
if ( aSymbol.indexOf( '-' ) >= 0 ||
aSymbol.indexOf( ']' ) >= 0)
{
- aBuf.append('"').append(aSymbol).append('"');
+ aBuf.append("\"" + aSymbol + "\"");
}
else
{
@@ -4355,7 +4355,7 @@ OUString NfCurrencyEntry::Impl_BuildFormatStringNumChars( const LocaleDataWrappe
sal_uInt16 nDecimalFormat) const
{
OUStringBuffer aBuf;
- aBuf.append('#').append(rLoc.getNumThousandSep()).append("##0");
+ aBuf.append("#" + rLoc.getNumThousandSep() + "##0");
if (nDecimalFormat && nDigits)
{
aBuf.append(rLoc.getNumDecimalSep());
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ade0dac4768f..de73817ff474 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5136,7 +5136,7 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
// lcl_insertLCID() below, in practice as long as it is used for system
// time and date modifiers it shouldn't (i.e. there is no calendar or
// numeral specified as well).
- aStr.append("[$-").append( maLocale.generateCode()).append(']');
+ aStr.append("[$-" + maLocale.generateCode() + "]");
}
bool bDefault[4];
// 1 subformat matches all if no condition specified,