]> source.dussan.org Git - poi.git/commitdiff
changed short param to int in AreaEval.containsColumn() method
authorJosh Micich <josh@apache.org>
Wed, 16 Dec 2009 21:08:36 +0000 (21:08 +0000)
committerJosh Micich <josh@apache.org>
Wed, 16 Dec 2009 21:08:36 +0000 (21:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@891425 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/formula/eval/AreaEval.java
src/java/org/apache/poi/hssf/record/formula/eval/AreaEvalBase.java
src/java/org/apache/poi/hssf/record/formula/eval/OperandResolver.java

index 4c5fb9f681695ac1c7c183f8c4c7606ff64e5f88..733a6253e4fc3a2d25c554c5d792c084d3ab998b 100644 (file)
@@ -68,7 +68,7 @@ public interface AreaEval extends TwoDEval {
      * returns true if the specified col is in range
      * @param col
      */
-    boolean containsColumn(short col);
+    boolean containsColumn(int col);
 
     /**
      * returns true if the specified row is in range
index 12e21cf9adfeaa5f8a9f7fb78ddf9d81f3b2331f..4d04fd126fb5bb5e20a4f5b3cfdec2aa923cb08f 100644 (file)
@@ -87,11 +87,11 @@ public abstract class AreaEvalBase implements AreaEval {
        }
 
        public final boolean containsRow(int row) {
-               return (_firstRow <= row) && (_lastRow >= row);
+               return _firstRow <= row && _lastRow >= row;
        }
 
-       public final boolean containsColumn(short col) {
-               return (_firstColumn <= col) && (_lastColumn >= col);
+       public final boolean containsColumn(int col) {
+               return _firstColumn <= col && _lastColumn >= col;
        }
 
        public final boolean isColumn() {
index 50e9dd058d999c5c3f6de908d854482ff33b56a0..f18abce008369e14db5f948d9826b612b3d5c676 100644 (file)
@@ -102,7 +102,7 @@ public final class OperandResolver {
         */
        public static ValueEval chooseSingleElementFromArea(AreaEval ae,
                        int srcCellRow, int srcCellCol) throws EvaluationException {
-               ValueEval result = chooseSingleElementFromAreaInternal(ae, srcCellRow, (short) srcCellCol);
+               ValueEval result = chooseSingleElementFromAreaInternal(ae, srcCellRow, srcCellCol);
                if(result == null) {
                        // This seems to be required because AreaEval.values() array may contain nulls.
                        // perhaps that should not be allowed.
@@ -119,7 +119,7 @@ public final class OperandResolver {
         * @return possibly <tt>ErrorEval</tt>, and <code>null</code>
         */
        private static ValueEval chooseSingleElementFromAreaInternal(AreaEval ae,
-                       int srcCellRow, short srcCellCol) throws EvaluationException {
+                       int srcCellRow, int srcCellCol) throws EvaluationException {
 
                if(false) {
                        // this is too simplistic