summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-09-13 12:43:05 +0200
committerEike Rathke <erack@redhat.com>2016-09-13 12:54:41 +0200
commitc22f9f0e00f26015f8019193c0db2fbb895b2cdc (patch)
tree9e08c7727255f8c9dcf63d139ad9f6fc22287249 /include
parent1e0b7b7e4b95e896e32d49a2fed7a5760e509f36 (diff)
introduce LocaleDataWrapper::doesSecondaryCalendarUseEC()
Preparing to replace the number format import hack of 95c91f098e8974c41c8d403a351fe53db6822165 and generalizing for known locales. Change-Id: I0413987e302eaa84ef6a7dde2ecb365144313e81
Diffstat (limited to 'include')
-rw-r--r--include/unotools/localedatawrapper.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 642cd82c0a17..0ea75efcd8d2 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -58,6 +58,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
css::uno::Reference< css::i18n::XLocaleData4 > xLD;
LanguageTag maLanguageTag;
std::shared_ptr< css::i18n::Calendar2 > xDefaultCalendar;
+ std::shared_ptr< css::i18n::Calendar2 > xSecondaryCalendar;
css::i18n::LocaleDataItem aLocaleDataItem;
css::uno::Sequence< OUString > aReservedWordSeq;
css::uno::Sequence< OUString > aDateAcceptancePatterns;
@@ -74,6 +75,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
sal_uInt16 nCurrDigits;
bool bLocaleDataItemValid;
bool bReservedWordValid;
+ bool bSecondaryCalendarValid;
mutable ::utl::ReadWriteMutex aMutex;
struct Locale_Compare
{
@@ -105,6 +107,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
DateFormat scanDateFormatImpl( const OUString& rCode );
void getDefaultCalendarImpl();
+ void getSecondaryCalendarImpl();
sal_Unicode* ImplAddFormatNum( sal_Unicode* pBuf,
sal_Int64 nNumber, sal_uInt16 nDecimals,
@@ -183,6 +186,10 @@ public:
/// Convenience method to obtain the month names of the default calendar.
const css::uno::Sequence< css::i18n::CalendarItem2 > getDefaultCalendarMonths() const;
+ /** If the secondary calendar, if any, is of the name passed AND number
+ formats using it usually use the E or EE keyword (EC|EEC). */
+ bool doesSecondaryCalendarUseEC( const OUString& rName ) const;
+
/** Obtain digit grouping. The usually known grouping by thousands (#,###)
is actually only one of possible groupings. Another one, for example,
used in India is group by 3 and then by 2 indefinitely (#,##,###). The