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 /svtools/source/control/calendar.cxx | |
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 'svtools/source/control/calendar.cxx')
-rw-r--r-- | svtools/source/control/calendar.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 7b4bf577db6a..4ff76c3e23e2 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -1974,7 +1974,7 @@ void Calendar::Select() void Calendar::SelectDate( const Date& rDate, sal_Bool bSelect ) { - if ( !rDate.IsValid() ) + if ( !rDate.IsValidAndGregorian() ) return; Table* pOldSel; @@ -2037,7 +2037,7 @@ Date Calendar::GetSelectDate( sal_uLong nIndex ) const void Calendar::SetCurDate( const Date& rNewDate ) { - if ( !rNewDate.IsValid() ) + if ( !rNewDate.IsValidAndGregorian() ) return; if ( maCurDate != rNewDate ) @@ -2638,9 +2638,9 @@ sal_Bool CalendarField::ShowDropDown( sal_Bool bShow ) Calendar* pCalendar = GetCalendar(); Date aDate = GetDate(); - if ( IsEmptyDate() || !aDate.IsValid() ) + if ( IsEmptyDate() || !aDate.IsValidAndGregorian() ) { - if ( maDefaultDate.IsValid() ) + if ( maDefaultDate.IsValidAndGregorian() ) aDate = maDefaultDate; else aDate = Date(); |