[Libreoffice-commits] core.git: formula/source
aybuke
aybuke.147 at gmail.com
Thu Feb 18 19:52:41 UTC 2016
formula/source/core/api/FormulaCompiler.cxx | 5 ++++-
formula/source/core/api/token.cxx | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 05d2684840d3956ff76ed6db00a43cf2d49c8454
Author: aybuke <aybuke.147 at gmail.com>
Date: Sun Jan 31 15:25:45 2016 +0200
tdf#43157 Cleanup DBG_ASSERT for formula module.
Change-Id: I1be9332b4408b3c28aacfa872d63fce67adcb1fe
Reviewed-on: https://gerrit.libreoffice.org/21958
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index e0d7093..a17d9ee 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -512,7 +512,6 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create
void FormulaCompiler::OpCodeMap::putOpCode( const OUString & rStr, const OpCode eOp, const CharClass* pCharClass )
{
- DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range");
if (0 < eOp && sal_uInt16(eOp) < mnSymbols)
{
SAL_WARN_IF( !(mpTable[eOp].isEmpty() || (mpTable[eOp] == rStr) ||
@@ -526,6 +525,10 @@ void FormulaCompiler::OpCodeMap::putOpCode( const OUString & rStr, const OpCode
OUString aUpper( pCharClass ? pCharClass->uppercase( rStr) : rStr.toAsciiUpperCase());
mpHashMap->insert( OpCodeHashMap::value_type( aUpper, eOp));
}
+ else
+ {
+ SAL_WARN( "formula.core", "OpCodeMap::putOpCode: OpCode out of range");
+ }
}
// class FormulaCompiler
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index fe7c2bb..22d3c84 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1426,7 +1426,7 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention &
break;
case ocClose:
pCtx[ nFn ].AddMoreArgs( pNewArr, rConv );
- DBG_ASSERT( nFn > 0, "FormulaTokenArray::RewriteMissing: underflow");
+ SAL_WARN_IF(nFn <= 0, "formula.core", "FormulaTokenArray::RewriteMissing: underflow");
if (nOcas > 0 && pOcas[ nOcas-1 ] == nFn)
--nOcas; // leaving ADDRESS()
if (nFn > 0)
More information about the Libreoffice-commits
mailing list