summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-08-20 17:32:25 +0200
committerEike Rathke <erack@redhat.com>2020-08-20 18:38:41 +0200
commit70126c3eb7a532b5f1e852d9ac81d0ece6edf0c3 (patch)
treee840c8ac0e1ed4ea1e07f36661f3a30a15a6d4f9 /sc
parent764d52045b0a28e071f214fb1334b7a0c05df6bd (diff)
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@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr1.cxx16
1 files changed, 16 insertions, 0 deletions
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)