diff options
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 8e986de15dca..c4e037f624cd 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1240,7 +1240,7 @@ void FormulaCompiler::AppendErrorConstant( OUStringBuffer& rBuffer, FormulaError rBuffer.append( mxSymbols->getSymbol( eOp)); } -constexpr short nRecursionMax = 42; +constexpr short nRecursionMax = 100; bool FormulaCompiler::GetToken() { @@ -2534,7 +2534,10 @@ OpCode FormulaCompiler::NextToken() // Operator and Plus => operator if (eOp == ocAdd && (eLastOp == ocOpen || eLastOp == ocSep || (SC_OPCODE_START_BIN_OP <= eLastOp && eLastOp < SC_OPCODE_STOP_UN_OP))) + { + FormulaCompilerRecursionGuard aRecursionGuard( nRecursion ); eOp = NextToken(); + } else { // Before an operator there must not be another operator, with the |