summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/view/axes')
-rw-r--r--chart2/source/view/axes/DateHelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/view/axes/DateHelper.cxx b/chart2/source/view/axes/DateHelper.cxx
index 142dd6056cfb..6749e749171e 100644
--- a/chart2/source/view/axes/DateHelper.cxx
+++ b/chart2/source/view/axes/DateHelper.cxx
@@ -73,7 +73,7 @@ Date DateHelper::GetDateSomeMonthsAway( const Date& rD, long nMonthDistance )
nNewMonth += 12;
aRet.SetMonth( sal_uInt16(nNewMonth) );
aRet.SetYear( sal_uInt16(nNewYear) );
- while(!aRet.IsValid())
+ while(!aRet.IsValidAndGregorian())
aRet--;
return aRet;
}
@@ -82,7 +82,7 @@ Date DateHelper::GetDateSomeYearsAway( const Date& rD, long nYearDistance )
{
Date aRet(rD);
aRet.SetYear( static_cast<sal_uInt16>(rD.GetYear()+nYearDistance) );
- while(!aRet.IsValid())
+ while(!aRet.IsValidAndGregorian())
aRet--;
return aRet;
}