sc/source/core/tool/compiler.cxx | 9 ++++++++- sc/source/core/tool/interpr7.cxx | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-)
New commits: commit a7c23c4b965be1a3f90acd5c6233a027077defe8 Author: Michael Meeks <michael.me...@collabora.com> Date: Sat Dec 28 22:00:23 2013 +0000 don't create and destroy SvtMiscOptions here unless its needed. Change-Id: I4b6e8136c56c824380c454272d9df4c646ec8e86 diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index dcb676e..2d4c23c 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3442,11 +3442,10 @@ bool ScCompiler::NextNewToken( bool bInArray ) if ( cSymbol[0] < 128 ) { bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] ); - if (!bMayBeFuncName) + if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') ) { SvtMiscOptions aOpt; - if (aOpt.IsExperimentalMode()) - bMayBeFuncName = (cSymbol[0] == '_' && cSymbol[1] == '_'); + bMayBeFuncName = aOpt.IsExperimentalMode(); } bAsciiNonAlnum = !bMayBeFuncName && !rtl::isAsciiDigit( cSymbol[0] ); commit dd067e217dca402eef1e0c54f26b416b2c593946 Author: Kohei Yoshida <kohei.yosh...@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 7b1ef50..dcb676e 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 commit 8cc1593be59e6c10ebd3fb9b84595ae0347508b0 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Fri Dec 20 21:20:16 2013 -0500 Let's make it available in experimental mode only. Change-Id: I023db5b98518296eb2964abe8c62f60d65d413a8 diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx index 0bcf7ae..aa07090 100644 --- a/sc/source/core/tool/interpr7.cxx +++ b/sc/source/core/tool/interpr7.cxx @@ -9,6 +9,8 @@ #include "interpre.hxx" #include <rtl/strbuf.hxx> +#include <formula/errorcodes.hxx> +#include <svtools/miscopt.hxx> #include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> @@ -213,6 +215,13 @@ void ScInterpreter::ScDebugVar() // users. This is a convenient way to extract arbitrary internal state to // a cell for easier debugging. + SvtMiscOptions aMiscOptions; + if (!aMiscOptions.IsExperimentalMode()) + { + PushError(ScErrorCodes::errNoName); + return; + } + if (!MustHaveParamCount(GetByte(), 1)) { PushIllegalParameter(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits