diff options
Diffstat (limited to 'unotools/source/config/useroptions.cxx')
-rw-r--r-- | unotools/source/config/useroptions.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index e9c20cfd0abd..625a925b4095 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -183,33 +183,33 @@ void SvtUserOptions::Impl::SetToken (UserOptToken nToken, OUString const& sToken OUString SvtUserOptions::Impl::GetFullName () const { OUString sFullName; - switch (LanguageType const eLang = SvtSysLocale().GetUILanguageTag().getLanguageType()) + LanguageType const eLang = SvtSysLocale().GetUILanguageTag().getLanguageType(); + if (eLang == LANGUAGE_RUSSIAN) { - case LANGUAGE_RUSSIAN: - sFullName = GetToken(UserOptToken::FirstName).trim(); + sFullName = GetToken(UserOptToken::FirstName).trim(); + if (!sFullName.isEmpty()) + sFullName += " "; + sFullName += GetToken(UserOptToken::FathersName).trim(); + if (!sFullName.isEmpty()) + sFullName += " "; + sFullName += GetToken(UserOptToken::LastName).trim(); + } + else + { + if (MsLangId::isFamilyNameFirst(eLang)) + { + sFullName = GetToken(UserOptToken::LastName).trim(); if (!sFullName.isEmpty()) sFullName += " "; - sFullName += GetToken(UserOptToken::FathersName).trim(); + sFullName += GetToken(UserOptToken::FirstName).trim(); + } + else + { + sFullName = GetToken(UserOptToken::FirstName).trim(); if (!sFullName.isEmpty()) sFullName += " "; sFullName += GetToken(UserOptToken::LastName).trim(); - break; - default: - if (MsLangId::isFamilyNameFirst(eLang)) - { - sFullName = GetToken(UserOptToken::LastName).trim(); - if (!sFullName.isEmpty()) - sFullName += " "; - sFullName += GetToken(UserOptToken::FirstName).trim(); - } - else - { - sFullName = GetToken(UserOptToken::FirstName).trim(); - if (!sFullName.isEmpty()) - sFullName += " "; - sFullName += GetToken(UserOptToken::LastName).trim(); - } - break; + } } return sFullName; |