diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2013-08-16 09:45:41 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-08-16 18:02:28 +0200 |
commit | 27a5fa2c83c1acb119d5ae9000f040de3fb17c09 (patch) | |
tree | bab1bbe50d7e7f8acd57afde5fac91ba4e6fb2f3 /formula | |
parent | a8d35a87d65e6be12bcd3fc410ba32b2fb9ecd65 (diff) |
import .xlsx files saved by Calc before fdo#59727 was patched
Change-Id: Id1eedc86056f7de24913f8156a819f8a0695fd59
(cherry picked from commit 78c995a184115ef4ec1c348bd9b910a3791de550)
Signed-off-by: Eike Rathke <erack@redhat.com>
differentiated warning for symbol/AddIn pair insertion, fdo#59727
Change-Id: I371bca810c40d4cfab0b9fcd47a070b4e68ee768
(cherry picked from commit b24e3a6042ccfeee650664cc6fb244dfeea497cb)
Signed-off-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index afd6746411df..aecacd4bf1f0 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -253,10 +253,19 @@ const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr,sal_Unicode c ) void FormulaCompiler::OpCodeMap::putExternal( const String & rSymbol, const String & rAddIn ) { + // Different symbols may map to the same AddIn, but the same AddIn may not + // map to different symbols, the first pair wins. Same symbol of course may + // not map to different AddIns, again the first pair wins and also the + // AddIn->symbol mapping is not inserted in other cases. bool bOk = mpExternalHashMap->insert( ExternalHashMap::value_type( rSymbol, rAddIn)).second; + SAL_WARN_IF( !bOk, "formula.core", "OpCodeMap::putExternal: symbol not inserted, " << rSymbol << " -> " << rAddIn); if (bOk) + { bOk = mpReverseExternalHashMap->insert( ExternalHashMap::value_type( rAddIn, rSymbol)).second; - DBG_ASSERT( bOk, "OpCodeMap::putExternal: symbol not inserted"); + // Failed insertion of the AddIn is ok for different symbols mapping to + // the same AddIn. Make this INFO only. + SAL_INFO_IF( !bOk, "formula.core", "OpCodeMap::putExternal: AddIn not inserted, " << rAddIn << " -> " << rSymbol); + } } void FormulaCompiler::OpCodeMap::putExternalSoftly( const String & rSymbol, const String & rAddIn ) |