Kaydet (Commit) 4fc4a3f2 authored tarafından Eike Rathke's avatar Eike Rathke

better SAL_WARN_IF diagnostics

Change-Id: I74fe8e145dda41466f21f20369681d6f1e5274df
üst 15968833
...@@ -497,14 +497,12 @@ void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eO ...@@ -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"); DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range");
if (0 < eOp && sal_uInt16(eOp) < mnSymbols) if (0 < eOp && sal_uInt16(eOp) < mnSymbols)
{ {
DBG_ASSERT( (mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) || SAL_WARN_IF( !((mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) ||
(eOp == ocCurrency) || (eOp == ocSep) || (eOp == ocArrayColSep) || (eOp == ocCurrency) || (eOp == ocSep) || (eOp == ocArrayColSep) ||
(eOp == ocArrayRowSep), (eOp == ocArrayRowSep)), "formula.core",
OStringBuffer( "OpCodeMap::putOpCode: reusing OpCode " << eOp
RTL_CONSTASCII_STRINGPARAM("OpCodeMap::putOpCode: reusing OpCode ")). << ", replacing '" << mpTable[eOp] << "' with '" << rStr << "' in "
append( sal_Int32( eOp)).append( RTL_CONSTASCII_STRINGPARAM(" (")). << (mbEnglish ? "" : "non-") << "English map 0x" << ::std::hex << meGrammar);
append( OUStringToOString( rStr, RTL_TEXTENCODING_ASCII_US)).
append(')').getStr());
mpTable[eOp] = rStr; mpTable[eOp] = rStr;
mpHashMap->insert( OpCodeHashMap::value_type( rStr, eOp)); mpHashMap->insert( OpCodeHashMap::value_type( rStr, eOp));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment