summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/source/datetime/tdate.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 1fdebaac55bb..e3fd7eff5bbe 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -99,7 +99,9 @@ sal_uInt16 ImplDaysInMonth( sal_uInt16 nMonth, sal_Int16 nYear )
void Date::setDateFromDMY( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear )
{
- SAL_WARN_IF( nYear == 0, "tools.datetime", "Date::setDateFromDMY - sure about 0 year? It's not in the calendar.");
+ // don't warn about 0/0/0, commonly used as a default-value/no-value
+ SAL_WARN_IF( nYear == 0 && !(nYear == 0 && nMonth == 0 && nDay == 0),
+ "tools.datetime", "Date::setDateFromDMY - sure about 0 year? It's not in the calendar.");
assert( nMonth < 100 && "nMonth % 100 not representable" );
assert( nDay < 100 && "nDay % 100 not representable" );
if (nYear < 0)