From ae51f416fa375ad86e1836c1ad03b5da2c551fe5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 28 Jun 2016 23:10:18 +0200 Subject: 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 --- sc/source/core/tool/interpr1.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sc') 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 ) -- cgit