diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-07-23 10:22:27 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-07-23 10:22:27 +0000 |
commit | 3385f58774f2522c34ba676cacad6dbd7d0df414 (patch) | |
tree | 9d116809229dd73d5f6a8e443cf1b4f4b433ad0d /desktop/source/app/langselect.cxx | |
parent | 686a9cfe43bf29299f4d92c4acce77b81561351c (diff) |
INTEGRATION: CWS fwklhf01 (1.3.88); FILE MERGED
2004/06/24 09:57:19 lo 1.3.88.1: #i26299# check for availability of selected language and fallback to installed language if user selected language is not available
Diffstat (limited to 'desktop/source/app/langselect.cxx')
-rw-r--r-- | desktop/source/app/langselect.cxx | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 2947368a4f..d670e39811 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -2,8 +2,8 @@ * * $RCSfile: langselect.cxx,v $ * - * $Revision: 1.7 $ - * last change: $Author: obo $ $Date: 2004-07-08 16:39:02 $ + * $Revision: 1.8 $ + * last change: $Author: hr $ $Date: 2004-07-23 11:22:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -161,15 +161,29 @@ OUString LanguageSelection::getLanguageString() OUString aUserLanguage = getUserLanguage(); if (aUserLanguage.getLength() > 0 ) { - bFoundLanguage = sal_True; - aFoundLanguage = aUserLanguage; - return aFoundLanguage; + bFoundLanguage = sal_True; + aFoundLanguageType = aUserLanguage; + // return aFoundLanguageType; + // we can not return yet, we need to check whether this instance supports + // the language that was previously chosen by the user... } - // fill list - IsoList &rLanguages = lLanguages::get(); - if (rLanguages.size() < 1) - rLanguages = getInstalledIsoLanguages(); + // fill list of available languages + if (m_lLanguages.size() < 1) + m_lLanguages = getInstalledLanguages(); + + // check whether found language is available + if (bFoundLanguage) + { + LangList::const_iterator iLang = m_lLanguages.begin(); + while (iLang != m_lLanguages.end()) + { + if (*iLang == aFoundLanguageType) + return aFoundLanguageType; + else + iLang++; + } + } if (rLanguages.size() > 1) { // are there multiple languages installed? |