[Libreoffice-commits] core.git: tools/source
Eike Rathke
erack at redhat.com
Tue May 2 15:24:28 UTC 2017
tools/source/datetime/tdate.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 8ea7253327b70adb2c497bfd3a1734d9abd0c65b
Author: Eike Rathke <erack at redhat.com>
Date: Tue May 2 17:23:23 2017 +0200
Date::IsValidDate: year 0 is not
Change-Id: I44e476f354d04a1d070a7348e3b00d75497231c2
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 46e5ad62469e..9815716ebe3f 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -464,6 +464,8 @@ bool Date::IsValidDate() const
//static
bool Date::IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear )
{
+ if (nYear == 0)
+ return false;
if ( !nMonth || (nMonth > 12) )
return false;
if ( !nDay || (nDay > ImplDaysInMonth( nMonth, nYear )) )
More information about the Libreoffice-commits
mailing list