/[Apache-SVN]
ViewVC logotype

Revision 1844295


Jump to revision: Previous Next
Author: gwoolsey
Date: Fri Oct 19 01:11:47 2018 UTC (5 years, 7 months ago)
Changed paths: 7
Log Message:
#62834 FormulaEvaluator.evaluateInCell() throws Exception

added cell type = formula check when looping through the shared formula range, to ignore any non-formula cells.

Also refactored a bit to enable passing in the evaluation context, as getCellFormula() uses it behind the scenes when evaluating a shared formula cell (has to shift the formula references based on the master cell).  Review of these changes is welcome, as always.

Checked all other code referencing the "SHARED" enum, and didn't see anything else that dealt with formula cell values and thus would need to notice non-formula cells.

Added unit test based on the failing file from Bugzilla.  Test failed until the fixed code was in place.

Changed paths

Path Details
Directorypoi/trunk/src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java modified , text changed
Directorypoi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java modified , text changed
Directorypoi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java modified , text changed
Directorypoi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java modified , text changed
Directorypoi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java modified , text changed
Directorypoi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java modified , text changed
Directorypoi/trunk/test-data/spreadsheet/62834.xlsx added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26