diff options
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index fe314bfef995..e86b955f7686 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -794,9 +794,10 @@ bool ScInterpreter::JumpMatrix( short nStackLevel ) return false; } -double ScInterpreter::Compare() +double ScInterpreter::Compare( ScQueryOp eOp ) { sc::Compare aComp; + aComp.meOp = eOp; aComp.mbIgnoreCase = pDok->GetDocOptions().IsIgnoreCase(); for( short i = 1; i >= 0; i-- ) { @@ -881,7 +882,7 @@ double ScInterpreter::Compare() if( nGlobalError ) return 0; nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL; - return sc::CompareFunc(aComp.maCells[0], aComp.maCells[1], aComp.mbIgnoreCase); + return sc::CompareFunc(aComp); } sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pOptions ) @@ -990,8 +991,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO rCell.mbEmpty = false; } } - aRes.mpMat->PutDouble( - sc::CompareFunc(aComp.maCells[0], aComp.maCells[1], aComp.mbIgnoreCase, pOptions), j, k); + aRes.mpMat->PutDouble( sc::CompareFunc( aComp, pOptions), j, k); } else aRes.mpMat->PutError( errNoValue, j, k); @@ -1081,7 +1081,7 @@ void ScInterpreter::ScEqual() PushMatrix(aMat); } else - PushInt( int(Compare() == 0) ); + PushInt( int(Compare( SC_EQUAL) == 0) ); } void ScInterpreter::ScNotEqual() @@ -1098,7 +1098,7 @@ void ScInterpreter::ScNotEqual() PushMatrix(aMat); } else - PushInt( int(Compare() != 0) ); + PushInt( int(Compare( SC_NOT_EQUAL) != 0) ); } void ScInterpreter::ScLess() @@ -1115,7 +1115,7 @@ void ScInterpreter::ScLess() PushMatrix(aMat); } else - PushInt( int(Compare() < 0) ); + PushInt( int(Compare( SC_LESS) < 0) ); } void ScInterpreter::ScGreater() @@ -1132,7 +1132,7 @@ void ScInterpreter::ScGreater() PushMatrix(aMat); } else - PushInt( int(Compare() > 0) ); + PushInt( int(Compare( SC_GREATER) > 0) ); } void ScInterpreter::ScLessEqual() @@ -1149,7 +1149,7 @@ void ScInterpreter::ScLessEqual() PushMatrix(aMat); } else - PushInt( int(Compare() <= 0) ); + PushInt( int(Compare( SC_LESS_EQUAL) <= 0) ); } void ScInterpreter::ScGreaterEqual() @@ -1166,7 +1166,7 @@ void ScInterpreter::ScGreaterEqual() PushMatrix(aMat); } else - PushInt( int(Compare() >= 0) ); + PushInt( int(Compare( SC_GREATER_EQUAL) >= 0) ); } void ScInterpreter::ScAnd() |