diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-07-01 16:01:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-03 08:41:29 +0200 |
commit | f5b0cc2a3690ba963b3f150886e1d5ddddee9530 (patch) | |
tree | d26080d3788451b3343be89d629b8dada0fb7685 /include/tools | |
parent | writerfilter: fix indentation (diff) | |
download | core-f5b0cc2a3690ba963b3f150886e1d5ddddee9530.tar.gz core-f5b0cc2a3690ba963b3f150886e1d5ddddee9530.zip |
use sal_Int32 in tools::Date
instead of long, which has platform-dependant length
(32bits on windows, 64bit on everything else)
Change-Id: I9b5a950f56dad99a016b481c221bfd103ffa3911
Reviewed-on: https://gerrit.libreoffice.org/39433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/date.hxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tools/date.hxx b/include/tools/date.hxx index 7ea3998314fb..3e038beb308b 100644 --- a/include/tools/date.hxx +++ b/include/tools/date.hxx @@ -216,14 +216,14 @@ public: { mnDate = rDate.mnDate; return *this; } Date& operator =( const css::util::Date& rUDate ) { setDateFromDMY( rUDate.Day, rUDate.Month, rUDate.Year); return *this; } - Date& operator +=( long nDays ); - Date& operator -=( long nDays ); + Date& operator +=( sal_Int32 nDays ); + Date& operator -=( sal_Int32 nDays ); Date& operator ++(); Date& operator --(); - TOOLS_DLLPUBLIC friend Date operator +( const Date& rDate, long nDays ); - TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays ); - TOOLS_DLLPUBLIC friend long operator -( const Date& rDate1, const Date& rDate2 ); + TOOLS_DLLPUBLIC friend Date operator +( const Date& rDate, sal_Int32 nDays ); + TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, sal_Int32 nDays ); + TOOLS_DLLPUBLIC friend sal_Int32 operator -( const Date& rDate1, const Date& rDate2 ); /** Obtain number of days in a month of a year. @@ -233,7 +233,7 @@ public: static sal_uInt16 GetDaysInMonth( sal_uInt16 nMonth, sal_Int16 nYear ); /// Internally normalizes values. - static long DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear ); + static sal_Int32 DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear ); /// Semantically identical to IsValidDate() member method. static bool IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear ); /// Semantically identical to Normalize() member method. @@ -241,7 +241,7 @@ public: private: /// An accelerated form of DateToDays on this date - long GetAsNormalizedDays() const; + sal_Int32 GetAsNormalizedDays() const; }; #endif |