From 70126c3eb7a532b5f1e852d9ac81d0ece6edf0c3 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 20 Aug 2020 17:32:25 +0200 Subject: 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 Tested-by: Jenkins --- sc/source/core/tool/interpr1.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sc') 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) -- cgit