summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-05-12 17:25:03 +0200
committerEike Rathke <erack@redhat.com>2016-05-12 17:35:06 +0200
commit64fa77675d9522988827fc4c263637dd6ffa9822 (patch)
tree72a3bc768f3e5784c937265562e919e8909b4bc4
parent0c991c5dbf1f33372e9c6a405fd2a8a49edb93fd (diff)
Revert "Silence -Werror,-Wimplicit-fallthrough under NDEBUG"
This reverts commit 544d2408e7d8c89ee9e6c802b5487b5a8fb6e0fd. Unconditionally calling abort() here was not the intention.
-rw-r--r--sc/source/ui/view/viewfun6.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 99b53a543cee..51e0e8b64e63 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -46,7 +46,6 @@
#include "globalnames.hxx"
#include "inputhdl.hxx"
-#include <cstdlib>
#include <vector>
using ::std::vector;
@@ -293,6 +292,10 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
nFormat = nCurNumFormat;
}
break;
+ default:
+ assert(!"unhandled current date/time request");
+ nReqFmt = css::util::NumberFormat::DATETIME;
+ // fallthru
case css::util::NumberFormat::DATETIME:
{
DateTime aActDateTime( DateTime::SYSTEM );
@@ -301,8 +304,6 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
nFormat = nCurNumFormat;
}
break;
- default:
- for (;;) std::abort();
}
if (!nFormat)
@@ -385,10 +386,12 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break;
}
break;
+ default:
+ assert(!"unhandled current date/time request");
+ nReqFmt = css::util::NumberFormat::DATETIME;
+ // fallthru
case css::util::NumberFormat::DATETIME:
break;
- default:
- for (;;) std::abort();
}
double fVal = 0.0;
switch (nReqFmt)