diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java index 64c5b6df44..9a3735c4d6 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java @@ -315,11 +315,12 @@ public class HSSFCellStyle implements CellStyle * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#createFont() * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#getFontAt(short) */ - - public void setFont(Font font) - { + public void setFont(Font font) { + setFont((HSSFFont)font); + } + public void setFont(HSSFFont font) { format.setIndentNotParentFont(true); - short fontindex = ((HSSFFont) font).getIndex(); + short fontindex = font.getIndex(); format.setFontIndex(fontindex); }