summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
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/view
parentb20ea84970fb8b3068880a361822941c47f50edd (diff)
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'sc/source/ui/view')
-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
3 files changed, 7 insertions, 5 deletions
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);