[Libreoffice-commits] core.git: sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Dec 20 18:42:38 PST 2013


 sc/source/core/tool/compiler.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit c80bbdf1c1f3f6613881a2a62fce8f6d5ed53b8d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Dec 20 21:42:08 2013 -0500

    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

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b4b9af3..d8fbed3 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


More information about the Libreoffice-commits mailing list