diff options
author | Eike Rathke <er@openoffice.org> | 2000-11-03 19:44:26 +0000 |
---|---|---|
committer | Eike Rathke <er@openoffice.org> | 2000-11-03 19:44:26 +0000 |
commit | 50d67f4559cc8eb40eea262a5791ddaf0e3a5112 (patch) | |
tree | 9cfe9c82f2a6290f2b23af8691ed2454d680d385 /unotools | |
parent | b5a106cf1ee0c5a36643837fb7cdceb6bed71ba7 (diff) |
renamed LCInfo to LanguageCountryInfo; add: getLoadedLocale
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/localedatawrapper.hxx | 13 | ||||
-rw-r--r-- | unotools/source/i18n/localedatawrapper.cxx | 19 |
2 files changed, 21 insertions, 11 deletions
diff --git a/unotools/inc/unotools/localedatawrapper.hxx b/unotools/inc/unotools/localedatawrapper.hxx index b617774f319c..398f4e4704cd 100644 --- a/unotools/inc/unotools/localedatawrapper.hxx +++ b/unotools/inc/unotools/localedatawrapper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: localedatawrapper.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: er $ $Date: 2000-11-03 16:03:49 $ + * last change: $Author: er $ $Date: 2000-11-03 20:43:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,16 +128,19 @@ public: ~LocaleDataWrapper(); - /// set a new Locale + /// set a new Locale to request void setLocale( const ::com::sun::star::lang::Locale& rLocale ); - /// get current Locale + /// get current requested Locale const ::com::sun::star::lang::Locale& getLocale() const { return aLocale; } + /// get current loaded Locale, which might differ from the requested Locale + const ::com::sun::star::lang::Locale getLoadedLocale() const; + // Wrapper implementations of class LocaleData - ::com::sun::star::i18n::LCInfo getLCInfo() const; + ::com::sun::star::i18n::LanguageCountryInfo getLanguageCountryInfo() const; ::com::sun::star::i18n::LocaleDataItem getLocaleItem() const; ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::Calendar > getAllCalendars() const; ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::Currency > getAllCurrencies() const; diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index f1cdd73694e1..a79aff0a6686 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: localedatawrapper.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: er $ $Date: 2000-11-03 16:05:15 $ + * last change: $Author: er $ $Date: 2000-11-03 20:44:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -182,18 +182,18 @@ void LocaleDataWrapper::invalidateData() } -::com::sun::star::i18n::LCInfo LocaleDataWrapper::getLCInfo() const +::com::sun::star::i18n::LanguageCountryInfo LocaleDataWrapper::getLanguageCountryInfo() const { try { if ( xLD.is() ) - return xLD->getLCInfo( aLocale ); + return xLD->getLanguageCountryInfo( aLocale ); } catch ( Exception& e ) { - DBG_ERRORFILE( "getLCInfo: Exception caught!" ); + DBG_ERRORFILE( "getLanguageCountryInfo: Exception caught!" ); } - return ::com::sun::star::i18n::LCInfo(); + return ::com::sun::star::i18n::LanguageCountryInfo(); } @@ -711,3 +711,10 @@ void LocaleDataWrapper::getCurrFormatsImpl() } } } + + +const ::com::sun::star::lang::Locale LocaleDataWrapper::getLoadedLocale() const +{ + LanguageCountryInfo aLCInfo = getLanguageCountryInfo(); + return lang::Locale( aLCInfo.Language, aLCInfo.Country, aLCInfo.Variant ); +} |