Kaydet (Commit) 0750e494 authored tarafından Eike Rathke's avatar Eike Rathke

TableRef: compile named expression into RPN once to populate information

Change-Id: Id41ca0bd6adc8152c29be4d89e9361d8fb2ffe4e
(cherry picked from commit 420ed9cb)
üst 53d8b344
......@@ -387,6 +387,13 @@ std::unique_ptr<ScTokenArray> DefinedName::getScTokens()
ScCompiler aCompiler(&getScDocument(), ScAddress(0, 0, mnCalcSheet));
aCompiler.SetGrammar(formula::FormulaGrammar::GRAM_OOXML);
std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(maModel.maFormula));
// Compile the tokens into RPN once to populate information into tokens
// where necessary, e.g. for TableRef inner reference. RPN can be discarded
// after, a resulting error must be reset.
sal_uInt16 nErr = pArray->GetCodeError();
aCompiler.CompileTokenArray();
pArray->DelRPN();
pArray->SetCodeError(nErr);
return pArray;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment