Bug 63984 - [PATCH] AND / OR should treat missing parameters as FALSE
Summary: [PATCH] AND / OR should treat missing parameters as FALSE
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2019-12-03 10:35 UTC by Patrick Böker
Modified: 2019-12-30 19:59 UTC (History)
0 users

bool_missing_params.patch (705 bytes, patch)
2019-12-03 10:35 UTC, Patrick Böker
Details | Diff
BooleanFunctionsTestCaseData.xls (29.50 KB, application/octet-stream)
2019-12-03 10:37 UTC, Patrick Böker

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Böker 2019-12-03 10:35:37 UTC
Created attachment 36909 [details]

`=AND(TRUE,)` returns TRUE in POI, but FALSE in Excel 2003 and Excel 2013.
It seems that Excel treats the missing parameter as FALSE. POI on the other hand ignores the missing parameter.

This patch makes POI behave like Excel in this regard.
I have added some tests to verify the bahvior.
Comment 1 Patrick Böker 2019-12-03 10:37:19 UTC
Created attachment 36910 [details]

To be placed in test-data\spreadsheet\BooleanFunctionsTestCaseData.xls
Comment 2 Dominik Stadler 2019-12-30 19:59:09 UTC
Applied via r1872125, thanks for the patch!