summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-03-12 01:18:21 +0100
committerEike Rathke <erack@redhat.com>2015-03-12 02:47:15 +0100
commitc6312364b60f65d63b9f99fcbe20c159a486aadb (patch)
treeedffeb5446b7a39bf448f7426f2ea4150e53b324 /sc/source
parent7b355da6853af6678c4ba22710d157cf8a6d43eb (diff)
init and compare opcode hashmap with uppercase symbols
This is necessary now there are TableRef items like #All that need to be matched case insensitive but displayed preserving the case as coded / translated. As a side effect, OOXML functions with _xlfn. prefix are now matched in case that prefix was uppercase. Change-Id: Ie14700d13c40c3e39e6d6aff560bcdfe23707196
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/compiler.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e3d00e528165..f1a0a02ea68a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3582,26 +3582,27 @@ bool ScCompiler::NextNewToken( bool bInArray )
{
mbRewind = false;
const OUString aOrg( cSymbol );
+ aUpper.clear();
+ bool bAsciiUpper = false;
if (bAsciiNonAlnum)
{
+ bAsciiUpper = lcl_UpperAsciiOrI18n( aUpper, aOrg, meGrammar);
if (cSymbol[0] == '#')
{
// This can be only an error constant, if any.
- lcl_UpperAsciiOrI18n( aUpper, aOrg, meGrammar);
if (IsErrorConstant( aUpper))
return true;
break; // do; create ocBad token or set error.
}
- if (IsOpCode( aOrg, bInArray ))
+ if (IsOpCode( aUpper, bInArray ))
return true;
}
- aUpper.clear();
- bool bAsciiUpper = false;
if (bMayBeFuncName)
{
- bAsciiUpper = lcl_UpperAsciiOrI18n( aUpper, aOrg, meGrammar);
+ if (aUpper.isEmpty())
+ bAsciiUpper = lcl_UpperAsciiOrI18n( aUpper, aOrg, meGrammar);
if (IsOpCode( aUpper, bInArray ))
return true;
}