]> source.dussan.org Git - poi.git/commitdiff
whitespace (tabs to spaces)
authorJaven O'Neal <onealj@apache.org>
Mon, 20 Jun 2016 00:28:19 +0000 (00:28 +0000)
committerJaven O'Neal <onealj@apache.org>
Mon, 20 Jun 2016 00:28:19 +0000 (00:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1749241 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/util/CellRangeUtil.java

index 3ecba186a06eab439d4790840d332b7bfafaa609..5bf9f1230a9c540b1c51a0144bd0f5a55c0785f9 100644 (file)
@@ -51,12 +51,9 @@ public final class CellRangeUtil {
         int firstCol = crB.getFirstColumn();
         int lastCol  = crB.getLastColumn();
 
-        if
-        ( 
-                               gt(crA.getFirstRow(),lastRow) || 
-                               lt(crA.getLastRow(),firstRow) ||
-                               gt(crA.getFirstColumn(),lastCol) || 
-                               lt(crA.getLastColumn(),firstCol) 
+        if ( 
+            gt(crA.getFirstRow(),    lastRow) || lt(crA.getLastRow(),    firstRow) ||
+            gt(crA.getFirstColumn(), lastCol) || lt(crA.getLastColumn(), firstCol) 
         )
         {
             return NO_INTERSECTION;
@@ -140,27 +137,27 @@ public final class CellRangeUtil {
         int x = intersect(range1, range2);
         switch(x)
         {
-                       case CellRangeUtil.NO_INTERSECTION: 
-                           // nothing in common: at most they could be adjacent to each other and thus form a single bigger area  
-                               if(hasExactSharedBorder(range1, range2)) {
-                                       return new CellRangeAddress[] { createEnclosingCellRange(range1, range2), };
-                               }
-                               // else - No intersection and no shared border: do nothing 
-                               return null;
-                       case CellRangeUtil.OVERLAP:
-                           // commented out the cells overlap implementation, it caused endless loops, see Bug 55380
-                           // disabled for now, the algorithm will not detect some border cases this way currently!
-                               //return resolveRangeOverlap(range1, range2);
-                           return null;
-                       case CellRangeUtil.INSIDE:
-                               // Remove range2, since it is completely inside of range1
-                               return new CellRangeAddress[] { range1 };
-                       case CellRangeUtil.ENCLOSES:
-                               // range2 encloses range1, so replace it with the enclosing one
-                               return new CellRangeAddress[] { range2 };
-               }
-               throw new RuntimeException("unexpected intersection result (" + x + ")");
-       }
+            case CellRangeUtil.NO_INTERSECTION: 
+                // nothing in common: at most they could be adjacent to each other and thus form a single bigger area  
+                if(hasExactSharedBorder(range1, range2)) {
+                    return new CellRangeAddress[] { createEnclosingCellRange(range1, range2), };
+                }
+                // else - No intersection and no shared border: do nothing 
+                return null;
+            case CellRangeUtil.OVERLAP:
+                // commented out the cells overlap implementation, it caused endless loops, see Bug 55380
+                // disabled for now, the algorithm will not detect some border cases this way currently!
+                //return resolveRangeOverlap(range1, range2);
+                return null;
+            case CellRangeUtil.INSIDE:
+                // Remove range2, since it is completely inside of range1
+                return new CellRangeAddress[] { range1 };
+            case CellRangeUtil.ENCLOSES:
+                // range2 encloses range1, so replace it with the enclosing one
+                return new CellRangeAddress[] { range2 };
+        }
+        throw new RuntimeException("unexpected intersection result (" + x + ")");
+    }
 
     private static CellRangeAddress[] toArray(List<CellRangeAddress> temp) {
         CellRangeAddress[] result = new CellRangeAddress[temp.size()];
@@ -223,10 +220,10 @@ public final class CellRangeUtil {
         }
 
         return new CellRangeAddress(
-                   lt(crB.getFirstRow(),   crA.getFirstRow())   ?crB.getFirstRow()   :crA.getFirstRow(),
-                   gt(crB.getLastRow(),    crA.getLastRow())    ?crB.getLastRow()    :crA.getLastRow(),
-                   lt(crB.getFirstColumn(),crA.getFirstColumn())?crB.getFirstColumn():crA.getFirstColumn(),
-                   gt(crB.getLastColumn(), crA.getLastColumn()) ?crB.getLastColumn() :crA.getLastColumn()
+                lt(crB.getFirstRow(),   crA.getFirstRow())   ?crB.getFirstRow()   :crA.getFirstRow(),
+                gt(crB.getLastRow(),    crA.getLastRow())    ?crB.getLastRow()    :crA.getLastRow(),
+                lt(crB.getFirstColumn(),crA.getFirstColumn())?crB.getFirstColumn():crA.getFirstColumn(),
+                gt(crB.getLastColumn(), crA.getLastColumn()) ?crB.getLastColumn() :crA.getLastColumn()
         );
     }