diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-07-08 15:39:02 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-07-08 15:39:02 +0000 |
commit | 6a48452f443baa57e85517732ae561f573df6503 (patch) | |
tree | 55e88c1ae0336d476599af1c0bd7583cac4e5520 /desktop/source/app/langselect.cxx | |
parent | 42119ca90f7f4ab206fbfb3982f4a6ba0a7de559 (diff) |
#i10000# wrong merge resolved
Diffstat (limited to 'desktop/source/app/langselect.cxx')
-rw-r--r-- | desktop/source/app/langselect.cxx | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 5888c603f1..2947368a4f 100644 --- a/desktop/source/app/langselect.cxx +++ b/desktop/source/app/langselect.cxx @@ -2,9 +2,8 @@ * * $RCSfile: langselect.cxx,v $ * - * $Revision: 1.6 $ - * - * last change: $Author: obo $ $Date: 2004-07-05 13:08:24 $ + * $Revision: 1.7 $ + * last change: $Author: obo $ $Date: 2004-07-08 16:39:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -201,9 +200,9 @@ OUString LanguageSelection::getLanguageString() } else { // last resort // don't save - // what's this ????? -// return (LanguageType) SvtPathOptions().SubstituteVariable( -// String::CreateFromAscii("$(langid)")).ToInt32(); + return ConvertLanguageToIsoString((LanguageType) SvtPathOptions().SubstituteVariable( + String::CreateFromAscii("$(langid)")).ToInt32()) ; + /* ::com::sun::star::lang::Locale aLocale; OUString aLocString( aLocale.Language ); if ( aLocale.Country.getLength() != 0 ) @@ -215,8 +214,9 @@ OUString LanguageSelection::getLanguageString() aLocString += OUString::createFromAscii("-") + aLocale.Variant; } - } + } return aLocString; + */ } } } @@ -290,8 +290,7 @@ IsoList LanguageSelection::getInstalledIsoLanguages() try{ OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider"); OUString sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"); - OUString sConfigURL = OUString::createFromAscii("org.openoffice.Setup/Office/"); - OUString sLocales = OUString::createFromAscii("ooSetupLocales"); + OUString sConfigURL = OUString::createFromAscii("org.openoffice.Setup/Office/InstalledLocales"); // get configuration provider Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory(); @@ -309,15 +308,10 @@ IsoList LanguageSelection::getInstalledIsoLanguages() //check access if (!theNameAccess.is()) return aList; - Any aResult = theNameAccess->getByName( sLocales ); - Sequence< OUString > aLangSeq; + Sequence< OUString > aLangSeq = theNameAccess->getElementNames(); - // unpack result from Any type - if (aResult >>= aLangSeq) - { - for (int i=0; i<aLangSeq.getLength(); i++) - aList.push_back(aLangSeq[i]); - } + for (int i=0; i<aLangSeq.getLength(); i++) + aList.push_back(aLangSeq[i]); } catch (com::sun::star::uno::RuntimeException) { // didn't work - return empty list |