poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r713801 - /poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java
Date Thu, 13 Nov 2008 19:41:02 GMT
Author: josh
Date: Thu Nov 13 11:41:02 2008
New Revision: 713801

URL: http://svn.apache.org/viewvc?rev=713801&view=rev
Log:
extracted local variable

Modified:
    poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java?rev=713801&r1=713800&r2=713801&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java Thu Nov 13 11:41:02
2008
@@ -53,7 +53,9 @@
 	public void notifyUpdateCell(int bookIndex, int sheetIndex, EvaluationCell cell) {
 		FormulaCellCacheEntry fcce = _formulaCellCache.get(cell);
 
-		Loc loc = new Loc(bookIndex, sheetIndex, cell.getRowIndex(), cell.getColumnIndex());
+		int rowIndex = cell.getRowIndex();
+		int columnIndex = cell.getColumnIndex();
+		Loc loc = new Loc(bookIndex, sheetIndex, rowIndex, columnIndex);
 		PlainValueCellCacheEntry pcce = _plainCellCache.get(loc);
 
 		if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
@@ -61,11 +63,11 @@
 				fcce = new FormulaCellCacheEntry();
 				if (pcce == null) {
 					if (_evaluationListener != null) {
-						_evaluationListener.onChangeFromBlankValue(sheetIndex, cell.getRowIndex(),
-								cell.getColumnIndex(), cell, fcce);
+						_evaluationListener.onChangeFromBlankValue(sheetIndex, rowIndex,
+								columnIndex, cell, fcce);
 					}
-					updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, cell.getRowIndex(),
-							cell.getColumnIndex());
+					updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, rowIndex,
+							columnIndex);
 				}
 				_formulaCellCache.put(cell, fcce);
 			} else {
@@ -89,11 +91,10 @@
 					pcce = new PlainValueCellCacheEntry(value);
 					if (fcce == null) {
 						if (_evaluationListener != null) {
-							_evaluationListener.onChangeFromBlankValue(sheetIndex, cell
-									.getRowIndex(), cell.getColumnIndex(), cell, pcce);
+							_evaluationListener.onChangeFromBlankValue(sheetIndex, rowIndex, columnIndex, cell,
pcce);
 						}
 						updateAnyBlankReferencingFormulas(bookIndex, sheetIndex,
-								cell.getRowIndex(), cell.getColumnIndex());
+								rowIndex, columnIndex);
 					}
 					_plainCellCache.put(loc, pcce);
 				}
@@ -153,7 +154,7 @@
 		if (a == null) {
 			return false;
 		}
-		Class cls = a.getClass();
+		Class<?> cls = a.getClass();
 		if (cls != b.getClass()) {
 			// value type is changing
 			return false;



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


Mime
View raw message