summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-08-25 16:17:12 +0200
committerEike Rathke <erack@redhat.com>2014-08-25 16:20:50 +0200
commitc6477b9dd1564a0b3e8c63fea489f7ad464e3792 (patch)
tree6805ba7e87680d4080294ba951dffe224d5424e7
parentbb11009aba7a12dd23da4e0f64008c1063fc6652 (diff)
nitpick no need for an extra indentation level
Change-Id: Id7ab390cc28e83ac0ca6b9fff1c172ca46e88a68
-rw-r--r--sc/source/ui/view/viewfun6.cxx48
1 files changed, 23 insertions, 25 deletions
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index b2494c159335..838b82c43789 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -399,32 +399,30 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
}
break;
case NUMBERFORMAT_DATETIME:
+ switch (nCurNumFormatType)
{
- switch (nCurNumFormatType)
- {
- case NUMBERFORMAT_DATE:
- {
- double fDate = rtl::math::approxFloor( fCell);
- Time aActTime( Time::SYSTEM );
- fVal = fDate + aActTime.GetTimeInDays();
- }
- break;
- case NUMBERFORMAT_TIME:
- {
- double fTime = fCell - rtl::math::approxFloor( fCell);
- Date aActDate( Date::SYSTEM );
- fVal = (aActDate - *pFormatter->GetNullDate()) + fTime;
- }
- break;
- default:
- {
- DateTime aActDateTime( DateTime::SYSTEM );
- // Converting the null date to DateTime forces the
- // correct operator-() to be used, resulting in a
- // fractional date+time instead of only date value.
- fVal = aActDateTime - DateTime( *pFormatter->GetNullDate());
- }
- }
+ case NUMBERFORMAT_DATE:
+ {
+ double fDate = rtl::math::approxFloor( fCell);
+ Time aActTime( Time::SYSTEM );
+ fVal = fDate + aActTime.GetTimeInDays();
+ }
+ break;
+ case NUMBERFORMAT_TIME:
+ {
+ double fTime = fCell - rtl::math::approxFloor( fCell);
+ Date aActDate( Date::SYSTEM );
+ fVal = (aActDate - *pFormatter->GetNullDate()) + fTime;
+ }
+ break;
+ default:
+ {
+ DateTime aActDateTime( DateTime::SYSTEM );
+ // Converting the null date to DateTime forces the
+ // correct operator-() to be used, resulting in a
+ // fractional date+time instead of only date value.
+ fVal = aActDateTime - DateTime( *pFormatter->GetNullDate());
+ }
}
break;
}