add @Override annotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748491 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aeddbc05e4
commit
ff3ccad347
@ -46,6 +46,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
* @see #SS_SUPER
|
||||
* @see #SS_SUB
|
||||
*/
|
||||
@Override
|
||||
public short getEscapementType(){
|
||||
if(_font.sizeOfVertAlignArray() == 0) return SS_NONE;
|
||||
|
||||
@ -61,6 +62,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
* @see #SS_SUPER
|
||||
* @see #SS_SUB
|
||||
*/
|
||||
@Override
|
||||
public void setEscapementType(short escapementType){
|
||||
_font.setVertAlignArray(null);
|
||||
if(escapementType != SS_NONE){
|
||||
@ -71,6 +73,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
/**
|
||||
* @return font color index
|
||||
*/
|
||||
@Override
|
||||
public short getFontColorIndex(){
|
||||
if(_font.sizeOfColorArray() == 0) return -1;
|
||||
|
||||
@ -83,6 +86,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
/**
|
||||
* @param color font color index
|
||||
*/
|
||||
@Override
|
||||
public void setFontColorIndex(short color){
|
||||
_font.setColorArray(null);
|
||||
if(color != -1){
|
||||
@ -90,12 +94,14 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFColor getFontColor() {
|
||||
if(_font.sizeOfColorArray() == 0) return null;
|
||||
|
||||
return new XSSFColor(_font.getColorArray(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFontColor(Color color) {
|
||||
XSSFColor xcolor = XSSFColor.toXSSFColor(color);
|
||||
if (xcolor == null) {
|
||||
@ -117,6 +123,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
*
|
||||
* @return fontheight (in points/20); or -1 if not modified
|
||||
*/
|
||||
@Override
|
||||
public int getFontHeight(){
|
||||
if(_font.sizeOfSzArray() == 0) return -1;
|
||||
|
||||
@ -129,6 +136,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
*
|
||||
* @param height the height in twips (in points/20)
|
||||
*/
|
||||
@Override
|
||||
public void setFontHeight(int height){
|
||||
_font.setSzArray(null);
|
||||
if(height != -1){
|
||||
@ -147,6 +155,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
* @see #U_SINGLE_ACCOUNTING
|
||||
* @see #U_DOUBLE_ACCOUNTING
|
||||
*/
|
||||
@Override
|
||||
public short getUnderlineType(){
|
||||
if(_font.sizeOfUArray() == 0) return U_NONE;
|
||||
CTUnderlineProperty u = _font.getUArray(0);
|
||||
@ -170,6 +179,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
* @see #U_SINGLE_ACCOUNTING
|
||||
* @see #U_DOUBLE_ACCOUNTING
|
||||
*/
|
||||
@Override
|
||||
public void setUnderlineType(short underlineType){
|
||||
_font.setUArray(null);
|
||||
if(underlineType != U_NONE){
|
||||
@ -184,6 +194,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
*
|
||||
* @return bold - whether the font is bold or not
|
||||
*/
|
||||
@Override
|
||||
public boolean isBold(){
|
||||
return _font.sizeOfBArray() == 1 && _font.getBArray(0).getVal();
|
||||
}
|
||||
@ -191,6 +202,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
/**
|
||||
* @return true if font style was set to <i>italic</i>
|
||||
*/
|
||||
@Override
|
||||
public boolean isItalic(){
|
||||
return _font.sizeOfIArray() == 1 && _font.getIArray(0).getVal();
|
||||
}
|
||||
@ -201,6 +213,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
* @param italic - if true, set posture style to italic, otherwise to normal
|
||||
* @param bold if true, set font weight to bold, otherwise to normal
|
||||
*/
|
||||
@Override
|
||||
public void setFontStyle(boolean italic, boolean bold){
|
||||
_font.setIArray(null);
|
||||
_font.setBArray(null);
|
||||
@ -211,6 +224,7 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
/**
|
||||
* set font style options to default values (non-italic, non-bold)
|
||||
*/
|
||||
@Override
|
||||
public void resetFontStyle(){
|
||||
_font.set(CTFont.Factory.newInstance());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user