summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-12-01 21:03:42 +0100
committerEike Rathke <erack@redhat.com>2011-12-01 21:04:29 +0100
commit86adb5cacb4fe3e7fb869299447da5876f0da30d (patch)
treef7998dd1a12a82ca53a4fa155cdf5536ac25ef62 /sc/source/ui
parentb20ea84970fb8b3068880a361822941c47f50edd (diff)
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx4
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx4
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx8
-rw-r--r--sc/source/ui/view/preview.cxx6
-rw-r--r--sc/source/ui/view/printfun.cxx2
-rw-r--r--sc/source/ui/view/viewfun6.cxx4
7 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index bb364774fb0b..238c202327a2 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -107,9 +107,9 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bo
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
aComment += String( ScResId( STR_ON ) );
aComment += ' ';
- aComment += ScGlobal::GetpLocaleData()->getDate( Date() );
+ aComment += ScGlobal::GetpLocaleData()->getDate( Date( Date::SYSTEM ) );
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
- aComment += ScGlobal::GetpLocaleData()->getTime( Time() );
+ aComment += ScGlobal::GetpLocaleData()->getTime( Time( Time::SYSTEM ) );
aEdComment .SetText( aComment );
aEdName .SetText( rName );
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index a9497a239b31..82272c66d10c 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2123,7 +2123,7 @@ const ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
// document already loaded.
SfxObjectShell* p = itr->second.maShell;
- itr->second.maLastAccess = Time();
+ itr->second.maLastAccess = Time( Time::SYSTEM );
return static_cast<ScDocShell*>(p)->GetDocument();
}
@@ -2604,7 +2604,7 @@ void ScExternalRefManager::purgeStaleSrcDocument(sal_Int32 nTimeOut)
for (; itr != itrEnd; ++itr)
{
// in 100th of a second.
- sal_Int32 nSinceLastAccess = (Time() - itr->second.maLastAccess).GetTime();
+ sal_Int32 nSinceLastAccess = (Time( Time::SYSTEM ) - itr->second.maLastAccess).GetTime();
if (nSinceLastAccess < nTimeOut)
aNewDocShells.insert(*itr);
else
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 82e73ae1cdb5..31944f3a048f 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -795,7 +795,6 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt )
void ScAcceptChgDlg::UpdateView()
{
bNeedsUpdate=false;
- DateTime aDateTime;
SvLBoxEntry* pParent=NULL;
ScChangeTrack* pChanges=NULL;
const ScChangeAction* pScChangeAction=NULL;
@@ -1464,7 +1463,6 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartActio
{
if(pChanges!=NULL)
{
- DateTime aDateTime;
SvLBoxEntry* pParent=NULL;
const ScChangeAction* pScChangeAction=NULL;
bAcceptEnableFlag=true;
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index e6778209fc70..d688d6d1c50c 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -686,7 +686,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
aConfidentialEntry += ' ';
aConfidentialEntry += ScGlobal::GetRscString( STR_HF_CONFIDENTIAL );
aWndLeft.GetEditEngine()->SetText(aConfidentialEntry);
- aWndCenter.InsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+ aWndCenter.InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
aPageEntry += ' ';
aWndRight.GetEditEngine()->SetText(aPageEntry);
@@ -792,7 +792,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
aPageEntry += ' ';
aWndCenter.GetEditEngine()->SetText(aPageEntry);
aWndCenter.InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) );
- aWndRight.InsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+ aWndRight.InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
if(!bTravelling)
aWndRight.GrabFocus();
}
@@ -807,7 +807,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
aCreatedByEntry += ' ';
aCreatedByEntry += (String)aUserOpt.GetLastName();
aWndLeft.GetEditEngine()->SetText(aCreatedByEntry);
- aWndCenter.InsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+ aWndCenter.InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
String aPageEntry(ScGlobal::GetRscString( STR_PAGE ) );
aPageEntry += ' ';
aWndRight.GetEditEngine()->SetText(aPageEntry);
@@ -874,7 +874,7 @@ IMPL_LINK( ScHFEditPage, ClickHdl, ImageButton*, pBtn )
else if ( pBtn == &aBtnLastPage )
pActiveEdWnd->InsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD) );
else if ( pBtn == &aBtnDate )
- pActiveEdWnd->InsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
+ pActiveEdWnd->InsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM ),SVXDATETYPE_VAR), EE_FEATURE_FIELD) );
else if ( pBtn == &aBtnTime )
pActiveEdWnd->InsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD) );
else if ( pBtn == &aBtnFile )
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 186205cd7409..1c0d37a733dd 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -104,6 +104,8 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView
nTab( 0 ),
nTabStart( 0 ),
nDisplayStart( 0 ),
+ aDate( Date::SYSTEM ),
+ aTime( Time::SYSTEM ),
nTotalPages( 0 ),
pLocationData( NULL ),
pDrawView( NULL ),
@@ -657,8 +659,8 @@ void ScPreview::DataChanged(bool bNewTime)
{
if (bNewTime)
{
- aDate = Date();
- aTime = Time();
+ aDate = Date( Date::SYSTEM );
+ aTime = Time( Time::SYSTEM );
}
bValid = false;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index b6af96afcb27..e6484ceec031 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1035,7 +1035,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
else
aFieldData.nTotalPages = nTotalPages;
- SetDateTime( Date(), Time() );
+ SetDateTime( Date( Date::SYSTEM ), Time( Time::SYSTEM ) );
aFieldData.aTitle = pDocShell->GetTitle();
const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject();
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 1b7eb4c902f9..0f4736e2df8c 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -293,9 +293,9 @@ void ScViewFunc::InsertCurrentTime(short nCellFmt, const OUString& rUndoStr)
ScDocument* pDoc = pDocSh->GetDocument();
::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- Date aActDate;
+ Date aActDate( Date::SYSTEM );
double fDate = aActDate - *pFormatter->GetNullDate();
- Time aActTime;
+ Time aActTime( Time::SYSTEM );
double fTime =
aActTime.Get100Sec() / 100.0 + aActTime.GetSec() +
(aActTime.GetMin() * 60.0) + (aActTime.GetHour() * 3600.0);