aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
diff options
context:
space:
mode:
authorJosh Micich <josh@apache.org>2009-11-20 01:13:17 +0000
committerJosh Micich <josh@apache.org>2009-11-20 01:13:17 +0000
commitb8ec92ee353f3b5ce65c43d87b06d696b0c0bf36 (patch)
treeefd64bff039eaedcc75850ab0cc348aeeee36b62 /src/java/org/apache/poi/ss/formula/LazyAreaEval.java
parentb5cdef8c2e9d6346e2064d4d04cb8df22129c6cb (diff)
downloadpoi-b8ec92ee353f3b5ce65c43d87b06d696b0c0bf36.tar.gz
poi-b8ec92ee353f3b5ce65c43d87b06d696b0c0bf36.zip
moved lazy ref creation methods to OperationEvaluationContext
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@882375 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/formula/LazyAreaEval.java')
-rw-r--r--src/java/org/apache/poi/ss/formula/LazyAreaEval.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/java/org/apache/poi/ss/formula/LazyAreaEval.java b/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
index 3b891fbbb8..b8e186a7d7 100644
--- a/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
+++ b/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
@@ -26,22 +26,28 @@ import org.apache.poi.hssf.util.CellReference;
/**
*
- * @author Josh Micich
+ * @author Josh Micich
*/
final class LazyAreaEval extends AreaEvalBase {
private final SheetRefEvaluator _evaluator;
- public LazyAreaEval(AreaI ptg, SheetRefEvaluator evaluator) {
+ LazyAreaEval(AreaI ptg, SheetRefEvaluator evaluator) {
super(ptg);
_evaluator = evaluator;
}
- public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
-
+ public LazyAreaEval(int firstRowIndex, int firstColumnIndex, int lastRowIndex,
+ int lastColumnIndex, SheetRefEvaluator evaluator) {
+ super(firstRowIndex, firstColumnIndex, lastRowIndex, lastColumnIndex);
+ _evaluator = evaluator;
+ }
+
+ public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
+
int rowIx = (relativeRowIndex + getFirstRow() ) & 0xFFFF;
int colIx = (relativeColumnIndex + getFirstColumn() ) & 0x00FF;
-
+
return _evaluator.getEvalForCell(rowIx, colIx);
}