Fix inconsistent whitespace/indents

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691076 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2015-07-14 20:37:27 +00:00
parent 15cece14c2
commit 8f66417979
1 changed files with 123 additions and 123 deletions

View File

@ -27,157 +27,157 @@ import org.apache.poi.hssf.util.HSSFColor;
*/ */
public final class HSSFBorderFormatting implements org.apache.poi.ss.usermodel.BorderFormatting { public final class HSSFBorderFormatting implements org.apache.poi.ss.usermodel.BorderFormatting {
private final HSSFWorkbook workbook; private final HSSFWorkbook workbook;
private final CFRuleBase cfRuleRecord; private final CFRuleBase cfRuleRecord;
private final BorderFormatting borderFormatting; private final BorderFormatting borderFormatting;
protected HSSFBorderFormatting(CFRuleBase cfRuleRecord, HSSFWorkbook workbook) {
this.workbook = workbook;
this.cfRuleRecord = cfRuleRecord;
this.borderFormatting = cfRuleRecord.getBorderFormatting();
}
protected BorderFormatting getBorderFormattingBlock() { protected HSSFBorderFormatting(CFRuleBase cfRuleRecord, HSSFWorkbook workbook) {
return borderFormatting; this.workbook = workbook;
} this.cfRuleRecord = cfRuleRecord;
this.borderFormatting = cfRuleRecord.getBorderFormatting();
}
public short getBorderBottom() { protected BorderFormatting getBorderFormattingBlock() {
return (short)borderFormatting.getBorderBottom(); return borderFormatting;
} }
public short getBorderDiagonal() { public short getBorderBottom() {
return (short)borderFormatting.getBorderDiagonal(); return (short)borderFormatting.getBorderBottom();
} }
public short getBorderLeft() { public short getBorderDiagonal() {
return (short)borderFormatting.getBorderLeft(); return (short)borderFormatting.getBorderDiagonal();
} }
public short getBorderRight() { public short getBorderLeft() {
return (short)borderFormatting.getBorderRight(); return (short)borderFormatting.getBorderLeft();
} }
public short getBorderTop() { public short getBorderRight() {
return (short)borderFormatting.getBorderTop(); return (short)borderFormatting.getBorderRight();
} }
public short getBottomBorderColor() { public short getBorderTop() {
return (short)borderFormatting.getBottomBorderColor(); return (short)borderFormatting.getBorderTop();
} }
public short getBottomBorderColor() {
return (short)borderFormatting.getBottomBorderColor();
}
public HSSFColor getBottomBorderColorColor() { public HSSFColor getBottomBorderColorColor() {
return workbook.getCustomPalette().getColor( return workbook.getCustomPalette().getColor(
borderFormatting.getBottomBorderColor() borderFormatting.getBottomBorderColor()
); );
} }
public short getDiagonalBorderColor() { public short getDiagonalBorderColor() {
return (short)borderFormatting.getDiagonalBorderColor(); return (short)borderFormatting.getDiagonalBorderColor();
} }
public short getLeftBorderColor() { public short getLeftBorderColor() {
return (short)borderFormatting.getLeftBorderColor(); return (short)borderFormatting.getLeftBorderColor();
} }
public short getRightBorderColor() { public short getRightBorderColor() {
return (short)borderFormatting.getRightBorderColor(); return (short)borderFormatting.getRightBorderColor();
} }
public short getTopBorderColor() { public short getTopBorderColor() {
return (short)borderFormatting.getTopBorderColor(); return (short)borderFormatting.getTopBorderColor();
} }
public boolean isBackwardDiagonalOn() { public boolean isBackwardDiagonalOn() {
return borderFormatting.isBackwardDiagonalOn(); return borderFormatting.isBackwardDiagonalOn();
} }
public boolean isForwardDiagonalOn() { public boolean isForwardDiagonalOn() {
return borderFormatting.isForwardDiagonalOn(); return borderFormatting.isForwardDiagonalOn();
} }
public void setBackwardDiagonalOn(boolean on) { public void setBackwardDiagonalOn(boolean on) {
borderFormatting.setBackwardDiagonalOn(on); borderFormatting.setBackwardDiagonalOn(on);
if( on ) { if (on ) {
cfRuleRecord.setTopLeftBottomRightBorderModified(on); cfRuleRecord.setTopLeftBottomRightBorderModified(on);
} }
} }
public void setBorderBottom(short border) { public void setBorderBottom(short border) {
borderFormatting.setBorderBottom(border); borderFormatting.setBorderBottom(border);
if( border != 0) { if (border != 0) {
cfRuleRecord.setBottomBorderModified(true); cfRuleRecord.setBottomBorderModified(true);
} else { } else {
cfRuleRecord.setBottomBorderModified(false); cfRuleRecord.setBottomBorderModified(false);
} }
} }
public void setBorderDiagonal(short border) { public void setBorderDiagonal(short border) {
borderFormatting.setBorderDiagonal(border); borderFormatting.setBorderDiagonal(border);
if( border != 0) { if (border != 0) {
cfRuleRecord.setBottomLeftTopRightBorderModified(true); cfRuleRecord.setBottomLeftTopRightBorderModified(true);
cfRuleRecord.setTopLeftBottomRightBorderModified(true); cfRuleRecord.setTopLeftBottomRightBorderModified(true);
} }
} }
public void setBorderLeft(short border) { public void setBorderLeft(short border) {
borderFormatting.setBorderLeft(border); borderFormatting.setBorderLeft(border);
if( border != 0) { if (border != 0) {
cfRuleRecord.setLeftBorderModified(true); cfRuleRecord.setLeftBorderModified(true);
} }
} }
public void setBorderRight(short border) { public void setBorderRight(short border) {
borderFormatting.setBorderRight(border); borderFormatting.setBorderRight(border);
if( border != 0) { if (border != 0) {
cfRuleRecord.setRightBorderModified(true); cfRuleRecord.setRightBorderModified(true);
} }
} }
public void setBorderTop(short border) { public void setBorderTop(short border) {
borderFormatting.setBorderTop(border); borderFormatting.setBorderTop(border);
if( border != 0) { if (border != 0) {
cfRuleRecord.setTopBorderModified(true); cfRuleRecord.setTopBorderModified(true);
} }
} }
public void setBottomBorderColor(short color) { public void setBottomBorderColor(short color) {
borderFormatting.setBottomBorderColor(color); borderFormatting.setBottomBorderColor(color);
if( color != 0) { if (color != 0) {
cfRuleRecord.setBottomBorderModified(true); cfRuleRecord.setBottomBorderModified(true);
} }
} }
public void setDiagonalBorderColor(short color) { public void setDiagonalBorderColor(short color) {
borderFormatting.setDiagonalBorderColor(color); borderFormatting.setDiagonalBorderColor(color);
if( color != 0) { if (color != 0) {
cfRuleRecord.setBottomLeftTopRightBorderModified(true); cfRuleRecord.setBottomLeftTopRightBorderModified(true);
cfRuleRecord.setTopLeftBottomRightBorderModified(true); cfRuleRecord.setTopLeftBottomRightBorderModified(true);
} }
} }
public void setForwardDiagonalOn(boolean on) { public void setForwardDiagonalOn(boolean on) {
borderFormatting.setForwardDiagonalOn(on); borderFormatting.setForwardDiagonalOn(on);
if( on ) { if (on ) {
cfRuleRecord.setBottomLeftTopRightBorderModified(on); cfRuleRecord.setBottomLeftTopRightBorderModified(on);
} }
} }
public void setLeftBorderColor(short color) { public void setLeftBorderColor(short color) {
borderFormatting.setLeftBorderColor(color); borderFormatting.setLeftBorderColor(color);
if( color != 0) { if (color != 0) {
cfRuleRecord.setLeftBorderModified(true); cfRuleRecord.setLeftBorderModified(true);
} }
} }
public void setRightBorderColor(short color) { public void setRightBorderColor(short color) {
borderFormatting.setRightBorderColor(color); borderFormatting.setRightBorderColor(color);
if( color != 0) { if (color != 0) {
cfRuleRecord.setRightBorderModified(true); cfRuleRecord.setRightBorderModified(true);
} }
} }
public void setTopBorderColor(short color) { public void setTopBorderColor(short color) {
borderFormatting.setTopBorderColor(color); borderFormatting.setTopBorderColor(color);
if( color != 0) { if (color != 0) {
cfRuleRecord.setTopBorderModified(true); cfRuleRecord.setTopBorderModified(true);
} }
} }
} }