XSSFSheet some non-public methods moved to the bottom
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@645306 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ec05b2ca95
commit
8e757ffd92
@ -196,14 +196,6 @@ public class XSSFSheet implements Sheet {
|
|||||||
return ctMergeCells.sizeOfMergeCellArray();
|
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) {
|
public void autoSizeColumn(short column) {
|
||||||
columnHelper.setColBestFit(column, true);
|
columnHelper.setColBestFit(column, true);
|
||||||
}
|
}
|
||||||
@ -283,20 +275,6 @@ public class XSSFSheet implements Sheet {
|
|||||||
return getSheetTypePageSetUpPr().getAutoPageBreaks();
|
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) {
|
public Comment getCellComment(int row, int column) {
|
||||||
return getComments().findCellComment(row, column);
|
return getComments().findCellComment(row, column);
|
||||||
}
|
}
|
||||||
@ -891,18 +869,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) {
|
public void showInPane(short toprow, short leftcol) {
|
||||||
CellReference cellReference = new CellReference(toprow, leftcol);
|
CellReference cellReference = new CellReference(toprow, leftcol);
|
||||||
String cellRef = cellReference.formatAsString();
|
String cellRef = cellReference.formatAsString();
|
||||||
@ -955,6 +921,15 @@ public class XSSFSheet implements Sheet {
|
|||||||
getSheetTypeSelection().setActiveCell(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() {
|
private CTSelection getSheetTypeSelection() {
|
||||||
if (getSheetTypeSheetView().sizeOfSelectionArray() == 0) {
|
if (getSheetTypeSheetView().sizeOfSelectionArray() == 0) {
|
||||||
getSheetTypeSheetView().insertNewSelection(0);
|
getSheetTypeSheetView().insertNewSelection(0);
|
||||||
@ -1003,12 +978,37 @@ public class XSSFSheet implements Sheet {
|
|||||||
return sheetComments;
|
return sheetComments;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private void addNewMergeCell(Region region) {
|
||||||
* Does this sheet have any comments on it? We need to know,
|
if (ctMergeCells == null) {
|
||||||
* so we can decide about writing it to disk or not
|
ctMergeCells = worksheet.addNewMergeCells();
|
||||||
*/
|
}
|
||||||
public boolean hasComments() {
|
CTMergeCell ctMergeCell = ctMergeCells.addNewMergeCell();
|
||||||
if(sheetComments == null) { return false; }
|
ctMergeCell.setRef(region.getRegionRef());
|
||||||
return (sheetComments.getNumberOfComments() > 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user