diff options
author | Eike Rathke <erack@redhat.com> | 2013-09-16 22:19:39 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-09-17 01:04:13 +0200 |
commit | 4fc4a3f2e5f82ed473fc6e9c22aa3fdf9178c6ff (patch) | |
tree | f84a5e5350375ed77601e278e5c24c5f5461cb4e /formula | |
parent | 15968833d5f3b6b89029774b384f92ca115dfe2d (diff) |
better SAL_WARN_IF diagnostics
Change-Id: I74fe8e145dda41466f21f20369681d6f1e5274df
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 4917eec2cc86..c624eeec0f83 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -497,14 +497,12 @@ void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eO DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range"); if (0 < eOp && sal_uInt16(eOp) < mnSymbols) { - DBG_ASSERT( (mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) || - (eOp == ocCurrency) || (eOp == ocSep) || (eOp == ocArrayColSep) || - (eOp == ocArrayRowSep), - OStringBuffer( - RTL_CONSTASCII_STRINGPARAM("OpCodeMap::putOpCode: reusing OpCode ")). - append( sal_Int32( eOp)).append( RTL_CONSTASCII_STRINGPARAM(" (")). - append( OUStringToOString( rStr, RTL_TEXTENCODING_ASCII_US)). - append(')').getStr()); + SAL_WARN_IF( !((mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) || + (eOp == ocCurrency) || (eOp == ocSep) || (eOp == ocArrayColSep) || + (eOp == ocArrayRowSep)), "formula.core", + "OpCodeMap::putOpCode: reusing OpCode " << eOp + << ", replacing '" << mpTable[eOp] << "' with '" << rStr << "' in " + << (mbEnglish ? "" : "non-") << "English map 0x" << ::std::hex << meGrammar); mpTable[eOp] = rStr; mpHashMap->insert( OpCodeHashMap::value_type( rStr, eOp)); } |