]> source.dussan.org Git - poi.git/commitdiff
XSSFSheet some non-public methods moved to the bottom
authorPaolo Mottadelli <paolo@apache.org>
Sun, 6 Apr 2008 20:44:11 +0000 (20:44 +0000)
committerPaolo Mottadelli <paolo@apache.org>
Sun, 6 Apr 2008 20:44:11 +0000 (20:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@645306 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

index 50ae19b896a922909942260254d84cb2b13a09af..5bffc981aaaa3a1e207058c2738fb9156519474e 100644 (file)
@@ -196,14 +196,6 @@ public class XSSFSheet implements Sheet {
        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 @@ public class XSSFSheet implements Sheet {
         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 @@ public class XSSFSheet implements Sheet {
                }
         }
     }
-    
-    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 class XSSFSheet implements Sheet {
        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 @@ public class XSSFSheet implements Sheet {
        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;
+    }
 }