summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-03-17 08:36:26 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-04-18 21:34:46 +0200
commit9830fd36dbdb72c79703b0c61efc027fba793c5a (patch)
tree2e9d698e6ca109dc6627adb5c84aa2b635bcfe92 /sc/source/ui/view
parent5aaaf0694b6e3213685563fc3bc90d19b10f5c75 (diff)
date/time IDL datatypes incompatible change
- nanosecond precision - signed (allowed negative) year Also: assorted improvements / bugfixes in date/time handling code. Some factorisation of copy/pasted code. Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/viewfun6.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index ec0f6d421c90..b61c9fffe0a6 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -250,10 +250,10 @@ void ScViewFunc::InsertCurrentTime(short nCellFmt, const OUString& rUndoStr)
Date aActDate( Date::SYSTEM );
double fDate = aActDate - *pFormatter->GetNullDate();
Time aActTime( Time::SYSTEM );
- double fTime =
- aActTime.Get100Sec() / 100.0 + aActTime.GetSec() +
- (aActTime.GetMin() * 60.0) + (aActTime.GetHour() * 3600.0);
- fTime /= DATE_TIME_FACTOR;
+ double fTime = aActTime.GetHour() / static_cast<double>(::Time::hourPerDay) +
+ aActTime.GetMin() / static_cast<double>(::Time::minutePerDay) +
+ aActTime.GetSec() / static_cast<double>(::Time::secondPerDay) +
+ aActTime.GetNanoSec() / static_cast<double>(::Time::nanoSecPerDay);
pUndoMgr->EnterListAction(rUndoStr, rUndoStr);
pDocSh->GetDocFunc().SetValueCell(aCurPos, fDate+fTime, true);