poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1716051 - in /poi/trunk/src: java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/usermodel/ ooxml/java/org/apache/poi/xssf/streaming/ ooxml/java/org/apache/poi/xssf/usermodel/ ooxml/testcases/org/apache/poi/xssf/streaming/ testcases...
Date Tue, 24 Nov 2015 07:53:18 GMT
Author: onealj
Date: Tue Nov 24 07:53:17 2015
New Revision: 1716051

URL: http://svn.apache.org/viewvc?rev=1716051&view=rev
Log:
whitespace

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1716051&r1=1716050&r2=1716051&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Tue Nov 24 07:53:17 2015
@@ -221,17 +221,17 @@ public final class HSSFSheet implements
                 }
             }
             if (log.check( POILogger.DEBUG )) {
-            	if (cval instanceof Record) {
+                if (cval instanceof Record) {
                 log.log( DEBUG, "record id = " + Integer.toHexString( ( (Record) cval ).getSid()
) );
-				} else {
-					log.log( DEBUG, "record = " + cval );
-				}
+                } else {
+                    log.log( DEBUG, "record = " + cval );
+                }
             }
             hrow.createCellFromRecord( cval );
             if (log.check( POILogger.DEBUG )) {
                 log.log( DEBUG, "record took ",
                     Long.valueOf( System.currentTimeMillis() - cellstart ) );
-			}
+            }
 
         }
         if (log.check( POILogger.DEBUG )) {

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java?rev=1716051&r1=1716050&r2=1716051&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java Tue Nov 24 07:53:17 2015
@@ -970,17 +970,17 @@ public interface Sheet extends Iterable<
     
     public DataValidationHelper getDataValidationHelper();
 
-	/**
+    /**
      * Returns the list of DataValidation in the sheet.
      * @return list of DataValidation in the sheet
      */
     public List<? extends DataValidation> getDataValidations();
 
-	/**
-	 * Creates a data validation object
-	 * @param dataValidation The Data validation object settings
-	 */
-	public void addValidationData(DataValidation dataValidation);
+    /**
+     * Creates a data validation object
+     * @param dataValidation The Data validation object settings
+     */
+    public void addValidationData(DataValidation dataValidation);
 
     /**
      * Enable filtering for a range of cells

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1716051&r1=1716050&r2=1716051&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Tue Nov 24 07:53:17
2015
@@ -1233,8 +1233,8 @@ public class SXSSFSheet implements Sheet
     private void collapseRow(int rowIndex) {
         SXSSFRow row = getRow(rowIndex);
         if(row == null) {
-			throw new IllegalArgumentException("Invalid row number("+ rowIndex + "). Row does not
exist.");
-		} else {
+            throw new IllegalArgumentException("Invalid row number("+ rowIndex + "). Row
does not exist.");
+        } else {
             int startRow = findStartOfRowOutlineGroup(rowIndex);
 
             // Hide all the columns until the end of the group
@@ -1254,10 +1254,10 @@ public class SXSSFSheet implements Sheet
      */
     private int findStartOfRowOutlineGroup(int rowIndex) {
         // Find the start of the group.
-		Row row = getRow(rowIndex);
+        Row row = getRow(rowIndex);
         int level = ((SXSSFRow) row).getOutlineLevel();
         if(level == 0) {
-        	throw new IllegalArgumentException("Outline level is zero for the row (" + rowIndex
+ ").");
+            throw new IllegalArgumentException("Outline level is zero for the row (" + rowIndex
+ ").");
         }
         int currentRow = rowIndex;
         while (getRow(currentRow) != null) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1716051&r1=1716050&r2=1716051&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Tue Nov 24 07:53:17
2015
@@ -2801,9 +2801,9 @@ public class XSSFSheet extends POIXMLDoc
     @Override
     @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in
xmlbeans with JDK 1.5 support
     public void shiftRows(int startRow, int endRow, final int n, boolean copyRowHeight, boolean
resetOriginalRowHeight) {
-    	XSSFVMLDrawing vml = getVMLDrawing(false);
+        XSSFVMLDrawing vml = getVMLDrawing(false);
 
-    	// first remove all rows which will be overwritten
+        // first remove all rows which will be overwritten
         for (Iterator<Row> it = rowIterator() ; it.hasNext() ; ) {
             XSSFRow row = (XSSFRow)it.next();
             int rownum = row.getRowNum();
@@ -2822,14 +2822,14 @@ public class XSSFSheet extends POIXMLDoc
                 if(sheetComments != null){
                     CTCommentList lst = sheetComments.getCTComments().getCommentList();
                     for (CTComment comment : lst.getCommentArray()) {
-                    	String strRef = comment.getRef();
-                    	CellAddress ref = new CellAddress(strRef);
+                        String strRef = comment.getRef();
+                        CellAddress ref = new CellAddress(strRef);
 
-                    	// is this comment part of the current row?
-                    	if(ref.getRow() == rownum) {
+                        // is this comment part of the current row?
+                        if(ref.getRow() == rownum) {
                             sheetComments.removeComment(ref);
                             vml.removeCommentShape(ref.getRow(), ref.getColumn());
-                    	}
+                        }
                     }
                 }
                 // FIXME: (performance optimization) this should be moved outside the for-loop
so that hyperlinks only needs to be iterated over once.
@@ -2849,25 +2849,25 @@ public class XSSFSheet extends POIXMLDoc
         // we need to sort it in a way so the shifting does not mess up the structures, 
         // i.e. when shifting down, start from down and go up, when shifting up, vice-versa
         SortedMap<XSSFComment, Integer> commentsToShift = new TreeMap<XSSFComment,
Integer>(new Comparator<XSSFComment>() {
-			public int compare(XSSFComment o1, XSSFComment o2) {
-				int row1 = o1.getRow();
-				int row2 = o2.getRow();
-				
-				if(row1 == row2) {
-					// ordering is not important when row is equal, but don't return zero to still 
-					// get multiple comments per row into the map
-					return o1.hashCode() - o2.hashCode();
-				}
-
-				// when shifting down, sort higher row-values first
-				if(n > 0) {
-					return row1 < row2 ? 1 : -1;
-				} else {
-					// sort lower-row values first when shifting up
-					return row1 > row2 ? 1 : -1;
-				}
-			}
-		});
+            public int compare(XSSFComment o1, XSSFComment o2) {
+                int row1 = o1.getRow();
+                int row2 = o2.getRow();
+                
+                if(row1 == row2) {
+                    // ordering is not important when row is equal, but don't return zero
to still 
+                    // get multiple comments per row into the map
+                    return o1.hashCode() - o2.hashCode();
+                }
+
+                // when shifting down, sort higher row-values first
+                if(n > 0) {
+                    return row1 < row2 ? 1 : -1;
+                } else {
+                    // sort lower-row values first when shifting up
+                    return row1 > row2 ? 1 : -1;
+                }
+            }
+        });
 
         
         for (Iterator<Row> it = rowIterator() ; it.hasNext() ; ) {
@@ -2875,26 +2875,26 @@ public class XSSFSheet extends POIXMLDoc
             int rownum = row.getRowNum();
 
             if(sheetComments != null){
-            	// calculate the new rownum
-            	int newrownum = shiftedRowNum(startRow, endRow, n, rownum);
-            	
-            	// is there a change necessary for the current row?
-            	if(newrownum != rownum) {
+                // calculate the new rownum
+                int newrownum = shiftedRowNum(startRow, endRow, n, rownum);
+                
+                // is there a change necessary for the current row?
+                if(newrownum != rownum) {
                     CTCommentList lst = sheetComments.getCTComments().getCommentList();
                     for (CTComment comment : lst.getCommentArray()) {
-                    	String oldRef = comment.getRef();
-                    	CellReference ref = new CellReference(oldRef);
-                    	
-                    	// is this comment part of the current row?
-                    	if(ref.getRow() == rownum) {
-                        	XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
+                        String oldRef = comment.getRef();
+                        CellReference ref = new CellReference(oldRef);
+                        
+                        // is this comment part of the current row?
+                        if(ref.getRow() == rownum) {
+                            XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
                                     vml == null ? null : vml.findCommentShape(rownum, ref.getCol()));
-                        	
-                        	// we should not perform the shifting right here as we would then
find
-                        	// already shifted comments and would shift them again...
-                        	commentsToShift.put(xssfComment, newrownum);
+                            
+                            // we should not perform the shifting right here as we would
then find
+                            // already shifted comments and would shift them again...
+                            commentsToShift.put(xssfComment, newrownum);
                         }
-                	}
+                    }
                 }
             }
 
@@ -2911,7 +2911,7 @@ public class XSSFSheet extends POIXMLDoc
         // the Map is sorted and thus provides them in the order that we need here, 
         // i.e. from down to up if shifting down, vice-versa otherwise
         for(Map.Entry<XSSFComment, Integer> entry : commentsToShift.entrySet()) {
-        	entry.getKey().setRow(entry.getValue());
+            entry.getKey().setRow(entry.getValue());
         }
         
         XSSFRowShifter rowShifter = new XSSFRowShifter(this);
@@ -2936,31 +2936,31 @@ public class XSSFSheet extends POIXMLDoc
     }
 
     private int shiftedRowNum(int startRow, int endRow, int n, int rownum) {
-		// no change if before any affected row
-    	if(rownum < startRow && (n > 0 || (startRow - rownum) > n)) {
-			return rownum;
-		}
-		
-    	// no change if after any affected row
-    	if(rownum > endRow && (n < 0 || (rownum - endRow) > n)) {
-    		return rownum;
-    	}
-    	
-    	// row before and things are moved up
-    	if(rownum < startRow) {
-    		// row is moved down by the shifting
-    		return rownum + (endRow - startRow);
-    	}
-    	
-    	// row is after and things are moved down
-    	if(rownum > endRow) {
-    		// row is moved up by the shifting
-    		return rownum - (endRow - startRow);
-    	}
-    	
-    	// row is part of the shifted block
-		return rownum + n;
-	}
+        // no change if before any affected row
+        if(rownum < startRow && (n > 0 || (startRow - rownum) > n)) {
+            return rownum;
+        }
+        
+        // no change if after any affected row
+        if(rownum > endRow && (n < 0 || (rownum - endRow) > n)) {
+            return rownum;
+        }
+        
+        // row before and things are moved up
+        if(rownum < startRow) {
+            // row is moved down by the shifting
+            return rownum + (endRow - startRow);
+        }
+        
+        // row is after and things are moved down
+        if(rownum > endRow) {
+            // row is moved up by the shifting
+            return rownum - (endRow - startRow);
+        }
+        
+        // row is part of the shifted block
+        return rownum + n;
+    }
 
     /**
      * Location of the top left visible cell Location of the top left visible cell in the
bottom right

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java?rev=1716051&r1=1716050&r2=1716051&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java Tue Nov
24 07:53:17 2015
@@ -92,9 +92,9 @@ public class TestSXSSFSheet extends Base
 
     @Test
     public void getCellComment() throws IOException {
-    	// TODO: reading cell comments via Sheet does not work currently as it tries 
-    	// to access the underlying sheet for this, but comments are stored as
-    	// properties on Cells...
+        // TODO: reading cell comments via Sheet does not work currently as it tries 
+        // to access the underlying sheet for this, but comments are stored as
+        // properties on Cells...
     }
     
     @Override

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=1716051&r1=1716050&r2=1716051&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java Tue Nov 24 07:53:17
2015
@@ -119,7 +119,7 @@ public final class TestHSSFSheet extends
         HSSFWorkbook wb = new HSSFWorkbook();
         HSSFSheet s = wb.createSheet();
         GridsetRecord gridsetRec = s.getSheet().getGridsetRecord();
-		assertTrue(gridsetRec.getGridset());
+        assertTrue(gridsetRec.getGridset());
         s.setGridsPrinted(true);
         assertFalse(gridsetRec.getGridset());
         wb.close();
@@ -535,28 +535,28 @@ public final class TestHSSFSheet extends
         
         // verify limits
         try {
-        	sheet.setZoom(0, 2);
-        	fail("Should catch Exception here");
+            sheet.setZoom(0, 2);
+            fail("Should catch Exception here");
         } catch (IllegalArgumentException e) {
-        	assertEquals("Numerator must be greater than 0 and less than 65536", e.getMessage());
+            assertEquals("Numerator must be greater than 0 and less than 65536", e.getMessage());
         }
         try {
-        	sheet.setZoom(65536, 2);
-        	fail("Should catch Exception here");
+            sheet.setZoom(65536, 2);
+            fail("Should catch Exception here");
         } catch (IllegalArgumentException e) {
-        	assertEquals("Numerator must be greater than 0 and less than 65536", e.getMessage());
+            assertEquals("Numerator must be greater than 0 and less than 65536", e.getMessage());
         }
         try {
-        	sheet.setZoom(2, 0);
-        	fail("Should catch Exception here");
+            sheet.setZoom(2, 0);
+            fail("Should catch Exception here");
         } catch (IllegalArgumentException e) {
-        	assertEquals("Denominator must be greater than 0 and less than 65536", e.getMessage());
+            assertEquals("Denominator must be greater than 0 and less than 65536", e.getMessage());
         }
         try {
-        	sheet.setZoom(2, 65536);
-        	fail("Should catch Exception here");
+            sheet.setZoom(2, 65536);
+            fail("Should catch Exception here");
         } catch (IllegalArgumentException e) {
-        	assertEquals("Denominator must be greater than 0 and less than 65536", e.getMessage());
+            assertEquals("Denominator must be greater than 0 and less than 65536", e.getMessage());
         }
         
         wb.close();
@@ -652,7 +652,7 @@ public final class TestHSSFSheet extends
     }
 
     @Test
-	public void autoSizeColumn() throws IOException {
+    public void autoSizeColumn() throws IOException {
         HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("43902.xls");
         String sheetName = "my sheet";
         HSSFSheet sheet = wb1.getSheet(sheetName);
@@ -1161,8 +1161,8 @@ public final class TestHSSFSheet extends
         
         thrown.expect(IllegalArgumentException.class);
         thrown.expectMessage("Maximum row number is 65535");
-    	sheet.showInPane(Integer.MAX_VALUE, 3);
-    	wb.close();
+        sheet.showInPane(Integer.MAX_VALUE, 3);
+        wb.close();
     }
     
     @Test



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


Mime
View raw message