if (sizeUnit == SizeUnit.PERCENT) {
fontSize = convertFontPercentageToPt(fontSize);
}
font.get().setFontHeightInPoints(fontSize.shortValue());
}
Color foregroundColor = style.getForegroundColor();
if (foregroundColor != null) {
short index = getUpdateCallback().getColorIndex(
foregroundColor);
font.get().setColor(index);
}
if (font.isFetched()) {
cellStyle.get().setFont(font.get());
}
if (style.getAlignment() != null) {
cellStyle.get().setAlignment(
getAlignment(style.getAlignment()));
}
final Color backgroundColor = style.getBackgroundColor();
if (backgroundColor != null) {
cellStyle.get().setFillPattern(
CellStyle.SOLID_FOREGROUND);
cellStyle.get().setFillForegroundColor(
getUpdateCallback().getColorIndex(