summaryrefslogtreecommitdiff
path: root/desktop/source/app/langselect.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-14 16:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-14 20:46:19 +0200
commitbc66bf4608557d757555aef1f46abf8a15c3538b (patch)
tree92d1f64c49ad464c26cb33b0044fdf54efa7cdf5 /desktop/source/app/langselect.cxx
parentd72f963c0de0c2e48f1dc999cd8687e13a1f676f (diff)
loplugin:flatten in desktop
Change-Id: I1ab39e041025692cac06eb6602787f16a3a9cb0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/app/langselect.cxx')
-rw-r--r--desktop/source/app/langselect.cxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 17b7913c09e3..468ba9368ee5 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -52,19 +52,20 @@ OUString foundLocale;
void setMsLangIdFallback(OUString const & locale) {
// #i32939# setting of default document language
// See #i42730# for rules for determining source of settings
- if (!locale.isEmpty()) {
- LanguageType type = LanguageTag::convertToLanguageTypeWithFallback(locale);
- switch (SvtLanguageOptions::GetScriptTypeOfLanguage(type)) {
- case SvtScriptType::ASIAN:
- MsLangId::setConfiguredAsianFallback(type);
- break;
- case SvtScriptType::COMPLEX:
- MsLangId::setConfiguredComplexFallback(type);
- break;
- default:
- MsLangId::setConfiguredWesternFallback(type);
- break;
- }
+ if (locale.isEmpty())
+ return;
+
+ LanguageType type = LanguageTag::convertToLanguageTypeWithFallback(locale);
+ switch (SvtLanguageOptions::GetScriptTypeOfLanguage(type)) {
+ case SvtScriptType::ASIAN:
+ MsLangId::setConfiguredAsianFallback(type);
+ break;
+ case SvtScriptType::COMPLEX:
+ MsLangId::setConfiguredComplexFallback(type);
+ break;
+ default:
+ MsLangId::setConfiguredWesternFallback(type);
+ break;
}
}