From 86adb5cacb4fe3e7fb869299447da5876f0da30d Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 1 Dec 2011 21:03:42 +0100 Subject: get rid of class Date and Time default ctor with system time penalty --- cui/source/dialogs/postdlg.cxx | 8 ++++---- cui/source/options/optupdt.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index e16815ce84ef..ab5ed760d79f 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -135,7 +135,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, else { LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); - aDateStr = aLocaleWrapper.getDate( Date() ); + aDateStr = aLocaleWrapper.getDate( Date( Date::SYSTEM ) ); } nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ); @@ -218,8 +218,8 @@ IMPL_LINK_INLINE_END( SvxPostItDialog, NextHdl, Button *, EMPTYARG ) IMPL_LINK( SvxPostItDialog, Stamp, Button *, EMPTYARG ) { - Date aDate; - Time aTime; + Date aDate( Date::SYSTEM ); + Time aTime( Time::SYSTEM ); String aTmp( SvtUserOptions().GetID() ); LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); String aStr( aEditED.GetText() ); @@ -251,7 +251,7 @@ IMPL_LINK( SvxPostItDialog, OKHdl, Button *, EMPTYARG ) pOutSet = new SfxItemSet( rSet ); pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(), rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) ); - pOutSet->Put( SvxPostItDateItem( aLocaleWrapper.getDate( Date() ), + pOutSet->Put( SvxPostItDateItem( aLocaleWrapper.getDate( Date( Date::SYSTEM ) ), rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) ); pOutSet->Put( SvxPostItTextItem( aEditED.GetText(), rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) ); diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index ee87645b3bcd..7e7beceaa88f 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -133,8 +133,8 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() TimeValue lastCheckedTV; oslDateTime lastCheckedDT; - Date aDate; - Time aTime; + Date aDate( Date::EMPTY ); + Time aTime( Time::EMPTY ); lastCheckedTV.Seconds = (sal_uInt32) lastChecked; osl_getLocalTimeFromSystemTime( &lastCheckedTV, &lastCheckedTV ); -- cgit