aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2014-07-25 16:15:47 +0000
committerNick Burch <nick@apache.org>2014-07-25 16:15:47 +0000
commitaf999df6aefbb57c98c6cc42881bb5264e7a1f46 (patch)
treedff19ab38d777d9985d0546652508b1fe88a16a4 /src/java/org/apache/poi/ss/formula/LazyAreaEval.java
parent93f8a87e965971d53770f79dbd148582ad226ef7 (diff)
downloadpoi-af999df6aefbb57c98c6cc42881bb5264e7a1f46.tar.gz
poi-af999df6aefbb57c98c6cc42881bb5264e7a1f46.zip
Begin required interface + base-class support for multi-sheet area references for #55906
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1613460 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, 8 insertions, 8 deletions
diff --git a/src/java/org/apache/poi/ss/formula/LazyAreaEval.java b/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
index 9791641a9d..0ac65a758b 100644
--- a/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
+++ b/src/java/org/apache/poi/ss/formula/LazyAreaEval.java
@@ -25,30 +25,30 @@ import org.apache.poi.ss.formula.ptg.AreaI.OffsetArea;
import org.apache.poi.ss.util.CellReference;
/**
- * Provides Lazy Evaluation to a 3D Ranges
- *
- * TODO Provide access to multiple sheets where present
+ * Provides Lazy Evaluation to 3D Ranges
*/
final class LazyAreaEval extends AreaEvalBase {
private final SheetRangeEvaluator _evaluator;
LazyAreaEval(AreaI ptg, SheetRangeEvaluator evaluator) {
- super(ptg);
+ super(ptg, evaluator);
_evaluator = evaluator;
}
public LazyAreaEval(int firstRowIndex, int firstColumnIndex, int lastRowIndex,
int lastColumnIndex, SheetRangeEvaluator evaluator) {
- super(firstRowIndex, firstColumnIndex, lastRowIndex, lastColumnIndex);
+ super(evaluator, firstRowIndex, firstColumnIndex, lastRowIndex, lastColumnIndex);
_evaluator = evaluator;
}
- public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
-
+ public ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex) {
+ return getRelativeValue(getFirstSheetIndex(), relativeRowIndex, relativeColumnIndex);
+ }
+ public ValueEval getRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex) {
int rowIx = (relativeRowIndex + getFirstRow() ) ;
int colIx = (relativeColumnIndex + getFirstColumn() ) ;
- return _evaluator.getEvalForCell(_evaluator.getFirstSheetIndex(), rowIx, colIx);
+ return _evaluator.getEvalForCell(sheetIndex, rowIx, colIx);
}
public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx) {