[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Wed Jul 20 14:53:49 UTC 2016


 sc/source/core/tool/interpr4.cxx |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit e54cd3fbf40300416ef337981bd356b88ad44a41
Author: Eike Rathke <erack at 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


More information about the Libreoffice-commits mailing list