poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1749274 - /poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java
Date Mon, 20 Jun 2016 08:15:56 GMT
Author: onealj
Date: Mon Jun 20 08:15:56 2016
New Revision: 1749274

URL: http://svn.apache.org/viewvc?rev=1749274&view=rev
Log:
whitespace (tabs to spaces); +svnprop svn:eol-style=native

Modified:
    poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java   (contents, props
changed)

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java?rev=1749274&r1=1749273&r2=1749274&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java Mon Jun 20 08:15:56
2016
@@ -53,13 +53,13 @@ import org.apache.poi.ss.formula.functio
 public final class Sumifs implements FreeRefFunction {
     public static final FreeRefFunction instance = new Sumifs();
 
-	public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
-	    // need at least 3 arguments and need to have an odd number of arguments (sum-range
plus x*(criteria_range, criteria))
+    public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
+        // need at least 3 arguments and need to have an odd number of arguments (sum-range
plus x*(criteria_range, criteria))
         if(args.length < 3 || args.length % 2 == 0) {
             return ErrorEval.VALUE_INVALID;
         }
 
-		try {
+        try {
             AreaEval sumRange = convertRangeArg(args[0]);
 
             // collect pairs of ranges and criteria
@@ -76,10 +76,10 @@ public final class Sumifs implements Fre
 
             double result = sumMatchingCells(ae, mp, sumRange);
             return new NumberEval(result);
-		} catch (EvaluationException e) {
-			return e.getErrorEval();
-		}
-	}
+        } catch (EvaluationException e) {
+            return e.getErrorEval();
+        }
+    }
 
     /**
      * Verify that each <code>criteriaRanges</code> argument contains the same
number of rows and columns
@@ -148,25 +148,25 @@ public final class Sumifs implements Fre
         return result;
     }
 
-	private static double accumulate(AreaEval aeSum, int relRowIndex,
-			int relColIndex) {
+    private static double accumulate(AreaEval aeSum, int relRowIndex,
+            int relColIndex) {
+
+        ValueEval addend = aeSum.getRelativeValue(relRowIndex, relColIndex);
+        if (addend instanceof NumberEval) {
+            return ((NumberEval)addend).getNumberValue();
+        }
+        // everything else (including string and boolean values) counts as zero
+        return 0.0;
+    }
 
-		ValueEval addend = aeSum.getRelativeValue(relRowIndex, relColIndex);
-		if (addend instanceof NumberEval) {
-			return ((NumberEval)addend).getNumberValue();
-		}
-		// everything else (including string and boolean values) counts as zero
-		return 0.0;
-	}
-
-	private static AreaEval convertRangeArg(ValueEval eval) throws EvaluationException {
-		if (eval instanceof AreaEval) {
-			return (AreaEval) eval;
-		}
-		if (eval instanceof RefEval) {
-			return ((RefEval)eval).offset(0, 0, 0, 0);
-		}
-		throw new EvaluationException(ErrorEval.VALUE_INVALID);
-	}
+    private static AreaEval convertRangeArg(ValueEval eval) throws EvaluationException {
+        if (eval instanceof AreaEval) {
+            return (AreaEval) eval;
+        }
+        if (eval instanceof RefEval) {
+            return ((RefEval)eval).offset(0, 0, 0, 0);
+        }
+        throw new EvaluationException(ErrorEval.VALUE_INVALID);
+    }
 
 }

Propchange: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Sumifs.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message