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 | |
parent | b20ea84970fb8b3068880a361822941c47f50edd (diff) |
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/contentenumeration.hxx | 1 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 9 | ||||
-rw-r--r-- | svtools/source/control/taskstat.cxx | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/svtools/source/contnr/contentenumeration.hxx b/svtools/source/contnr/contentenumeration.hxx index 70e9a2a0fbc9..c8e42bae4fc3 100644 --- a/svtools/source/contnr/contentenumeration.hxx +++ b/svtools/source/contnr/contentenumeration.hxx @@ -84,6 +84,7 @@ namespace svt }; inline SortingData_Impl::SortingData_Impl() : + maModDate ( DateTime::EMPTY ), maSize ( 0 ), mbIsFolder ( sal_False ), mbIsVolume ( sal_False ), 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) ) { diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index 74110c61cb1d..20b731bcc2da 100644 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx @@ -201,7 +201,7 @@ sal_Bool TaskStatusBar::ImplUpdateClock() { if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK ) { - Time aTime; + Time aTime( Time::SYSTEM ); maTimer.SetTimeout( ((long)60000)-((aTime.GetSec()*1000)+(aTime.Get100Sec()*10)) ); if ( (aTime.GetMin() != maTime.GetMin()) || (aTime.GetHour() != maTime.GetHour()) ) @@ -457,7 +457,7 @@ void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt ) const LocaleDataWrapper& rLDW = aSL.GetLocaleData(); CalendarWrapper aCal( rLDW.getServiceFactory()); aCal.loadDefaultCalendar( rLDW.getLoadedLocale()); - XubString aStr = rLDW.getLongDate( Date(), aCal ); + XubString aStr = rLDW.getLongDate( Date( Date::SYSTEM), aCal ); if ( rHEvt.GetMode() & HELPMODE_BALLOON ) Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr ); else |