diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 10:23:28 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 12:46:01 +0200 |
commit | 3d236177be255b2027a997bfc12fe0833ca9a2f7 (patch) | |
tree | d67582e355bccb43cf133c1857f5dd6136be2f35 /svl | |
parent | 6c65c62c26a8aa4d04466545f8f04ec86b797012 (diff) |
Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.
Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/lockfilecommon.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/msodocumentlockfile.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx index dc8b26d455f1..0a867c5dd261 100644 --- a/svl/source/misc/lockfilecommon.cxx +++ b/svl/source/misc/lockfilecommon.cxx @@ -74,7 +74,7 @@ OUString LockFileCommon::GenerateOwnLockFileURL( std::u16string_view aOrigURL, std::u16string_view aPrefix) { INetURLObject aURL = ResolveLinks(INetURLObject(aOrigURL)); - aURL.setName(OUStringConcatenation(aPrefix + aURL.GetLastName() + "%23" /*'#'*/)); + aURL.setName(Concat2View(aPrefix + aURL.GetLastName() + "%23" /*'#'*/)); return aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); } diff --git a/svl/source/misc/msodocumentlockfile.cxx b/svl/source/misc/msodocumentlockfile.cxx index ce1bf287a90c..26192c220371 100644 --- a/svl/source/misc/msodocumentlockfile.cxx +++ b/svl/source/misc/msodocumentlockfile.cxx @@ -58,7 +58,7 @@ OUString GenerateMSOLockFileURL(std::u16string_view aOrigURL) else if (nFileNameLength == 7) sFileName = sFileName.copy(1); } - aURL.setName(OUStringConcatenation("~$" + sFileName)); + aURL.setName(Concat2View("~$" + sFileName)); return aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); } } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 59c94be3a305..cfbce503941a 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -2480,7 +2480,7 @@ void SvNumberFormatter::ImpAdjustFormatCodeDefault( OUString aUMsg(OStringToOUString(aMsg, RTL_TEXTENCODING_ASCII_US)); aMsg.setLength(0); LocaleDataWrapper::outputCheckMessage( - xLocaleData->appendLocaleInfo(OUStringConcatenation(aUMsg + pFormatArr[0].NameID))); + xLocaleData->appendLocaleInfo(Concat2View(aUMsg + pFormatArr[0].NameID))); } } // find the default (medium preferred, then long) and reset all other defaults diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 80b314bc5208..39883619f4d0 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -707,7 +707,7 @@ OUString SvNumberformat::ImpObtainCalendarAndNumerals( OUStringBuffer& rString, if ( nNumeralID >= 0x02 && nNumeralID <= 0x13 ) nNatNum = 1; if ( nNatNum ) - rString.insert( nPos, OUStringConcatenation("[NatNum"+OUString::number(nNatNum)+"]")); + rString.insert( nPos, Concat2View("[NatNum"+OUString::number(nNatNum)+"]")); return sCalendar; } @@ -5661,7 +5661,7 @@ OUString SvNumberformat::impTransliterateImpl(const OUString& rStr, sal_Int32 nField = -1; do { - nField = rNum.GetParams().indexOf(OUStringConcatenation(rKeywords[nDateKey] + "="), ++nField); + nField = rNum.GetParams().indexOf(Concat2View(rKeywords[nDateKey] + "="), ++nField); } while (nField != -1 && nField != 0 && (rNum.GetParams()[nField - 1] != ',' && |