LibreOffice Module unotools (master) 1
|
A wrapper of I18N wrappers. More...
#include <intlwrapper.hxx>
Public Member Functions | |
IntlWrapper (LanguageTag aLanguageTag) | |
~IntlWrapper () | |
const LocaleDataWrapper * | getLocaleData () const |
const CollatorWrapper * | getCollator () const |
case insensitive collator, simple IGNORE_CASE More... | |
const CollatorWrapper * | getCaseCollator () const |
case sensitive collator More... | |
Private Member Functions | |
void | ImplNewLocaleData () const |
void | ImplNewCollator (bool bCaseSensitive) const |
Private Attributes | |
LanguageTag | maLanguageTag |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
std::unique_ptr< LocaleDataWrapper > | pLocaleData |
std::optional< CollatorWrapper > | moCollator |
std::optional< CollatorWrapper > | moCaseCollator |
A wrapper of I18N wrappers.
Using this is more expensive than using some single wrapper classes so use it only if you must pass a single pointer without knowing in advance what is needed, e.g. for SfxPoolItem::GetPresentation(). Remember that this wrapper was only created for convenience to bypass some oddities, if possible don't use it.
Implemented are only the const get...() methods of the wrappers, which are loaded on demand, for consistency reasons no change of locale is possible. Only default calendar and default collator are supported.
One exception though is the calendar wrapper: to be able to set a value and retrieve calendar values it is not const, so methods using this should reset the calendar to the previous value if it isn't sure where the IntlWrapper did come from.
Definition at line 51 of file intlwrapper.hxx.
IntlWrapper::IntlWrapper | ( | LanguageTag | aLanguageTag | ) |
Definition at line 27 of file intlwrapper.cxx.
References getProcessComponentContext(), m_xContext, and maLanguageTag.
IntlWrapper::~IntlWrapper | ( | ) |
Definition at line 34 of file intlwrapper.cxx.
|
inline |
case sensitive collator
Definition at line 82 of file intlwrapper.hxx.
|
inline |
case insensitive collator, simple IGNORE_CASE
Definition at line 75 of file intlwrapper.hxx.
|
inline |
Definition at line 68 of file intlwrapper.hxx.
|
private |
Definition at line 43 of file intlwrapper.cxx.
References LanguageTag::getLocale(), m_xContext, maLanguageTag, moCaseCollator, and moCollator.
|
private |
Definition at line 38 of file intlwrapper.cxx.
References m_xContext, maLanguageTag, and pLocaleData.
|
private |
Definition at line 55 of file intlwrapper.hxx.
Referenced by ImplNewCollator(), and ImplNewLocaleData().
|
private |
Definition at line 54 of file intlwrapper.hxx.
Referenced by ImplNewCollator(), and ImplNewLocaleData().
|
private |
Definition at line 59 of file intlwrapper.hxx.
Referenced by ImplNewCollator().
|
private |
Definition at line 58 of file intlwrapper.hxx.
Referenced by ImplNewCollator().
|
private |
Definition at line 57 of file intlwrapper.hxx.
Referenced by ImplNewLocaleData().