diff options
Diffstat (limited to 'sc/source/ui/view/viewfun6.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun6.cxx | 13 |
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) |