[Libreoffice-commits] core.git: 3 commits - sc/source
Eike Rathke
erack at redhat.com
Thu May 12 15:35:38 UTC 2016
sc/source/core/tool/compiler.cxx | 6 ++++--
sc/source/ui/view/viewfun6.cxx | 13 ++++++++-----
2 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit d7d1ce3cd89fb08b07ec87ecafba39da4751abc0
Author: Eike Rathke <erack at redhat.com>
Date: Thu May 12 17:31:18 2016 +0200
if we can't use assert() as intended then use SAL_WARN()
... even if we lose the "hit me on the head" feature.
Change-Id: I7a8ea4ef25a4aa21b06fae8751e7037ff27bad8b
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 51e0e8b..37e2cfa 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -293,9 +293,9 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
}
break;
default:
- assert(!"unhandled current date/time request");
+ SAL_WARN("sc.ui","unhandled current date/time request");
nReqFmt = css::util::NumberFormat::DATETIME;
- // fallthru
+ SAL_FALLTHROUGH;
case css::util::NumberFormat::DATETIME:
{
DateTime aActDateTime( DateTime::SYSTEM );
@@ -387,9 +387,9 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
}
break;
default:
- assert(!"unhandled current date/time request");
+ SAL_WARN("sc.ui","unhandled current date/time request");
nReqFmt = css::util::NumberFormat::DATETIME;
- // fallthru
+ SAL_FALLTHROUGH;
case css::util::NumberFormat::DATETIME:
break;
}
commit 64fa77675d9522988827fc4c263637dd6ffa9822
Author: Eike Rathke <erack at redhat.com>
Date: Thu May 12 17:25:03 2016 +0200
Revert "Silence -Werror,-Wimplicit-fallthrough under NDEBUG"
This reverts commit 544d2408e7d8c89ee9e6c802b5487b5a8fb6e0fd.
Unconditionally calling abort() here was not the intention.
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 99b53a5..51e0e8b 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)
commit 0c991c5dbf1f33372e9c6a405fd2a8a49edb93fd
Author: Eike Rathke <erack at redhat.com>
Date: Tue May 10 17:20:21 2016 +0200
comment the outdated documentation
Change-Id: I6ee52d2d61ebb1763f2f86c467021fc80467601f
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2a6c3db..7340de6 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1922,8 +1922,10 @@ static sal_Unicode* lcl_UnicodeStrNCpy( sal_Unicode* pDst, const sal_Unicode* pS
// NextSymbol
-// Parses the formula into separate symbols for further
-// processing (Turing-Machine).
+// Parses the formula into separate symbols for further processing.
+// XXX NOTE: this is a rough sketch of the original idea, there are other
+// states that were added and didn't make it into this table and things are
+// more complicated. Use the source, Luke.
// initial state = GetChar
More information about the Libreoffice-commits
mailing list