diff options
author | Eike Rathke <erack@redhat.com> | 2011-12-01 21:03:42 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-12-01 21:04:29 +0100 |
commit | 86adb5cacb4fe3e7fb869299447da5876f0da30d (patch) | |
tree | f7998dd1a12a82ca53a4fa155cdf5536ac25ef62 /svtools/source/control/calendar.cxx | |
parent | pull in module headers before solver (diff) | |
download | core-86adb5cacb4fe3e7fb869299447da5876f0da30d.tar.gz core-86adb5cacb4fe3e7fb869299447da5876f0da30d.zip |
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'svtools/source/control/calendar.cxx')
-rw-r--r-- | svtools/source/control/calendar.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 4ff76c3e23e2..e1d536dee22d 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -291,6 +291,7 @@ Calendar::Calendar( Window* pParent, WinBits nWinStyle ) : maOldFormatLastDate( 0, 0, 1900 ), maFirstDate( 0, 0, 1900 ), maOldFirstDate( 0, 0, 1900 ), + maCurDate( Date::SYSTEM ), maOldCurDate( 0, 0, 1900 ), maAnchorDate( maCurDate ), maDropDate( 0, 0, 1900 ) @@ -867,7 +868,7 @@ void Calendar::ImplDrawDate( long nX, long nY, if ( nToday ) aTodayDate.SetDate( nToday ); else - aTodayDate = Date(); + aTodayDate = Date( Date::SYSTEM ); if ( (nDay == aTodayDate.GetDay()) && (nMonth == aTodayDate.GetMonth()) && (nYear == aTodayDate.GetYear()) ) @@ -932,7 +933,7 @@ void Calendar::ImplDraw( sal_Bool bPaint ) long nDeltaY; long nDayX; long nDayY; - sal_uLong nToday = Date().GetDate(); + sal_uLong nToday = Date( Date::SYSTEM ).GetDate(); sal_uInt16 nDay; sal_uInt16 nMonth; sal_uInt16 nYear; @@ -2590,7 +2591,7 @@ IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn ) if ( pBtn == mpTodayBtn ) { - Date aToday; + Date aToday( Date::SYSTEM ); if ( (aToday != GetDate()) || IsEmptyDate() ) { SetDate( aToday ); @@ -2643,7 +2644,7 @@ sal_Bool CalendarField::ShowDropDown( sal_Bool bShow ) if ( maDefaultDate.IsValidAndGregorian() ) aDate = maDefaultDate; else - aDate = Date(); + aDate = Date( Date::SYSTEM ); } if ( pCalendar->GetStyle() & (WB_RANGESELECT | WB_MULTISELECT) ) { |