diff options
author | Eike Rathke <erack@redhat.com> | 2011-11-30 02:05:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-11-30 02:05:22 +0100 |
commit | dca69d5bb2d0e542de26624dd9f71fb87e1533f2 (patch) | |
tree | d3d6b62417885946113b6f13e10ca0f4fc45613c /chart2/source | |
parent | online update: Now check even the checkForUpdates(). (diff) | |
download | core-dca69d5bb2d0e542de26624dd9f71fb87e1533f2.tar.gz core-dca69d5bb2d0e542de26624dd9f71fb87e1533f2.zip |
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')
-rw-r--r-- | chart2/source/view/axes/DateHelper.cxx | 4 |
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; } |