summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-26 16:16:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-27 13:10:44 +0200
commite266d448f45348f27f8291ea5d0542747d7c8168 (patch)
tree0d6d14e94d9bf25aeeb4ef21630ee72c10681645 /svtools
parent05c6cdb144d1732ca51d463845fa6ddef7c08265 (diff)
loplugin:stringstatic look for more strings
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/langhelp.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
index 793e3f7d0e10..afc6830fde54 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -16,6 +16,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <officecfg/Office/Common.hxx>
#include <officecfg/System.hxx>
+#include <o3tl/string_view.hxx>
#include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
#include <rtl/ustring.hxx>
#include <svtools/langhelp.hxx>
@@ -117,12 +118,12 @@ OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString
{
// Get the list of langpacks that this build was configured to include
std::vector<OUString> aPackages;
- OUString const sAvailableLocales(WITH_LANG);
+ static constexpr std::u16string_view sAvailableLocales(u"" WITH_LANG);
std::vector<OUString> aAvailable;
sal_Int32 nIndex = 0;
do
{
- aAvailable.emplace_back(sAvailableLocales.getToken(0, ' ', nIndex));
+ aAvailable.emplace_back(o3tl::getToken(sAvailableLocales, 0, ' ', nIndex));
}
while (nIndex >= 0);
// See which one matches the desired ui locale