[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed May 4 13:28:26 PDT 2011


 sc/source/core/tool/interpr1.cxx |   36 ++++++++++++++++++++----------------
 sc/source/core/tool/interpr4.cxx |    8 ++------
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 71a67be19f95758035a8214126f5f008f1647c05
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed May 4 16:27:16 2011 -0400

    fdo#33137: Fixed external references with COUNTIF.

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index a3a7850..3a7ad46 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 1c7ecdd..551a1c2 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
     {


More information about the Libreoffice-commits mailing list