LibreOffice Module svl (master) 1
|
Load a calendar only if it's needed. More...
#include <ondemand.hxx>
Public Member Functions | |
OnDemandCalendarWrapper () | |
void | init (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::lang::Locale &rLocale) |
void | changeLocale (const css::lang::Locale &rLocale) |
CalendarWrapper * | get () const |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::lang::Locale | aEnglishLocale |
css::lang::Locale | aLocale |
css::lang::Locale | aLastAnyLocale |
std::optional< CalendarWrapper > | moEnglish |
std::optional< CalendarWrapper > | moAny |
Load a calendar only if it's needed.
Keep calendar for "en-US" locale separately, as there can be alternation between locale dependent and locale independent formats. SvNumberformatter uses it upon switching locales.
@ATTENTION If the default ctor is used the init() method MUST be called before accessing the calendar.
Definition at line 139 of file ondemand.hxx.
|
inline |
Definition at line 149 of file ondemand.hxx.
References aEnglishLocale, aLastAnyLocale, LanguageTag::getLocale(), and LANGUAGE_ENGLISH_US.
|
inline |
Definition at line 165 of file ondemand.hxx.
References aLocale.
Referenced by SvNumberFormatter::ChangeIntl(), and init().
|
inline |
Definition at line 167 of file ondemand.hxx.
References aEnglishLocale, aLastAnyLocale, aLocale, m_xContext, moAny, and moEnglish.
Referenced by SvNumberFormatter::GetCalendar().
|
inline |
Definition at line 156 of file ondemand.hxx.
References changeLocale(), m_xContext, moAny, and moEnglish.
Referenced by SvNumberFormatter::ImpConstruct().
|
private |
Definition at line 142 of file ondemand.hxx.
Referenced by get(), and OnDemandCalendarWrapper().
|
mutableprivate |
Definition at line 144 of file ondemand.hxx.
Referenced by get(), and OnDemandCalendarWrapper().
|
private |
Definition at line 143 of file ondemand.hxx.
Referenced by changeLocale(), and get().
|
private |
Definition at line 141 of file ondemand.hxx.
|
mutableprivate |
Definition at line 146 of file ondemand.hxx.
|
mutableprivate |
Definition at line 145 of file ondemand.hxx.