You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jo...@apache.org on 2009/11/15 10:12:30 UTC

svn commit: r836344 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java

Author: josh
Date: Sun Nov 15 09:12:30 2009
New Revision: 836344

URL: http://svn.apache.org/viewvc?rev=836344&view=rev
Log:
Updated diagnostic code in HSSFEvaluationWorkbook - regarding changed status of IntersectionPtg

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java?rev=836344&r1=836343&r2=836344&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java Sun Nov 15 09:12:30 2009
@@ -127,7 +127,14 @@
 			// re-parsing the formula text also works, but is a waste of time
 			// It is useful from time to time to run all unit tests with this code
 			// to make sure that all formulas POI can evaluate can also be parsed.
-			return HSSFFormulaParser.parse(cell.getCellFormula(), _uBook, FormulaType.CELL, _uBook.getSheetIndex(cell.getSheet()));
+			try {
+				return HSSFFormulaParser.parse(cell.getCellFormula(), _uBook, FormulaType.CELL, _uBook.getSheetIndex(cell.getSheet()));
+			} catch (RuntimeException e) {
+				// Note - as of Bugzilla 48036 (svn r828244, r828247) POI is capable of evaluating
+				// IntesectionPtg.  However it is still not capable of parsing it.
+				// So FormulaEvalTestData.xls now contains a few formulas that produce errors here.
+				System.err.println(e.getMessage());
+			}
 		}
 		FormulaRecordAggregate fra = (FormulaRecordAggregate) cell.getCellValueRecord();
 		return fra.getFormulaTokens();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org