summaryrefslogtreecommitdiffstats
path: root/include/tools/date.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-07-01 16:01:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-03 08:41:29 +0200
commitf5b0cc2a3690ba963b3f150886e1d5ddddee9530 (patch)
treed26080d3788451b3343be89d629b8dada0fb7685 /include/tools/date.hxx
parentwriterfilter: fix indentation (diff)
downloadcore-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/date.hxx')
-rw-r--r--include/tools/date.hxx14
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