diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-05-04 16:27:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-05-04 16:27:16 -0400 |
commit | 71a67be19f95758035a8214126f5f008f1647c05 (patch) | |
tree | 9270966391edc504d4f236bb98724baf81843b50 | |
parent | 6cae0836410f5e72ecfeb934aa886353417e6d38 (diff) |
fdo#33137: Fixed external references with COUNTIF.
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 36 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 8 |
2 files changed, 22 insertions, 22 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index a3a785040..3a7ad462b 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4603,7 +4603,9 @@ void ScInterpreter::ScCountIf() } } break; - case svMatrix : + case svMatrix: + case svExternalSingleRef: + case svExternalDoubleRef: { ScMatValType nType = GetDoubleOrStringFromMatrix( fVal, rString); @@ -4648,23 +4650,25 @@ void ScInterpreter::ScCountIf() nTab2 = nTab1; break; case svMatrix: + case svExternalSingleRef: + case svExternalDoubleRef: + { + pQueryMatrix = GetMatrix(); + if (!pQueryMatrix) { - pQueryMatrix = PopMatrix(); - if (!pQueryMatrix) - { - PushIllegalParameter(); - return; - } - nCol1 = 0; - nRow1 = 0; - nTab1 = 0; - SCSIZE nC, nR; - pQueryMatrix->GetDimensions( nC, nR); - nCol2 = static_cast<SCCOL>(nC - 1); - nRow2 = static_cast<SCROW>(nR - 1); - nTab2 = 0; + PushIllegalParameter(); + return; } - break; + nCol1 = 0; + nRow1 = 0; + nTab1 = 0; + SCSIZE nC, nR; + pQueryMatrix->GetDimensions( nC, nR); + nCol2 = static_cast<SCCOL>(nC - 1); + nRow2 = static_cast<SCROW>(nR - 1); + nTab2 = 0; + } + break; default: PushIllegalParameter(); return ; diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 1c7ecdd33..551a1c2e9 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2350,13 +2350,9 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( double& rDouble, ScMatrixRef pMat; StackVar eType = GetStackType(); - if (eType == svExternalDoubleRef) + if (eType == svExternalDoubleRef || eType == svExternalSingleRef || eType == svMatrix) { - PopExternalDoubleRef(pMat); - } - else if (eType == svMatrix) - { - pMat = PopMatrix(); + pMat = GetMatrix(); } else { |