sc/source/core/tool/compiler.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 2d330a5c48fd200db10fba7c40688221185c2dec Author: Eike Rathke <er...@redhat.com> 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 <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index c91af03eed23..93065ddd0326 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4579,7 +4579,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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits