From edd4370f5ba49a26a526995b6a28f623d68041ce Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 2 May 2016 20:37:59 +0200 Subject: [PATCH] check presence of token, tdf#96426 follow-up Change-Id: I4c368dfd113b02d208013b4ba79dff606769a150 --- formula/source/core/api/FormulaCompiler.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 96bb268c12f1..ffd0f89a1a8b 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -305,6 +305,9 @@ bool isRangeResultOpCode( OpCode eOp ) } /** + @param pToken + MUST be a valid token, caller has to ensure. + @param bRight If bRPN==false, bRight==false means opcodes for left side are checked, bRight==true means opcodes for right side. If bRPN==true @@ -1200,6 +1203,7 @@ bool FormulaCompiler::GetToken() pArr->nIndex--; // we advanced to the second ocColRowName, step back } else if (pSpacesToken && FormulaGrammar::isExcelSyntax( meGrammar) && + pCurrToken && mpToken && isPotentialRangeType( pCurrToken.get(), false, false) && isPotentialRangeType( mpToken.get(), false, true)) {