summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-07-30 17:46:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-07-31 12:53:03 +0200
commited96bbd34403277abbe37c06f0e74a3c09f54979 (patch)
treea29da80678275481d84776d0a80cb605ffc0c80c /unotools
parente76e9e5d7299d88137d57aefe174a84474e2909c (diff)
Improved loplugin:stringconstant (now that GCC 7 supports it): unotools
Change-Id: Idc40b72de04ee17dcc60913cc5f81f5f69dd57e9 Reviewed-on: https://gerrit.libreoffice.org/76631 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/fontcfg.cxx14
-rw-r--r--unotools/source/config/moduleoptions.cxx20
-rw-r--r--unotools/source/i18n/resmgr.cxx2
3 files changed, 18 insertions, 18 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 50c45600d24b..2b1d3f24fb1f 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -254,15 +254,15 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const LanguageTag& rLan
// optimize font list for some locales, as long as Andale Sans UI does not support them
if( aLanguage == "ar" || aLanguage == "he" || aLanguage == "iw" )
{
- return OUString(FALLBACKFONT_UI_SANS_ARABIC);
+ return FALLBACKFONT_UI_SANS_ARABIC;
}
else if ( aLanguage == "th" )
{
- return OUString(FALLBACKFONT_UI_SANS_THAI);
+ return FALLBACKFONT_UI_SANS_THAI;
}
else if ( aLanguage == "ko" )
{
- return OUString(FALLBACKFONT_UI_SANS_KOREAN);
+ return FALLBACKFONT_UI_SANS_KOREAN;
}
else if( aLanguage == "cs" ||
aLanguage == "hu" ||
@@ -274,18 +274,18 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const LanguageTag& rLan
aLanguage == "sl" ||
aLanguage == "sb")
{
- return OUString(FALLBACKFONT_UI_SANS_LATIN2);
+ return FALLBACKFONT_UI_SANS_LATIN2;
}
else
{
const Locale& aLocale( aLanguageTag.getLocale());
if (MsLangId::isTraditionalChinese(aLocale))
- return OUString(FALLBACKFONT_UI_SANS_CHINTRD);
+ return FALLBACKFONT_UI_SANS_CHINTRD;
else if (MsLangId::isSimplifiedChinese(aLocale))
- return OUString(FALLBACKFONT_UI_SANS_CHINSIM);
+ return FALLBACKFONT_UI_SANS_CHINSIM;
}
- return OUString(FALLBACKFONT_UI_SANS);
+ return FALLBACKFONT_UI_SANS;
}
/*
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 0b4e86f8dad8..e4c32683931c 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -922,16 +922,16 @@ OUString SvtModuleOptions::GetModuleName( EModule eModule ) const
{
switch( eModule )
{
- case SvtModuleOptions::EModule::WRITER : { return OUString("Writer"); }
- case SvtModuleOptions::EModule::WEB : { return OUString("Web"); }
- case SvtModuleOptions::EModule::GLOBAL : { return OUString("Global"); }
- case SvtModuleOptions::EModule::CALC : { return OUString("Calc"); }
- case SvtModuleOptions::EModule::DRAW : { return OUString("Draw"); }
- case SvtModuleOptions::EModule::IMPRESS : { return OUString("Impress"); }
- case SvtModuleOptions::EModule::MATH : { return OUString("Math"); }
- case SvtModuleOptions::EModule::CHART : { return OUString("Chart"); }
- case SvtModuleOptions::EModule::BASIC : { return OUString("Basic"); }
- case SvtModuleOptions::EModule::DATABASE : { return OUString("Database"); }
+ case SvtModuleOptions::EModule::WRITER : { return "Writer"; }
+ case SvtModuleOptions::EModule::WEB : { return "Web"; }
+ case SvtModuleOptions::EModule::GLOBAL : { return "Global"; }
+ case SvtModuleOptions::EModule::CALC : { return "Calc"; }
+ case SvtModuleOptions::EModule::DRAW : { return "Draw"; }
+ case SvtModuleOptions::EModule::IMPRESS : { return "Impress"; }
+ case SvtModuleOptions::EModule::MATH : { return "Math"; }
+ case SvtModuleOptions::EModule::CHART : { return "Chart"; }
+ case SvtModuleOptions::EModule::BASIC : { return "Basic"; }
+ case SvtModuleOptions::EModule::DATABASE : { return "Database"; }
default:
OSL_FAIL( "unknown module" );
break;
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 32fb86bdcf02..bb75cc61fed8 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -86,7 +86,7 @@ namespace
nCRC >>= 6;
}
sKeyId[5] = '\0';
- return OString(sKeyId);
+ return sKeyId;
}
}