OnDemandLocaleDataWrapper Class Reference

Switch between LANGUAGE_SYSTEM and LANGUAGE_ENGLISH_US and any other LocaleDataWrapper. More...

#include <ondemand.hxx>

Collaboration diagram for OnDemandLocaleDataWrapper:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 OnDemandLocaleDataWrapper ()
 OnDemandLocaleDataWrapper (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxSMgr,::com::sun::star::lang::Locale &rLocale, LanguageType eLang)
 ~OnDemandLocaleDataWrapper ()
bool isInitialized () const
bool is () const
void init (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxSMgr,::com::sun::star::lang::Locale &rLocale, LanguageType eLang)
void changeLocale (::com::sun::star::lang::Locale &rLocale, LanguageType eLang)
LanguageType getCurrentLanguage () const
LocaleDataWrapper * getAnyLocale ()
const LocaleDataWrapper * get () const
const LocaleDataWrapper * operator-> () const
const LocaleDataWrapper & operator* () const

Private Attributes

::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory > 
xSMgr
SvtSysLocale aSysLocale
LanguageType eCurrentLanguage
LanguageType eLastAnyLanguage
const LocaleDataWrapper * pSystem
const LocaleDataWrapper * pEnglish
LocaleDataWrapper * pAny
const LocaleDataWrapper * pCurrent
bool bInitialized


Detailed Description

Switch between LANGUAGE_SYSTEM and LANGUAGE_ENGLISH_US and any other LocaleDataWrapper.

SvNumberformatter uses it upon switching locales.

Avoids reloading and analysing of locale data again and again.

If the default ctor is used the init() method MUST be called before accessing any locale data. The passed parameters Locale and LanguageType must match each other.

Definition at line 62 of file ondemand.hxx.


Constructor & Destructor Documentation

OnDemandLocaleDataWrapper::OnDemandLocaleDataWrapper (  )  [inline]

OnDemandLocaleDataWrapper::OnDemandLocaleDataWrapper ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &  rxSMgr,
::com::sun::star::lang::Locale &  rLocale,
LanguageType  eLang 
) [inline]

Definition at line 84 of file ondemand.hxx.

References aSysLocale, SvtSysLocale::GetLocaleDataPtr(), init(), and pSystem.

OnDemandLocaleDataWrapper::~OnDemandLocaleDataWrapper (  )  [inline]

Definition at line 97 of file ondemand.hxx.

References pAny, and pEnglish.


Member Function Documentation

bool OnDemandLocaleDataWrapper::isInitialized (  )  const [inline]

Definition at line 103 of file ondemand.hxx.

References bInitialized.

bool OnDemandLocaleDataWrapper::is (  )  const [inline]

Definition at line 105 of file ondemand.hxx.

References pCurrent.

void OnDemandLocaleDataWrapper::init ( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &  rxSMgr,
::com::sun::star::lang::Locale &  rLocale,
LanguageType  eLang 
) [inline]

Definition at line 107 of file ondemand.hxx.

References bInitialized, changeLocale(), and xSMgr.

Referenced by OnDemandLocaleDataWrapper().

void OnDemandLocaleDataWrapper::changeLocale ( ::com::sun::star::lang::Locale &  rLocale,
LanguageType  eLang 
) [inline]

LanguageType OnDemandLocaleDataWrapper::getCurrentLanguage (  )  const [inline]

Definition at line 146 of file ondemand.hxx.

References eCurrentLanguage.

Referenced by SvNumberFormatter::GetFormatDecimalSep().

LocaleDataWrapper* OnDemandLocaleDataWrapper::getAnyLocale (  )  [inline]

Definition at line 149 of file ondemand.hxx.

References eCurrentLanguage, eLastAnyLanguage, pAny, pCurrent, and xSMgr.

const LocaleDataWrapper* OnDemandLocaleDataWrapper::get (  )  const [inline]

Definition at line 164 of file ondemand.hxx.

References pCurrent.

Referenced by SvNumberFormatter::GetLocaleData().

const LocaleDataWrapper* OnDemandLocaleDataWrapper::operator-> (  )  const [inline]

Definition at line 165 of file ondemand.hxx.

const LocaleDataWrapper& OnDemandLocaleDataWrapper::operator* (  )  const [inline]

Definition at line 166 of file ondemand.hxx.


Member Data Documentation

::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > OnDemandLocaleDataWrapper::xSMgr [private]

Definition at line 64 of file ondemand.hxx.

Referenced by changeLocale(), getAnyLocale(), and init().

Definition at line 65 of file ondemand.hxx.

Referenced by OnDemandLocaleDataWrapper().

Definition at line 67 of file ondemand.hxx.

Referenced by changeLocale(), and getAnyLocale().

const LocaleDataWrapper* OnDemandLocaleDataWrapper::pSystem [private]

Definition at line 68 of file ondemand.hxx.

Referenced by changeLocale(), and OnDemandLocaleDataWrapper().

const LocaleDataWrapper* OnDemandLocaleDataWrapper::pEnglish [private]

Definition at line 69 of file ondemand.hxx.

Referenced by changeLocale(), and ~OnDemandLocaleDataWrapper().

LocaleDataWrapper* OnDemandLocaleDataWrapper::pAny [private]

Definition at line 70 of file ondemand.hxx.

Referenced by changeLocale(), getAnyLocale(), and ~OnDemandLocaleDataWrapper().

const LocaleDataWrapper* OnDemandLocaleDataWrapper::pCurrent [private]

Definition at line 71 of file ondemand.hxx.

Referenced by changeLocale(), get(), getAnyLocale(), is(), and OnDemandLocaleDataWrapper().

Definition at line 72 of file ondemand.hxx.

Referenced by init(), and isInitialized().


The documentation for this class was generated from the following file:

Generated on Thu Apr 29 14:17:26 2010 for ooo-build Module svtools (ooo/OOO320_m15) by  doxygen 1.5.6