extracted local variable

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@713801 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Josh Micich 2008-11-13 19:41:02 +00:00
parent cf20f3397f
commit 0d71be930e

View File

@ -53,7 +53,9 @@ final class EvaluationCache {
public void notifyUpdateCell(int bookIndex, int sheetIndex, EvaluationCell cell) { public void notifyUpdateCell(int bookIndex, int sheetIndex, EvaluationCell cell) {
FormulaCellCacheEntry fcce = _formulaCellCache.get(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); PlainValueCellCacheEntry pcce = _plainCellCache.get(loc);
if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) { if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
@ -61,11 +63,11 @@ final class EvaluationCache {
fcce = new FormulaCellCacheEntry(); fcce = new FormulaCellCacheEntry();
if (pcce == null) { if (pcce == null) {
if (_evaluationListener != null) { if (_evaluationListener != null) {
_evaluationListener.onChangeFromBlankValue(sheetIndex, cell.getRowIndex(), _evaluationListener.onChangeFromBlankValue(sheetIndex, rowIndex,
cell.getColumnIndex(), cell, fcce); columnIndex, cell, fcce);
} }
updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, cell.getRowIndex(), updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, rowIndex,
cell.getColumnIndex()); columnIndex);
} }
_formulaCellCache.put(cell, fcce); _formulaCellCache.put(cell, fcce);
} else { } else {
@ -89,11 +91,10 @@ final class EvaluationCache {
pcce = new PlainValueCellCacheEntry(value); pcce = new PlainValueCellCacheEntry(value);
if (fcce == null) { if (fcce == null) {
if (_evaluationListener != null) { if (_evaluationListener != null) {
_evaluationListener.onChangeFromBlankValue(sheetIndex, cell _evaluationListener.onChangeFromBlankValue(sheetIndex, rowIndex, columnIndex, cell, pcce);
.getRowIndex(), cell.getColumnIndex(), cell, pcce);
} }
updateAnyBlankReferencingFormulas(bookIndex, sheetIndex, updateAnyBlankReferencingFormulas(bookIndex, sheetIndex,
cell.getRowIndex(), cell.getColumnIndex()); rowIndex, columnIndex);
} }
_plainCellCache.put(loc, pcce); _plainCellCache.put(loc, pcce);
} }
@ -153,7 +154,7 @@ final class EvaluationCache {
if (a == null) { if (a == null) {
return false; return false;
} }
Class cls = a.getClass(); Class<?> cls = a.getClass();
if (cls != b.getClass()) { if (cls != b.getClass()) {
// value type is changing // value type is changing
return false; return false;