diff options
author | Eike Rathke <erack@redhat.com> | 2020-08-20 18:53:02 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-08-20 19:57:30 +0200 |
commit | 64e19525eebd0974f1609300d95a74c1e083e8e3 (patch) | |
tree | 657b8e546a8610381401d379cd88c2d5b34bc700 /sc/source/core/tool/interpr1.cxx | |
parent | 70126c3eb7a532b5f1e852d9ac81d0ece6edf0c3 (diff) |
Follow-up: tdf#132105 COUNTBLANK() count empty strings also in array/matrix
For Excel interoperability this somewhat is a *visual* blank,
unlike ISBLANK() empty strings are counted as blanks. An empty
string in a matrix can be either a formula result transformed to
matrix, or literal input in an inline array. There's no way to
differentiate the origin.
Change-Id: Ib799e95517d95e1a7c28fc4335bd0040f3629ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101083
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index f0e05b08795f..e76531eb031b 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -5183,7 +5183,11 @@ void ScInterpreter::ScCountEmptyCells() SCSIZE nC, nR; xMat->GetDimensions( nC, nR); nMaxCount = nC * nR; - nCount = xMat->Count( true, true); // numbers (implicit), strings and error values + // Numbers (implicit), strings and error values, ignore empty + // strings as those if not entered in an inline array are the + // result of a formula, to be par with a reference to formula + // cell as *visual* blank, see isCellContentEmpty() above. + nCount = xMat->Count( true, true, true); } } break; |