Hey,

this patch fixes a problem with OR and AND in array formulas. The 3.3
code explicitly allowed boolean values and this patch allows them
again.

I think it is an extremely safe fix and should be included into 3-4.

Markus
From 45dac237294d5a069b32e9da79d5209200512ad0 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date: Tue, 1 Nov 2011 17:08:19 +0100
Subject: [PATCH] boolean values are valid for matrix evaluation (fdo#49967)

---
 sc/source/core/tool/scmatrix.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index fcdf412..ac1c7a4 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -733,7 +733,7 @@ bool EvalMatrix(const MatrixImplType& rMat)
         for (size_t j = 0; j < nCols; ++j)
         {
             matrix_element_t eType = rMat.get_type(i, j);
-            if (eType != mdds::element_numeric && eType == mdds::element_boolean)
+            if (eType != mdds::element_numeric && eType != mdds::element_boolean)
                 // assuming a CompareMat this is an error
                 return CreateDoubleError(errIllegalArgument);
 
-- 
1.7.3.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to