poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ber...@apache.org
Subject svn commit: r1381249 - in /poi/trunk/src: documentation/content/xdocs/spreadsheet/ java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/usermodel/ java/org/apache/poi/ss/util/ ooxml/java/org/apache/poi/xssf/usermodel/
Date Wed, 05 Sep 2012 17:03:56 GMT
Author: berlog
Date: Wed Sep  5 17:03:55 2012
New Revision: 1381249

URL: http://svn.apache.org/viewvc?rev=1381249&view=rev
Log:
bugzilla ticket 53642: added detailed logging for formula evaluation in both HSSF and XSSF
modules

Modified:
    poi/trunk/src/documentation/content/xdocs/spreadsheet/eval.xml
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
    poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java

Modified: poi/trunk/src/documentation/content/xdocs/spreadsheet/eval.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/spreadsheet/eval.xml?rev=1381249&r1=1381248&r2=1381249&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/spreadsheet/eval.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/spreadsheet/eval.xml Wed Sep  5 17:03:55 2012
@@ -319,16 +319,16 @@ for(int sheetNum = 0; sheetNum < wb.g
 	// activate logging to console
 	System.setProperty("org.apache.poi.util.POILogger", "org.apache.poi.util.SystemOutLogger");
 	System.setProperty("poi.log.level", POILogger.INFO + "");
-	
+
 	// open your file
 	Workbook wb = new HSSFWorkbook(new FileInputStream("foobar.xls"));
-    HSSFFormulaEvaluator fe = (HSSFFormulaEvaluator) wb.getCreationHelper().createFormulaEvaluator();
+    FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
 
 	// get your cell
 	Cell cell = wb.getSheet(0).getRow(0).getCell(0);		// just a dummy example
 
 	// perform debug output for the next evaluate-call only
-    fe.setDebugEvaluationOutputForNextEval(true);
+    evaluator.setDebugEvaluationOutputForNextEval(true);
 	evaluator.evaluateFormulaCell(cell);
 	evaluator.evaluateFormulaCell(cell);		// no logging performed for this next evaluate-call
 		</source>

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java?rev=1381249&r1=1381248&r2=1381249&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java Wed Sep  5
17:03:55 2012
@@ -389,14 +389,7 @@ public class HSSFFormulaEvaluator implem
         _bookEvaluator.setIgnoreMissingWorkbooks(ignore);
     }
 
-    /**
-     * @param value whether perform detailed output
-     *
-     * Perform detailed output of formula evaluation for next evaluation only?
-     * Is for developer use only (also developers using POI for their XLS files).
-     * Log-Level WARN is for basic info, INFO for detailed information. These quite
-     * high levels are used because you have to explicitly enable this specific logging.
-     */
+    /** {@inheritDoc} */
     public void setDebugEvaluationOutputForNextEval(boolean value){
         _bookEvaluator.setDebugEvaluationOutputForNextEval(value);
     }

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java?rev=1381249&r1=1381248&r2=1381249&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java Wed Sep  5 17:03:55
2012
@@ -114,4 +114,15 @@ public interface FormulaEvaluator {
      * @param cell
      */
     Cell evaluateInCell(Cell cell);
+
+    /**
+     * Perform detailed output of formula evaluation for next evaluation only?
+     * Is for developer use only (also developers using POI for their XLS files).
+     * Log-Level WARN is for basic info, INFO for detailed information. These quite
+     * high levels are used because you have to explicitly enable this specific logging.
+	 
+     * @param value whether to perform detailed output
+     */
+    void setDebugEvaluationOutputForNextEval(boolean value);
+	
 }

Modified: poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java?rev=1381249&r1=1381248&r2=1381249&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java Wed Sep  5 17:03:55 2012
@@ -61,6 +61,8 @@ public class SheetUtil {
         public void notifyUpdateCell(Cell cell) {}
         public CellValue evaluate(Cell cell) {return null;  }
         public Cell evaluateInCell(Cell cell) { return null; }
+        public void setDebugEvaluationOutputForNextEval(boolean value) {}
+
         public void evaluateAll() {}
 
         public int evaluateFormulaCell(Cell cell) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java?rev=1381249&r1=1381248&r2=1381249&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java Wed Sep
 5 17:03:55 2012
@@ -279,4 +279,10 @@ public class XSSFFormulaEvaluator implem
 		}
 		throw new RuntimeException("Unexpected eval class (" + eval.getClass().getName() + ")");
 	}
+	
+    /** {@inheritDoc} */
+    public void setDebugEvaluationOutputForNextEval(boolean value){
+        _bookEvaluator.setDebugEvaluationOutputForNextEval(value);
+    }
+
 }



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


Mime
View raw message