Expose another common property, strikeout.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
653c627b1f
commit
05125678ab
@ -136,6 +136,12 @@ public interface FontFormatting {
|
||||
*/
|
||||
boolean isItalic();
|
||||
|
||||
|
||||
/**
|
||||
* @return true if font strikeout is on
|
||||
*/
|
||||
boolean isStruckout();
|
||||
|
||||
/**
|
||||
* set font style options.
|
||||
*
|
||||
|
@ -22,6 +22,7 @@ import org.apache.poi.ss.usermodel.*;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTUnderlineProperty;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize;
|
||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTVerticalAlignFontProperty;
|
||||
@ -70,6 +71,18 @@ public class XSSFFontFormatting implements FontFormatting {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* XMLBeans and the XSD make this look like it can have multiple values, but it is maxOccurrs=1.
|
||||
* Use get*Array(), it is much faster than get*List().
|
||||
*
|
||||
* @see org.apache.poi.ss.usermodel.FontFormatting#isStruckout()
|
||||
*/
|
||||
@Override
|
||||
public boolean isStruckout() {
|
||||
for (CTBooleanProperty bProp : _font.getStrikeArray()) if (bProp.getVal()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return font color index
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user