/[Apache-SVN]
ViewVC logotype

Revision 1803121


Jump to revision: Previous Next
Author: gwoolsey
Date: Wed Jul 26 22:19:58 2017 UTC (6 years, 9 months ago)
Changed paths: 6
Log Message:
Fix data validation value list evaluation

One of my users found that my initial implementation was lacking a core distinction - most evaluations expect a single result, and "unwrap" 2/3D ValueEval results to a single value based on the input row/column.

However, data validation list formulas explicitly are expected to return a 2D ValueEval.  This worked when the formula was simple and evaluated to a single Ptg, but only returned one value when the formula was more complex, or referenced a named range defined as a complex formula.

This change teaches WorkbookEvaluator about the distinction, by way of a new attribute for FormulaType.

There is room for discussion over how it is implemented, but this works for me.

Includes the failing workbook we had as a new unit test.

While I was in FormulaType I went ahead and removed the deprecated, unused, and redundant code marked for removal in 3.17.

Changed paths

Path Details
Directorypoi/trunk/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/ss/formula/FormulaType.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java modified , text changed
Directorypoi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java modified , text changed
Directorypoi/trunk/test-data/spreadsheet/dataValidationTableRange.xlsx added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26