sc/source/filter/oox/defnamesbuffer.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 0750e49471f686480be0a9470a0a0bf3186b2347 Author: Eike Rathke <er...@redhat.com> Date: Thu Jun 25 15:37:08 2015 +0200 TableRef: compile named expression into RPN once to populate information Change-Id: Id41ca0bd6adc8152c29be4d89e9361d8fb2ffe4e (cherry picked from commit 420ed9cb1d7f164be88ee2a01f79372744ed5f03) diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx index a24c96a..fa2a0cf 100644 --- a/sc/source/filter/oox/defnamesbuffer.cxx +++ b/sc/source/filter/oox/defnamesbuffer.cxx @@ -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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits