connectivity/source/commontools/dbconversion.cxx | 20 ++++---------------- connectivity/source/drivers/jdbc/Date.cxx | 1 - 2 files changed, 4 insertions(+), 17 deletions(-)
New commits: commit c7637cf6df213a6fd620b5250e4e3875c9251aa4 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Mon Mar 6 17:49:36 2017 +0100 remove unused #include Change-Id: I97111309432359968e890aacd0a285d068991307 diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx index 82c3ebf..3db5a56 100644 --- a/connectivity/source/drivers/jdbc/Date.cxx +++ b/connectivity/source/drivers/jdbc/Date.cxx @@ -19,7 +19,6 @@ #include "java/util/Date.hxx" #include "java/tools.hxx" -#include <connectivity/dbconversion.hxx> using namespace connectivity; //************ Class: java.util.Date commit 57909620b4493ae7c8fe950c47e2c826b3c164aa Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Mon Mar 6 17:49:17 2017 +0100 tdf#40575 remove obsolete MAX_DAYS check Change-Id: Ifccf3a1fe27011a8e72464bf76cadcf16f5f5fa7 diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 63dc308..763eb6c 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -30,8 +30,6 @@ #include <sstream> #include <iomanip> -#define MAX_DAYS 3636532 - namespace { const sal_Int64 nanoSecInSec = 1000000000; @@ -270,13 +268,8 @@ namespace dbtools sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); nTempDays += nDays; - if ( nTempDays > MAX_DAYS ) - { - _rDate.Day = 31; - _rDate.Month = 12; - _rDate.Year = 9999; - } - else if ( nTempDays <= 0 ) + // TODO: can we remove that check? Would allow dates before 1900. + if ( nTempDays <= 0 ) { _rDate.Day = 1; _rDate.Month = 1; @@ -291,13 +284,8 @@ namespace dbtools sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); nTempDays -= nDays; - if ( nTempDays > MAX_DAYS ) - { - _rDate.Day = 31; - _rDate.Month = 12; - _rDate.Year = 9999; - } - else if ( nTempDays <= 0 ) + // TODO: can we remove that check? Would allow dates before 1900. + if ( nTempDays <= 0 ) { _rDate.Day = 1; _rDate.Month = 1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits