Fix inconsistent whitespace/formatting
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
777806d350
commit
e349269fcf
@ -25,11 +25,8 @@ import org.apache.poi.util.LittleEndianOutput;
|
||||
|
||||
/**
|
||||
* Border Formatting Block of the Conditional Formatting Rule Record.
|
||||
*
|
||||
* @author Dmitriy Kumshayev
|
||||
*/
|
||||
public final class BorderFormatting {
|
||||
|
||||
/** No border */
|
||||
public final static short BORDER_NONE = 0x0;
|
||||
/** Thin border */
|
||||
|
@ -23,12 +23,9 @@ import java.util.List;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dmitriy Kumshayev
|
||||
* TODO Should this move to org.apache.poi.ss.util ?
|
||||
*/
|
||||
public final class CellRangeUtil
|
||||
{
|
||||
|
||||
public final class CellRangeUtil {
|
||||
private CellRangeUtil() {
|
||||
// no instance of this class
|
||||
}
|
||||
@ -81,7 +78,6 @@ public final class CellRangeUtil
|
||||
{
|
||||
return OVERLAP;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -171,15 +167,12 @@ public final class CellRangeUtil
|
||||
throw new RuntimeException("unexpected intersection result (" + x + ")");
|
||||
}
|
||||
|
||||
|
||||
private static CellRangeAddress[] toArray(List<CellRangeAddress> temp) {
|
||||
CellRangeAddress[] result = new CellRangeAddress[temp.size()];
|
||||
temp.toArray(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check if the specified range is located inside of this cell range.
|
||||
*
|
||||
@ -234,14 +227,12 @@ public final class CellRangeUtil
|
||||
return crA.copy();
|
||||
}
|
||||
|
||||
return
|
||||
new CellRangeAddress(
|
||||
return new CellRangeAddress(
|
||||
lt(crB.getFirstRow(), crA.getFirstRow()) ?crB.getFirstRow() :crA.getFirstRow(),
|
||||
gt(crB.getLastRow(), crA.getLastRow()) ?crB.getLastRow() :crA.getLastRow(),
|
||||
lt(crB.getFirstColumn(),crA.getFirstColumn())?crB.getFirstColumn():crA.getFirstColumn(),
|
||||
gt(crB.getLastColumn(), crA.getLastColumn()) ?crB.getLastColumn() :crA.getLastColumn()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,11 +25,8 @@ import org.apache.poi.util.LittleEndian;
|
||||
|
||||
/**
|
||||
* Font Formatting Block of the Conditional Formatting Rule Record.
|
||||
*
|
||||
* @author Dmitriy Kumshayev
|
||||
*/
|
||||
public final class FontFormatting
|
||||
{
|
||||
public final class FontFormatting {
|
||||
private byte[] _rawData;
|
||||
|
||||
private static final int OFFSET_FONT_NAME = 0;
|
||||
@ -238,7 +235,6 @@ public final class FontFormatting
|
||||
*
|
||||
* @param strike - whether the font is stricken out or not
|
||||
*/
|
||||
|
||||
public void setStrikeout(boolean strike)
|
||||
{
|
||||
setFontOption(strike, cancellation);
|
||||
@ -250,7 +246,6 @@ public final class FontFormatting
|
||||
* @return strike - whether the font is stricken out or not
|
||||
* @see #getFontOption(org.apache.poi.util.BitField)
|
||||
*/
|
||||
|
||||
public boolean isStruckout()
|
||||
{
|
||||
return getFontOption(cancellation);
|
||||
@ -341,7 +336,6 @@ public final class FontFormatting
|
||||
* @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#U_SINGLE_ACCOUNTING
|
||||
* @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#U_DOUBLE_ACCOUNTING
|
||||
*/
|
||||
|
||||
public short getUnderlineType()
|
||||
{
|
||||
return getShort(OFFSET_UNDERLINE_TYPE);
|
||||
@ -514,7 +508,8 @@ public final class FontFormatting
|
||||
append(getFontWeight()).
|
||||
append(
|
||||
getFontWeight() == FONT_WEIGHT_NORMAL ? "(Normal)"
|
||||
: getFontWeight() == FONT_WEIGHT_BOLD ? "(Bold)" : "0x"+Integer.toHexString(getFontWeight())).
|
||||
: getFontWeight() == FONT_WEIGHT_BOLD ? "(Bold)"
|
||||
: "0x"+Integer.toHexString(getFontWeight())).
|
||||
append("\n");
|
||||
}
|
||||
else
|
||||
|
@ -24,8 +24,6 @@ import org.apache.poi.util.LittleEndianOutput;
|
||||
|
||||
/**
|
||||
* Pattern Formatting Block of the Conditional Formatting Rule Record.
|
||||
*
|
||||
* @author Dmitriy Kumshayev
|
||||
*/
|
||||
public final class PatternFormatting implements Cloneable {
|
||||
/** No background */
|
||||
|
@ -25,8 +25,7 @@ import org.apache.poi.ss.usermodel.Color;
|
||||
* High level representation for Font Formatting component
|
||||
* of Conditional Formatting settings
|
||||
*/
|
||||
public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.FontFormatting
|
||||
{
|
||||
public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.FontFormatting {
|
||||
/** Underline type - None */
|
||||
public final static byte U_NONE = FontFormatting.U_NONE;
|
||||
/** Underline type - Single */
|
||||
@ -41,14 +40,12 @@ public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.Fon
|
||||
private final FontFormatting fontFormatting;
|
||||
private final HSSFWorkbook workbook;
|
||||
|
||||
protected HSSFFontFormatting(CFRuleBase cfRuleRecord, HSSFWorkbook workbook)
|
||||
{
|
||||
protected HSSFFontFormatting(CFRuleBase cfRuleRecord, HSSFWorkbook workbook) {
|
||||
this.fontFormatting = cfRuleRecord.getFontFormatting();
|
||||
this.workbook = workbook;
|
||||
}
|
||||
|
||||
protected FontFormatting getFontFormattingBlock()
|
||||
{
|
||||
protected FontFormatting getFontFormattingBlock() {
|
||||
return fontFormatting;
|
||||
}
|
||||
|
||||
@ -97,8 +94,7 @@ public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.Fon
|
||||
*
|
||||
* @return fontheight (in points/20); or -1 if not modified
|
||||
*/
|
||||
public int getFontHeight()
|
||||
{
|
||||
public int getFontHeight() {
|
||||
return fontFormatting.getFontHeight();
|
||||
}
|
||||
|
||||
@ -108,17 +104,14 @@ public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.Fon
|
||||
*
|
||||
* @return bw - a number between 100-1000 for the fonts "boldness"
|
||||
*/
|
||||
|
||||
public short getFontWeight()
|
||||
{
|
||||
public short getFontWeight() {
|
||||
return fontFormatting.getFontWeight();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.poi.hssf.record.cf.FontFormatting#getRawRecord()
|
||||
*/
|
||||
protected byte[] getRawRecord()
|
||||
{
|
||||
protected byte[] getRawRecord() {
|
||||
return fontFormatting.getRawRecord();
|
||||
}
|
||||
|
||||
@ -268,10 +261,8 @@ public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.Fon
|
||||
* @see #SS_SUPER
|
||||
* @see #SS_SUB
|
||||
*/
|
||||
public void setEscapementType(short escapementType)
|
||||
{
|
||||
switch(escapementType)
|
||||
{
|
||||
public void setEscapementType(short escapementType) {
|
||||
switch(escapementType) {
|
||||
case HSSFFontFormatting.SS_SUB:
|
||||
case HSSFFontFormatting.SS_SUPER:
|
||||
fontFormatting.setEscapementType(escapementType);
|
||||
@ -289,8 +280,7 @@ public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.Fon
|
||||
* @param modified
|
||||
* @see org.apache.poi.hssf.record.cf.FontFormatting#setEscapementTypeModified(boolean)
|
||||
*/
|
||||
public void setEscapementTypeModified(boolean modified)
|
||||
{
|
||||
public void setEscapementTypeModified(boolean modified) {
|
||||
fontFormatting.setEscapementTypeModified(modified);
|
||||
}
|
||||
|
||||
@ -389,10 +379,8 @@ public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.Fon
|
||||
* @see #U_SINGLE_ACCOUNTING
|
||||
* @see #U_DOUBLE_ACCOUNTING
|
||||
*/
|
||||
public void setUnderlineType(short underlineType)
|
||||
{
|
||||
switch(underlineType)
|
||||
{
|
||||
public void setUnderlineType(short underlineType) {
|
||||
switch(underlineType) {
|
||||
case HSSFFontFormatting.U_SINGLE:
|
||||
case HSSFFontFormatting.U_DOUBLE:
|
||||
case HSSFFontFormatting.U_SINGLE_ACCOUNTING:
|
||||
|
@ -22,9 +22,6 @@ package org.apache.poi.ss.usermodel;
|
||||
/**
|
||||
* High level representation for Font Formatting component
|
||||
* of Conditional Formatting settings
|
||||
*
|
||||
* @author Dmitriy Kumshayev
|
||||
* @author Yegor Kozlov
|
||||
*/
|
||||
public interface FontFormatting {
|
||||
/** Escapement type - None */
|
||||
|
Loading…
Reference in New Issue
Block a user