diff options
author | aybuke <aybuke.147@gmail.com> | 2016-01-31 15:25:45 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-02-18 19:52:14 +0000 |
commit | 05d2684840d3956ff76ed6db00a43cf2d49c8454 (patch) | |
tree | c53be61e8de16b6cdffbc07ba1edb03b8593b424 | |
parent | 8c97225d311af6711ac49755079acd29842afeba (diff) |
tdf#43157 Cleanup DBG_ASSERT for formula module.
Change-Id: I1be9332b4408b3c28aacfa872d63fce67adcb1fe
Reviewed-on: https://gerrit.libreoffice.org/21958
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 5 | ||||
-rw-r--r-- | formula/source/core/api/token.cxx | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index e0d7093acafa..a17d9eee570f 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 fe7c2bbc755e..22d3c84bb9db 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) |