Kaydet (Commit) c6477b9d authored tarafından Eike Rathke's avatar Eike Rathke

nitpick no need for an extra indentation level

Change-Id: Id7ab390cc28e83ac0ca6b9fff1c172ca46e88a68
üst bb11009a
...@@ -399,32 +399,30 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) ...@@ -399,32 +399,30 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
} }
break; break;
case NUMBERFORMAT_DATETIME: case NUMBERFORMAT_DATETIME:
switch (nCurNumFormatType)
{ {
switch (nCurNumFormatType) case NUMBERFORMAT_DATE:
{ {
case NUMBERFORMAT_DATE: double fDate = rtl::math::approxFloor( fCell);
{ Time aActTime( Time::SYSTEM );
double fDate = rtl::math::approxFloor( fCell); fVal = fDate + aActTime.GetTimeInDays();
Time aActTime( Time::SYSTEM ); }
fVal = fDate + aActTime.GetTimeInDays(); break;
} case NUMBERFORMAT_TIME:
break; {
case NUMBERFORMAT_TIME: double fTime = fCell - rtl::math::approxFloor( fCell);
{ Date aActDate( Date::SYSTEM );
double fTime = fCell - rtl::math::approxFloor( fCell); fVal = (aActDate - *pFormatter->GetNullDate()) + fTime;
Date aActDate( Date::SYSTEM ); }
fVal = (aActDate - *pFormatter->GetNullDate()) + fTime; break;
} default:
break; {
default: DateTime aActDateTime( DateTime::SYSTEM );
{ // Converting the null date to DateTime forces the
DateTime aActDateTime( DateTime::SYSTEM ); // correct operator-() to be used, resulting in a
// Converting the null date to DateTime forces the // fractional date+time instead of only date value.
// correct operator-() to be used, resulting in a fVal = aActDateTime - DateTime( *pFormatter->GetNullDate());
// fractional date+time instead of only date value. }
fVal = aActDateTime - DateTime( *pFormatter->GetNullDate());
}
}
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment