poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r645306 - /poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
Date Sun, 06 Apr 2008 20:44:13 GMT
Author: paolo
Date: Sun Apr  6 13:44:11 2008
New Revision: 645306

URL: http://svn.apache.org/viewvc?rev=645306&view=rev
Log:
XSSFSheet some non-public methods moved to the bottom

Modified:
    poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

Modified: poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=645306&r1=645305&r2=645306&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/branches/ooxml/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Sun Apr
 6 13:44:11 2008
@@ -196,14 +196,6 @@
     	return ctMergeCells.sizeOfMergeCellArray();
     }
 
-    private void addNewMergeCell(Region region) {
-    	if (ctMergeCells == null) {
-    		ctMergeCells = worksheet.addNewMergeCells();
-    	}
-    	CTMergeCell ctMergeCell = ctMergeCells.addNewMergeCell();
-    	ctMergeCell.setRef(region.getRegionRef());
-	}
-
     public void autoSizeColumn(short column) {
     	columnHelper.setColBestFit(column, true);
     }
@@ -283,20 +275,6 @@
         return getSheetTypePageSetUpPr().getAutoPageBreaks();
     }
 
-	private CTPageSetUpPr getSheetTypePageSetUpPr() {
-    	if (getSheetTypeSheetPr().getPageSetUpPr() == null) {
-    		getSheetTypeSheetPr().setPageSetUpPr(CTPageSetUpPr.Factory.newInstance());
-    	}
-		return getSheetTypeSheetPr().getPageSetUpPr();
-	}
-
-	protected CTSheetPr getSheetTypeSheetPr() {
-    	if (worksheet.getSheetPr() == null) {
-    		worksheet.setSheetPr(CTSheetPr.Factory.newInstance());
-    	}
-		return worksheet.getSheetPr();
-	}
-
     public Comment getCellComment(int row, int column) {
     	return getComments().findCellComment(row, column);
     }
@@ -890,18 +868,6 @@
         	}
         }
     }
-    
-    private boolean removeRow(int startRow, int endRow, int n, int rownum) {
-    	if (rownum >= (startRow + n) && rownum <= (endRow + n)) {
-    		if (n > 0 && rownum > endRow) {
-    			return true;
-    		}
-    		else if (n < 0 && rownum < startRow) {
-    			return true;
-    		}
-    	}
-    	return false;
-    }
 
     public void showInPane(short toprow, short leftcol) {
     	CellReference cellReference = new CellReference(toprow, leftcol);
@@ -954,6 +920,15 @@
 	public void setActiveCell(String cellRef) {
 		getSheetTypeSelection().setActiveCell(cellRef);
 	}
+	
+	/**
+	 * Does this sheet have any comments on it? We need to know,
+	 *  so we can decide about writing it to disk or not
+	 */
+	public boolean hasComments() {
+		if(sheetComments == null) { return false; }
+		return (sheetComments.getNumberOfComments() > 0);
+	}
 
 	private CTSelection getSheetTypeSelection() {
 		if (getSheetTypeSheetView().sizeOfSelectionArray() == 0) {
@@ -1002,13 +977,38 @@
 	protected CommentsSource getCommentsSourceIfExists() {
 		return sheetComments;
 	}
-	
-	/**
-	 * Does this sheet have any comments on it? We need to know,
-	 *  so we can decide about writing it to disk or not
-	 */
-	public boolean hasComments() {
-		if(sheetComments == null) { return false; }
-		return (sheetComments.getNumberOfComments() > 0);
+
+	private void addNewMergeCell(Region region) {
+    	if (ctMergeCells == null) {
+    		ctMergeCells = worksheet.addNewMergeCells();
+    	}
+    	CTMergeCell ctMergeCell = ctMergeCells.addNewMergeCell();
+    	ctMergeCell.setRef(region.getRegionRef());
 	}
+
+	private CTPageSetUpPr getSheetTypePageSetUpPr() {
+    	if (getSheetTypeSheetPr().getPageSetUpPr() == null) {
+    		getSheetTypeSheetPr().setPageSetUpPr(CTPageSetUpPr.Factory.newInstance());
+    	}
+		return getSheetTypeSheetPr().getPageSetUpPr();
+	}
+
+	protected CTSheetPr getSheetTypeSheetPr() {
+    	if (worksheet.getSheetPr() == null) {
+    		worksheet.setSheetPr(CTSheetPr.Factory.newInstance());
+    	}
+		return worksheet.getSheetPr();
+	}
+    
+    private boolean removeRow(int startRow, int endRow, int n, int rownum) {
+    	if (rownum >= (startRow + n) && rownum <= (endRow + n)) {
+    		if (n > 0 && rownum > endRow) {
+    			return true;
+    		}
+    		else if (n < 0 && rownum < startRow) {
+    			return true;
+    		}
+    	}
+    	return false;
+    }
 }



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


Mime
View raw message