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 /basic | |
parent | b20ea84970fb8b3068880a361822941c47f50edd (diff) |
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/app/msgedit.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx index 06e68bf7fa45..cda2c4fa3e6f 100644 --- a/basic/source/app/msgedit.cxx +++ b/basic/source/app/msgedit.cxx @@ -136,8 +136,8 @@ void MsgEdit::AddAnyMsg( TTLogMsg *LogMsg ) { SvtSysLocale aLocale; LogMsg->aDebugData.aMsg = GEN_RES_STR2( S_PROG_START, - aLocale.GetLocaleData().getDate(Date()), - aLocale.GetLocaleData().getTime(Time()) ); + aLocale.GetLocaleData().getDate(Date( Date::SYSTEM)), + aLocale.GetLocaleData().getTime(Time( Time::SYSTEM)) ); aUILogMsg = pBasicFrame->GenRealString( LogMsg->aDebugData.aMsg ); } AddRun( aUILogMsg, LogMsg->aDebugData ); break; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 251454b2583b..e3d5d48cde5d 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2151,8 +2151,8 @@ RTLFUNC(Second) double Now_Impl() { - Date aDate; - Time aTime; + Date aDate( Date::SYSTEM ); + Time aTime( Time::SYSTEM ); double aSerial = (double)GetDayDiff( aDate ); long nSeconds = aTime.GetHour(); nSeconds *= 3600; @@ -2180,7 +2180,7 @@ RTLFUNC(Time) if ( !bWrite ) { - Time aTime; + Time aTime( Time::SYSTEM ); SbxVariable* pMeth = rPar.Get( 0 ); String aRes; if( pMeth->IsFixed() ) @@ -2232,7 +2232,7 @@ RTLFUNC(Timer) (void)pBasic; (void)bWrite; - Time aTime; + Time aTime( Time::SYSTEM ); long nSeconds = aTime.GetHour(); nSeconds *= 3600; nSeconds += aTime.GetMin() * 60; @@ -2248,7 +2248,7 @@ RTLFUNC(Date) if ( !bWrite ) { - Date aToday; + Date aToday( Date::SYSTEM ); double nDays = (double)GetDayDiff( aToday ); SbxVariable* pMeth = rPar.Get( 0 ); if( pMeth->IsString() ) @@ -2922,8 +2922,8 @@ RTLFUNC(FileDateTime) else { String aPath = rPar.Get(1)->GetString(); - Time aTime; - Date aDate; + Time aTime( Time::EMPTY ); + Date aDate( Date::EMPTY ); if( hasUno() ) { com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); |