summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/compiler.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-12-20 21:42:08 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-12-20 21:43:46 -0500
commitc80bbdf1c1f3f6613881a2a62fce8f6d5ed53b8d (patch)
tree9e9c6e46629779cfdefd941cf8dcbdfc33d59c56 /sc/source/core/tool/compiler.cxx
parent6c9891d40b827c74cacfddf346c9aecad9959a9c (diff)
We have these _xlfn. and _xlfnodf. internal prefixes. Check for __.
We don't want a name starting with a single underscore to be flagged as function name. Let's do that only for double underscores. Change-Id: If194a53e3f3ebf18a6e8ad38ebb16922f6e6083b
Diffstat (limited to 'sc/source/core/tool/compiler.cxx')
-rw-r--r--sc/source/core/tool/compiler.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b4b9af31704d..d8fbed36952e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -40,6 +40,7 @@
#include <tools/urlobj.hxx>
#include <rtl/math.hxx>
#include <rtl/ustring.hxx>
+#include <svtools/miscopt.hxx>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -3440,7 +3441,14 @@ bool ScCompiler::NextNewToken( bool bInArray )
bool bAsciiNonAlnum; // operators, separators, ...
if ( cSymbol[0] < 128 )
{
- bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] ) || cSymbol[0] == '_';
+ bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] );
+ if (!bMayBeFuncName)
+ {
+ SvtMiscOptions aOpt;
+ if (aOpt.IsExperimentalMode())
+ bMayBeFuncName = (cSymbol[0] == '_' && cSymbol[1] == '_');
+ }
+
bAsciiNonAlnum = !bMayBeFuncName && !rtl::isAsciiDigit( cSymbol[0] );
}
else