summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-13 13:16:27 +0200
committerEike Rathke <erack@redhat.com>2017-04-13 18:36:05 +0200
commit608e93bce9d72ccabadeb6707f9a29c3499fd32e (patch)
treea37d9f370342c6d76fe6e5b4741a90535d12bde1 /include/unotools
parentfe62003caabf7665d41085c5d16f177f8186fce4 (diff)
convert DateFormat to scoped enum and rename to DateOrder
Change-Id: I71d7a7755a5c20d5146d1ad7e96ca22b7823173a Reviewed-on: https://gerrit.libreoffice.org/36517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/localedatawrapper.hxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index fce96406ab7d..3a6ed7c3389a 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -39,10 +39,11 @@ class Date;
namespace tools { class Time; }
class CalendarWrapper;
-enum DateFormat {
- MDY,
+enum class DateOrder {
+ Invalid = -1,
+ MDY = 0,
DMY,
- YMD
+ YMD,
};
enum MeasurementSystem {
@@ -68,8 +69,8 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
OUString aReservedWord[css::i18n::reservedWords::COUNT];
OUString aCurrSymbol;
OUString aCurrBankSymbol;
- int nDateFormat;
- int nLongDateFormat;
+ DateOrder nDateOrder;
+ DateOrder nLongDateOrder;
sal_uInt16 nCurrPositiveFormat;
sal_uInt16 nCurrNegativeFormat;
sal_uInt16 nCurrDigits;
@@ -87,10 +88,10 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
void invalidateData();
void getOneLocaleItemImpl( sal_Int16 nItem );
- const OUString& getOneLocaleItem( sal_Int16 nItem ) const;
+ const OUString& getOneLocaleItem( sal_Int16 nItem ) const;
void getOneReservedWordImpl( sal_Int16 nWord );
- const OUString& getOneReservedWord( sal_Int16 nWord ) const;
+ const OUString& getOneReservedWord( sal_Int16 nWord ) const;
void getCurrSymbolsImpl();
void getCurrFormatsImpl();
@@ -100,8 +101,8 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
sal_Int32& nPar, sal_Int32& nNum,
sal_Int32& nBlank, sal_Int32& nSym );
- void getDateFormatsImpl();
- DateFormat scanDateFormatImpl( const OUString& rCode );
+ void getDateOrdersImpl();
+ DateOrder scanDateOrderImpl( const OUString& rCode );
void getDefaultCalendarImpl();
void getSecondaryCalendarImpl();
@@ -244,8 +245,8 @@ public:
sal_uInt16 getCurrDigits() const;
// simple date and time formatting
- DateFormat getDateFormat() const;
- DateFormat getLongDateFormat() const;
+ DateOrder getDateOrder() const;
+ DateOrder getLongDateOrder() const;
/// only numerical values of Gregorian calendar
OUString getDate( const Date& rDate ) const;
OUString getTime( const tools::Time& rTime, bool bSec = true,