sc/source/core/tool/compiler.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 2f923aa12e2cbb759e504e06dd3efdfd9e552d34 Author: Eike Rathke <[email protected]> Date: Mon Jun 4 23:05:59 2018 +0200 Resolves: tdf#117879 preserve formula after inline array error Use FormulaError::NestedArray for now to be able to backport without new string resources. Introduce a more specific error in another change. Change-Id: I49bf731f0b17c81dc6a125718bf104e218e508cc Reviewed-on: https://gerrit.libreoffice.org/55300 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> (cherry picked from commit 2d330a5c48fd200db10fba7c40688221185c2dec) Reviewed-on: https://gerrit.libreoffice.org/55308 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index cf1a5b0eb01a..9e9edb77dc7a 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4577,7 +4577,14 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) } } FormulaToken* pNewToken = static_cast<ScTokenArray*>(pArr)->Add( maRawToken.CreateToken()); - if (!pNewToken) + if (!pNewToken && eOp == ocArrayClose && pArr->OpCodeBefore( pArr->GetLen()) == ocArrayClose) + { + // Nested inline array or non-value/non-string in array. The + // original tokens are still in the ScTokenArray and not merged + // into an ScMatrixToken. Set error but keep on tokenizing. + SetError( FormulaError::NestedArray); + } + else if (!pNewToken) { SetError(FormulaError::CodeOverflow); break; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
