diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-28 22:01:52 -0500 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-02-29 14:28:43 +0100 |
commit | ff47b3717ca8bc561917c8ad5cd8bb5749638270 (patch) | |
tree | 86cdff83b6fdecc74563ffea88b88b66bcc0b643 | |
parent | beefd1d27a8292a2fc12c5956400dedc0430e410 (diff) |
Correctly calculate leap year.
With the old code, year 2000 would not be a leap year, but it actually
is. With this, Calc correctly loads cell with date value of 2000-2-29.
(regression from CWS sw33bf02 8786083eb9dabb0d7b328a217ba99a1d71493ad7)
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Signed-off-by: Eike Rathke <erack@redhat.com>
Signed-off-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 3c993bd0c3120445f27cb37e6ecfd8b45c6605e0)
-rw-r--r-- | sax/source/tools/converter.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 74d056c373..041429797b 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -1154,7 +1154,7 @@ readDateTimeComponent(const ::rtl::OUString & rString, static bool lcl_isLeapYear(const sal_uInt32 nYear) { return ((nYear % 4) == 0) - && !(((nYear % 100) == 0) || ((nYear % 400) == 0)); + && (((nYear % 100) != 0) || ((nYear % 400) == 0)); } static sal_uInt16 |