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

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 20 16:39:22 UTC 2020


 sc/source/core/tool/interpr1.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 70126c3eb7a532b5f1e852d9ac81d0ece6edf0c3
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Thu Aug 20 17:32:25 2020 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Thu Aug 20 18:38:41 2020 +0200

    Resolves: tdf#132105 COUNTBLANK() handle external references and array/matrix
    
    Change-Id: I6f39c67a20c0d683da9f14775ce8cbddf2f92349
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101079
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 783dfd2849bb..f0e05b08795f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5171,6 +5171,22 @@ void ScInterpreter::ScCountEmptyCells()
             }
         }
         break;
+        case svMatrix:
+        case svExternalSingleRef:
+        case svExternalDoubleRef:
+        {
+            ScMatrixRef xMat = GetMatrix();
+            if (!xMat)
+                SetError( FormulaError::IllegalParameter);
+            else
+            {
+                SCSIZE nC, nR;
+                xMat->GetDimensions( nC, nR);
+                nMaxCount = nC * nR;
+                nCount = xMat->Count( true, true);  // numbers (implicit), strings and error values
+            }
+        }
+        break;
         default : SetError(FormulaError::IllegalParameter); break;
     }
     if (xResMat)


More information about the Libreoffice-commits mailing list