summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-14 12:50:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-14 17:50:11 +0000
commit899dfbca1755f730dc935ca0d929236f999b9879 (patch)
tree1bd455232191f057c088791145f0d1fb8329ce9d /svl
parente056c1ce10779b42ae17866913cf4db06b86a491 (diff)
elide some temporary OStrings
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index b9055a63d2fc..17d6f108c503 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2426,7 +2426,7 @@ void SvNumberFormatter::ImpAdjustFormatCodeDefault(
if (LocaleDataWrapper::areChecksEnabled())
{
// check the locale data for correctness
- OStringBuffer aMsg;
+ OUStringBuffer aMsg;
sal_Int32 nElem, nShort, nMedium, nLong, nShortDef, nMediumDef, nLongDef;
nShort = nMedium = nLong = nShortDef = nMediumDef = nLongDef = -1;
for ( nElem = 0; nElem < nCnt; nElem++ )
@@ -2471,10 +2471,8 @@ void SvNumberFormatter::ImpAdjustFormatCodeDefault(
aMsg.insert(0, "SvNumberFormatter::ImpAdjustFormatCodeDefault: ");
aMsg.append("\nXML locale data FormatElement formatindex: ");
aMsg.append(static_cast<sal_Int32>(pFormatArr[nElem].Index));
- OUString aUMsg(OStringToOUString(aMsg,
- RTL_TEXTENCODING_ASCII_US));
+ LocaleDataWrapper::outputCheckMessage(xLocaleData->appendLocaleInfo(aMsg));
aMsg.setLength(0);
- LocaleDataWrapper::outputCheckMessage(xLocaleData->appendLocaleInfo(aUMsg));
}
}
if ( nShort != -1 && nShortDef == -1 )
@@ -2487,10 +2485,9 @@ void SvNumberFormatter::ImpAdjustFormatCodeDefault(
{
aMsg.insert(0, "SvNumberFormatter::ImpAdjustFormatCodeDefault: ");
aMsg.append("\nXML locale data FormatElement group of: ");
- OUString aUMsg(OStringToOUString(aMsg, RTL_TEXTENCODING_ASCII_US));
- aMsg.setLength(0);
LocaleDataWrapper::outputCheckMessage(
- xLocaleData->appendLocaleInfo(Concat2View(aUMsg + pFormatArr[0].NameID)));
+ xLocaleData->appendLocaleInfo(Concat2View(aMsg + pFormatArr[0].NameID)));
+ aMsg.setLength(0);
}
}
// find the default (medium preferred, then long) and reset all other defaults