From 0d71be930ea14730021a0cfb65766e07eee12cb6 Mon Sep 17 00:00:00 2001 From: Josh Micich Date: Thu, 13 Nov 2008 19:41:02 +0000 Subject: [PATCH] extracted local variable git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@713801 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/ss/formula/EvaluationCache.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/java/org/apache/poi/ss/formula/EvaluationCache.java b/src/java/org/apache/poi/ss/formula/EvaluationCache.java index 1681cc7eb..8b0b7cf27 100644 --- a/src/java/org/apache/poi/ss/formula/EvaluationCache.java +++ b/src/java/org/apache/poi/ss/formula/EvaluationCache.java @@ -53,7 +53,9 @@ final class EvaluationCache { 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 @@ final class EvaluationCache { 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 @@ final class EvaluationCache { 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 @@ final class EvaluationCache { if (a == null) { return false; } - Class cls = a.getClass(); + Class cls = a.getClass(); if (cls != b.getClass()) { // value type is changing return false;