summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /cui/source/options
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/optlingu.cxx8
-rw-r--r--cui/source/options/treeopt.cxx16
2 files changed, 12 insertions, 12 deletions
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 1b646fc51043..865f56e16840 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -67,10 +67,10 @@ using namespace css::uno;
using namespace css::linguistic2;
using namespace css::beans;
-const char cSpell[] = SN_SPELLCHECKER;
-const char cGrammar[] = SN_GRAMMARCHECKER;
-const char cHyph[] = SN_HYPHENATOR;
-const char cThes[] = SN_THESAURUS;
+constexpr OUStringLiteral cSpell(SN_SPELLCHECKER);
+constexpr OUStringLiteral cGrammar(SN_GRAMMARCHECKER);
+constexpr OUStringLiteral cHyph(SN_HYPHENATOR);
+constexpr OUStringLiteral cThes(SN_THESAURUS);
// static ----------------------------------------------------------------
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 6f63828c173f..e098040e7c7c 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -171,7 +171,7 @@ static void setGroupName( std::u16string_view rModule, const OUString& rGroupNam
}
}
-static OUString getGroupName( const OUString& rModule, bool bForced )
+static OUString getGroupName( std::u16string_view rModule, bool bForced )
{
OUString sGroupName;
for (const ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
@@ -185,19 +185,19 @@ static OUString getGroupName( const OUString& rModule, bool bForced )
if ( sGroupName.isEmpty() && bForced )
{
- if ( rModule == "Writer" )
+ if ( rModule == u"Writer" )
sGroupName = CuiResId(SID_SW_EDITOPTIONS_RES[0].first);
- else if ( rModule == "WriterWeb" )
+ else if ( rModule == u"WriterWeb" )
sGroupName = CuiResId(SID_SW_ONLINEOPTIONS_RES[0].first);
- else if ( rModule == "Calc" )
+ else if ( rModule == u"Calc" )
sGroupName = CuiResId(SID_SC_EDITOPTIONS_RES[0].first);
- else if ( rModule == "Impress" )
+ else if ( rModule == u"Impress" )
sGroupName = CuiResId(SID_SD_EDITOPTIONS_RES[0].first);
- else if ( rModule == "Draw" )
+ else if ( rModule == u"Draw" )
sGroupName = CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first);
- else if ( rModule == "Math" )
+ else if ( rModule == u"Math" )
sGroupName = CuiResId(SID_SM_EDITOPTIONS_RES[0].first);
- else if ( rModule == "Base" )
+ else if ( rModule == u"Base" )
sGroupName = CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first);
}
return sGroupName;