diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-28 23:10:18 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-28 23:10:32 +0200 |
commit | ae51f416fa375ad86e1836c1ad03b5da2c551fe5 (patch) | |
tree | 6f00ea011c37fb63aa2fb415c28eddab5a24eac7 /sc | |
parent | 23e5540a05e940cb4a591815e6b85a485b01fc32 (diff) |
identify boolean element type at least for inline arrays (i#87219)
Since 23e5540a05e940cb4a591815e6b85a485b01fc32 we can use
GetDoubleOrStringFromMatrix() and check for SC_MATVAL_BOOLEAN.
Only if transported of course..
If not, then even a {FALSE,FALSE,FALSE,...} result is better than the previous
{FALSE,TRUE,TRUE,...} for any array sequence where all TRUE results resulted
from the previous call to ISLOGICAL() ...
Change-Id: I879e0cbc6557e73ac24713267b5122f923500501
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 76f807d37173..5b186113c619 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1960,9 +1960,13 @@ void ScInterpreter::ScIsLogical() } break; case svMatrix: - // TODO: we don't have type information for arrays except - // numerical/string. - // Fall through + { + double fVal; + svl::SharedString aStr; + ScMatValType nMatValType = GetDoubleOrStringFromMatrix( fVal, aStr); + bRes = (nMatValType == SC_MATVAL_BOOLEAN); + } + break; default: PopError(); if ( !nGlobalError ) |