diff -upr old/sc/source/core/inc/interpre.hxx new/sc/source/core/inc/interpre.hxx --- old/sc/source/core/inc/interpre.hxx 2008-06-10 15:41:54.000000000 +0800 +++ new/sc/source/core/inc/interpre.hxx 2008-08-12 17:13:18.000000000 +0800 @@ -155,6 +155,9 @@ private: BYTE cPar; // current count of parameters BOOL bCalcAsShown; // precision as shown BOOL bMatrixFormula; // formula cell is a matrix formula + // flag for tokens whose type is not svMatrix in ScIfJump() + // if the flag is TRUE, don't go into JumpMatrix() + BOOL bNotJump; //---------------------------------Funktionen in interpre.cxx--------- // nMust <= nAct <= nMax ? ok : PushError diff -upr old/sc/source/core/tool/interpr1.cxx new/sc/source/core/tool/interpr1.cxx --- old/sc/source/core/tool/interpr1.cxx 2008-06-10 15:41:54.000000000 +0800 +++ new/sc/source/core/tool/interpr1.cxx 2008-08-12 17:15:42.000000000 +0800 @@ -180,6 +180,7 @@ void ScInterpreter::ScIfJump() { // TRUE if( nJumpCount >= 2 ) { // THEN path + bNotJump = TRUE; aCode.Jump( pJump[ 1 ], pJump[ nJumpCount ] ); } else @@ -193,6 +194,7 @@ void ScInterpreter::ScIfJump() { // FALSE if( nJumpCount == 3 ) { // ELSE path + bNotJump = TRUE; aCode.Jump( pJump[ 2 ], pJump[ nJumpCount ] ); } else diff -upr old/sc/source/core/tool/interpr4.cxx new/sc/source/core/tool/interpr4.cxx --- old/sc/source/core/tool/interpr4.cxx 2008-06-10 15:41:54.000000000 +0800 +++ new/sc/source/core/tool/interpr4.cxx 2008-08-12 17:17:31.000000000 +0800 @@ -3225,7 +3225,8 @@ ScInterpreter::ScInterpreter( ScFormulaC pTokenMatrixMap( NULL ), pMyFormulaCell( pCell ), pFormatter( pDoc->GetFormatTable() ), - bCalcAsShown( pDoc->GetDocOptions().IsCalcAsShown() ) + bCalcAsShown( pDoc->GetDocOptions().IsCalcAsShown() ), + bNotJump( FALSE ) { // pStack = new ScToken*[ MAXSTACK ]; @@ -3695,10 +3696,15 @@ StackVar ScInterpreter::Interpret() ; // nothing else nLevel = 0; - if ( nLevel == 1 || (nLevel == 2 && aCode.IsEndOfPath()) ) + if ( ( nLevel == 1 || (nLevel == 2 && aCode.IsEndOfPath()) ) + && !bNotJump ) bGotResult = JumpMatrix( nLevel ); else + { pJumpMatrix = NULL; + if ( bNotJump ) + bNotJump = FALSE; + } } while ( bGotResult );