summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-29 12:20:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-04 15:29:54 +0100
commitc34e8bd71384326184baac7dea31f7ddf9bae6bc (patch)
tree0914b24023030781b3a74a768be9df4d2873b4b9 /unotools
parenta1cdde17aa27902ee162d5b40860f05c592c4de8 (diff)
loplugin:stringviewparam: operator +=
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/resmgr.cxx2
-rw-r--r--unotools/source/misc/fontdefs.cxx6
2 files changed, 5 insertions, 3 deletions
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index ef5b83cf06bc..caee3ecf1818 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -119,7 +119,7 @@ namespace Translate
std::locale Create(const char* pPrefixName, const LanguageTag& rLocale)
{
static std::unordered_map<OString, std::locale> aCache;
- OString sIdentifier = rLocale.getGlibcLocaleString(".UTF-8").toUtf8();
+ OString sIdentifier = rLocale.getGlibcLocaleString(u".UTF-8").toUtf8();
OString sUnique = sIdentifier + pPrefixName;
auto aFind = aCache.find(sUnique);
if (aFind != aCache.end())
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index 59830cb1e1b0..e470575a015b 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -20,6 +20,8 @@
#include <unotools/fontdefs.hxx>
#include <unotools/fontcfg.hxx>
#include <rtl/ustrbuf.hxx>
+
+#include <string_view>
#include <unordered_map>
sal_Unicode const aBatang[] = { 0xBC14, 0xD0D5, 0 };
@@ -489,7 +491,7 @@ static bool ImplIsFontToken( const OUString& rName, std::u16string_view rToken )
return false;
}
-static void ImplAppendFontToken( OUString& rName, const OUString& rNewToken )
+static void ImplAppendFontToken( OUString& rName, std::u16string_view rNewToken )
{
if ( !rName.isEmpty() )
{
@@ -498,7 +500,7 @@ static void ImplAppendFontToken( OUString& rName, const OUString& rNewToken )
rName += rNewToken;
}
-void AddTokenFontName( OUString& rName, const OUString& rNewToken )
+void AddTokenFontName( OUString& rName, std::u16string_view rNewToken )
{
if ( !ImplIsFontToken( rName, rNewToken ) )
ImplAppendFontToken( rName, rNewToken );