From e593b623dad9456d3452c4c537479596bcd0b00b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 28 Jul 2018 18:01:28 +0200 Subject: loplugin:stringloop in various Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../defaultnumberingprovider/defaultnumberingprovider.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 99cf26fe60cb..813e2451b7bf 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1009,7 +1009,7 @@ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index) if (aSupportedTypes[index].cSymbol) return OUString(aSupportedTypes[index].cSymbol, strlen(aSupportedTypes[index].cSymbol), RTL_TEXTENCODING_UTF8); else { - OUString result; + OUStringBuffer result; Locale aLocale("en", OUString(), OUString()); Sequence aProperties(2); aProperties[0].Name = "NumberingType"; @@ -1017,11 +1017,11 @@ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index) aProperties[1].Name = "Value"; for (sal_Int32 j = 1; j <= 3; j++) { aProperties[1].Value <<= j; - result += makeNumberingString( aProperties, aLocale ); - result += ", "; + result.append( makeNumberingString( aProperties, aLocale ) ); + result.append(", "); } - result += "..."; - return result; + result.append("..."); + return result.makeStringAndClear(); } } -- cgit