[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Mon Aug 25 07:21:20 PDT 2014
sc/source/ui/view/viewfun6.cxx | 48 +++++++++++++++++++----------------------
1 file changed, 23 insertions(+), 25 deletions(-)
New commits:
commit c6477b9dd1564a0b3e8c63fea489f7ad464e3792
Author: Eike Rathke <erack at redhat.com>
Date: Mon Aug 25 16:17:12 2014 +0200
nitpick no need for an extra indentation level
Change-Id: Id7ab390cc28e83ac0ca6b9fff1c172ca46e88a68
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index b2494c1..838b82c 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;
}
More information about the Libreoffice-commits
mailing list