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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/app/sdmod2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/app/sdpopup.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/tools/TimerBasedTaskExecution.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsb.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 4 |
10 files changed, 19 insertions, 18 deletions
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 7348b63d71bd..6a9515d4f540 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -1457,7 +1457,7 @@ void SdPublishingDlg::SetDesign( SdPublishingDesign* pDesign ) pPage2_ChgDefault->Check( !pDesign->m_bAutoSlide ); pPage2_ChgAuto->Check( pDesign->m_bAutoSlide ); - Time aTime; + Time aTime( Time::EMPTY ); aTime.MakeTimeFromMS( pDesign->m_nSlideDuration * 1000 ); pPage2_Duration->SetTime( aTime ); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 625ecd40013f..fdc9655b3406 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -168,11 +168,12 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio com::sun::star::util::DateTime aDateTime( xAnnotation->getDateTime() ); + Date aSysDate( Date::SYSTEM ); Date aDate = Date( aDateTime.Day, aDateTime.Month, aDateTime.Year ); - if (aDate==Date()) + if (aDate==aSysDate) sRet = sRet + String(SdResId(STR_ANNOTATION_TODAY)); else - if (aDate == Date(Date()-1)) + if (aDate == Date(aSysDate-1)) sRet = sRet + String(SdResId(STR_ANNOTATION_YESTERDAY)); else if (aDate.IsValidAndGregorian() ) diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 7d4ab169ef07..ceeaf6635cf2 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -389,8 +389,8 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo) } else { - Date aDate; - Time aTime; + Date aDate( Date::SYSTEM ); + Time aTime( Time::SYSTEM ); LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() ); aRepresentation = SvxDateTimeField::GetFormatted( aDate, aTime, (SvxDateFormat)rSettings.meDateTimeFormat, *GetNumberFormatter(), eLang ); } diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx index bfb350faed4e..65631d59ff61 100644 --- a/sd/source/ui/app/sdpopup.cxx +++ b/sd/source/ui/app/sdpopup.cxx @@ -223,7 +223,7 @@ SvxFieldData* SdFieldPopup::GetField() if( (pDateField->GetType() == SVXDATETYPE_VAR) && (eType == SVXDATETYPE_FIX) ) { - Date aDate; + Date aDate( Date::SYSTEM ); ( (SvxDateField*) pNewField )->SetFixDate( aDate ); } } @@ -256,7 +256,7 @@ SvxFieldData* SdFieldPopup::GetField() if( (pTimeField->GetType() == SVXTIMETYPE_VAR) && (eType == SVXTIMETYPE_FIX) ) { - Time aTime; + Time aTime( Time::SYSTEM ); ( (SvxExtTimeField*) pNewField )->SetFixTime( aTime ); } diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 0e15017ebef1..e3e11d2305b2 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -575,8 +575,8 @@ void HeaderFooterTabPage::FillFormatList( int eFormat ) maCBDateTimeFormat.Clear(); - Date aDate; - Time aTime; + Date aDate( Date::SYSTEM ); + Time aTime( Time::SYSTEM ); int nFormat; for( nFormat = 0; nFormat < nDateTimeFormatsCount; nFormat++ ) diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx index 42c1abc4b160..06061af5a251 100644 --- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx +++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx @@ -147,14 +147,14 @@ IMPL_LINK(TimerBasedTaskExecution,TimerCallback, Timer*,EMPTYARG) // Execute as many steps as fit into the time span of length // mnMaxTimePerStep. Note that the last step may take longer // than allowed. - sal_uInt32 nStartTime (Time().GetMSFromTime()); + sal_uInt32 nStartTime (Time( Time::SYSTEM ).GetMSFromTime()); #ifdef VERBOSE OSL_TRACE("starting TimerBasedTaskExecution at %d", nStartTime); #endif do { mpTask->RunNextStep(); - sal_uInt32 nDuration (Time().GetMSFromTime()-nStartTime); + sal_uInt32 nDuration (Time( Time::SYSTEM ).GetMSFromTime()-nStartTime); #ifdef VERBOSE OSL_TRACE("executed step in %d", nDuration); #endif diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 22f02fccbcd9..1a49b7f97fa5 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1546,7 +1546,7 @@ void ImplPDFExportComments( uno::Reference< drawing::XDrawPage > xPage, vcl::PDF util::DateTime aDateTime( xAnnotation->getDateTime() ); Date aDate( aDateTime.Day, aDateTime.Month, aDateTime.Year ); - Time aTime; + Time aTime( Time::EMPTY ); String aStr( SvxDateTimeField::GetFormatted( aDate, aTime, SVXDATEFORMAT_B, *(SD_MOD()->GetNumberFormatter()), eLanguage ) ); vcl::PDFNote aNote; diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index c917d2a1c11d..0d15f445df00 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1500,12 +1500,12 @@ private: // Collect some frequently used data. if (mpOptions->IsDate()) { - aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getDate( Date() ); + aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getDate( Date( Date::SYSTEM ) ); aInfo.msTimeDate += ::rtl::OUString((sal_Unicode)' '); } if (mpOptions->IsTime()) - aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time(), sal_False, sal_False ); + aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time( Time::SYSTEM ), sal_False, sal_False ); aInfo.maPrintSize = aInfo.mpPrinter->GetOutputSize(); maPrintSize = awt::Size( aInfo.mpPrinter->GetPaperSize().Width(), diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 4826ec7b8d89..27ba35427e3d 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -500,7 +500,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) { case SID_INSERT_FLD_DATE_FIX: pFieldItem = new SvxFieldItem( - SvxDateField( Date(), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ); + SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ); break; case SID_INSERT_FLD_DATE_VAR: @@ -509,7 +509,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) case SID_INSERT_FLD_TIME_FIX: pFieldItem = new SvxFieldItem( - SvxExtTimeField( Time(), SVXTIMETYPE_FIX ), EE_FEATURE_FIELD ); + SvxExtTimeField( Time( Time::SYSTEM ), SVXTIMETYPE_FIX ), EE_FEATURE_FIELD ); break; case SID_INSERT_FLD_TIME_VAR: diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 068b0a33cf21..3e16529d1554 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -460,7 +460,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) { case SID_INSERT_FLD_DATE_FIX: pFieldItem = new SvxFieldItem( - SvxDateField( Date(), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ); + SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD ); break; case SID_INSERT_FLD_DATE_VAR: @@ -469,7 +469,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) case SID_INSERT_FLD_TIME_FIX: pFieldItem = new SvxFieldItem( - SvxExtTimeField( Time(), SVXTIMETYPE_FIX ), EE_FEATURE_FIELD ); + SvxExtTimeField( Time( Time::SYSTEM ), SVXTIMETYPE_FIX ), EE_FEATURE_FIELD ); break; case SID_INSERT_FLD_TIME_VAR: |