diff options
author | Eike Rathke <erack@redhat.com> | 2021-07-06 14:05:58 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-07-06 17:54:07 +0200 |
commit | 5e3bfdeb5ea4878a2546a7e1e16d0f3b6482024e (patch) | |
tree | 3271241e0a9fbe3566a0c9d2484e57e3a40fe68d /include/unotools | |
parent | 544e279f981afee23e3c02d62adb2c377ef6700f (diff) |
Related: tdf#125035 Introduce LongDateOrder and handle YDM in DateFormatter
This fixes also
unotools/source/i18n/localedatawrapper.cxx:1473: LocaleDataWrapper::scanDateOrder: no magic applicable
lv-LV requested
lv-LV loaded
that is the only locale with a YDM long date order.
Change-Id: I776b8706bf5bd3ec11cc46d38fd3613c8df7519f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118482
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/unotools')
-rw-r--r-- | include/unotools/localedatawrapper.hxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx index 70108f8af86a..0a0832b64a13 100644 --- a/include/unotools/localedatawrapper.hxx +++ b/include/unotools/localedatawrapper.hxx @@ -52,6 +52,14 @@ enum class DateOrder { YMD, }; +enum class LongDateOrder { + Invalid = -1, + MDY = 0, + DMY, + YMD, + YDM +}; + enum class MeasurementSystem { Metric, US @@ -80,7 +88,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper OUString aCurrSymbol; OUString aCurrBankSymbol; DateOrder nDateOrder; - DateOrder nLongDateOrder; + LongDateOrder nLongDateOrder; sal_uInt16 nCurrPositiveFormat; sal_uInt16 nCurrNegativeFormat; sal_uInt16 nCurrDigits; @@ -100,7 +108,7 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper sal_Int32& nBlank, sal_Int32& nSym ) const; void loadDateOrders(); - DateOrder scanDateOrderImpl( const OUString& rCode ) const; + LongDateOrder scanDateOrderImpl( const OUString& rCode ) const; void ImplAddFormatNum( rtl::OUStringBuffer& rBuf, sal_Int64 nNumber, sal_uInt16 nDecimals, @@ -299,7 +307,7 @@ public: // simple date and time formatting DateOrder getDateOrder() const; - DateOrder getLongDateOrder() const; + LongDateOrder getLongDateOrder() const; /// only numerical values of Gregorian calendar OUString getDate( const Date& rDate ) const; OUString getTime( const tools::Time& rTime, bool bSec = true, |