summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-07-06 14:05:58 +0200
committerEike Rathke <erack@redhat.com>2021-07-06 21:20:41 +0200
commitf94c004a978a43616266ed43e91d9d129e985da2 (patch)
tree1eb900d2fc11eafb23be999d8b218359248e38f5 /include
parentfb938255c57bb1951ed44a7518ce29849e4f170a (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> (cherry picked from commit 5e3bfdeb5ea4878a2546a7e1e16d0f3b6482024e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118520
Diffstat (limited to 'include')
-rw-r--r--include/unotools/localedatawrapper.hxx14
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,