[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Thu Jun 25 06:40:46 PDT 2015
sc/source/filter/oox/defnamesbuffer.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 420ed9cb1d7f164be88ee2a01f79372744ed5f03
Author: Eike Rathke <erack at redhat.com>
Date: Thu Jun 25 15:37:08 2015 +0200
TableRef: compile named expression into RPN once to populate information
Change-Id: Id41ca0bd6adc8152c29be4d89e9361d8fb2ffe4e
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;
}
More information about the Libreoffice-commits
mailing list