modified MultiOperandNumericFunction to use TwoDEval
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@888714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
18041addf0
commit
adac5e854d
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
package org.apache.poi.hssf.record.formula.functions;
|
package org.apache.poi.hssf.record.formula.functions;
|
||||||
|
|
||||||
import org.apache.poi.hssf.record.formula.eval.AreaEval;
|
|
||||||
import org.apache.poi.hssf.record.formula.eval.BlankEval;
|
import org.apache.poi.hssf.record.formula.eval.BlankEval;
|
||||||
import org.apache.poi.hssf.record.formula.eval.BoolEval;
|
import org.apache.poi.hssf.record.formula.eval.BoolEval;
|
||||||
import org.apache.poi.hssf.record.formula.eval.ErrorEval;
|
import org.apache.poi.hssf.record.formula.eval.ErrorEval;
|
||||||
@ -27,6 +26,7 @@ import org.apache.poi.hssf.record.formula.eval.OperandResolver;
|
|||||||
import org.apache.poi.hssf.record.formula.eval.RefEval;
|
import org.apache.poi.hssf.record.formula.eval.RefEval;
|
||||||
import org.apache.poi.hssf.record.formula.eval.StringEval;
|
import org.apache.poi.hssf.record.formula.eval.StringEval;
|
||||||
import org.apache.poi.hssf.record.formula.eval.ValueEval;
|
import org.apache.poi.hssf.record.formula.eval.ValueEval;
|
||||||
|
import org.apache.poi.ss.formula.TwoDEval;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Amol S. Deshmukh < amolweb at ya hoo dot com >
|
* @author Amol S. Deshmukh < amolweb at ya hoo dot com >
|
||||||
@ -134,13 +134,13 @@ public abstract class MultiOperandNumericFunction implements Function {
|
|||||||
*/
|
*/
|
||||||
private void collectValues(ValueEval operand, DoubleList temp) throws EvaluationException {
|
private void collectValues(ValueEval operand, DoubleList temp) throws EvaluationException {
|
||||||
|
|
||||||
if (operand instanceof AreaEval) {
|
if (operand instanceof TwoDEval) {
|
||||||
AreaEval ae = (AreaEval) operand;
|
TwoDEval ae = (TwoDEval) operand;
|
||||||
int width = ae.getWidth();
|
int width = ae.getWidth();
|
||||||
int height = ae.getHeight();
|
int height = ae.getHeight();
|
||||||
for (int rrIx=0; rrIx<height; rrIx++) {
|
for (int rrIx=0; rrIx<height; rrIx++) {
|
||||||
for (int rcIx=0; rcIx<width; rcIx++) {
|
for (int rcIx=0; rcIx<width; rcIx++) {
|
||||||
ValueEval ve = ae.getRelativeValue(rrIx, rcIx);
|
ValueEval ve = ae.getValue(rrIx, rcIx);
|
||||||
collectValue(ve, true, temp);
|
collectValue(ve, true, temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user