summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-11-30 02:05:22 +0100
committerEike Rathke <erack@redhat.com>2011-11-30 02:05:22 +0100
commitdca69d5bb2d0e542de26624dd9f71fb87e1533f2 (patch)
treed3d6b62417885946113b6f13e10ca0f4fc45613c /chart2/source/view/axes
parentcb937da55c3ab3d238b97d6e0e709ea2a04d2c26 (diff)
renamed Date::IsValid() to IsValidAndGregorian() to prevent misassumptions
Once smaller than 1582-10-15 decrementing a Date will not produce a valid date.
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;
}