sc/source/core/tool/interpr4.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
New commits: commit e54cd3fbf40300416ef337981bd356b88ad44a41 Author: Eike Rathke <er...@redhat.com> Date: Tue Jul 19 22:03:09 2016 +0200 Resolves: tdf#100637 narrow down the JumpMatrix path finish condition ... so a pending path result is not prematurely discarded. Change-Id: I87d58b0d242c3ece503e31a30aaf77150bb0f358 diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 5747528..34fcfa8 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -4369,14 +4369,18 @@ StackVar ScInterpreter::Interpret() { if (nLevel == 1) aErrorFunctionStack.push( nErrorFunction); - bGotResult = JumpMatrix( nLevel ); - if (aErrorFunctionStack.empty()) - assert(!"ScInterpreter::Interpret - aErrorFunctionStack empty in JumpMatrix context"); - else + // Restrict nLevel==1 to not prematurely discard a path result. + if (nLevel == 2 || (!aCode.HasStacked() || aCode.IsEndOfPath())) { - nErrorFunction = aErrorFunctionStack.top(); - if (bGotResult) - aErrorFunctionStack.pop(); + bGotResult = JumpMatrix( nLevel ); + if (aErrorFunctionStack.empty()) + assert(!"ScInterpreter::Interpret - aErrorFunctionStack empty in JumpMatrix context"); + else + { + nErrorFunction = aErrorFunctionStack.top(); + if (bGotResult) + aErrorFunctionStack.pop(); + } } } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits