}
if (bg != null)
{
if (hssfCellStyle instanceof XSSFCellStyle)
{
final XSSFCellStyle xssfCellStyle = (XSSFCellStyle) hssfCellStyle;
if (BorderStyle.NONE.equals(bg.getBottom().getBorderStyle()) == false)
{
hssfCellStyle.setBorderBottom(styleKey.getBorderStrokeBottom());
xssfCellStyle.setBorderColor(XSSFCellBorder.BorderSide.BOTTOM,
new XSSFColor(styleKey.getExtendedColorBottom()));
}
if (BorderStyle.NONE.equals(bg.getTop().getBorderStyle()) == false)
{
hssfCellStyle.setBorderTop(styleKey.getBorderStrokeTop());
xssfCellStyle.setBorderColor(XSSFCellBorder.BorderSide.TOP,
new XSSFColor(styleKey.getExtendedColorTop()));
}
if (BorderStyle.NONE.equals(bg.getLeft().getBorderStyle()) == false)
{
hssfCellStyle.setBorderLeft(styleKey.getBorderStrokeLeft());
xssfCellStyle.setBorderColor(XSSFCellBorder.BorderSide.LEFT,
new XSSFColor(styleKey.getExtendedColorLeft()));
}
if (BorderStyle.NONE.equals(bg.getRight().getBorderStyle()) == false)
{
hssfCellStyle.setBorderRight(styleKey.getBorderStrokeRight());
xssfCellStyle.setBorderColor(XSSFCellBorder.BorderSide.RIGHT,
new XSSFColor(styleKey.getExtendedColorRight()));
}
if (bg.getBackgroundColor() != null)
{
xssfCellStyle.setFillForegroundColor(new XSSFColor(styleKey.getExtendedColor()));
hssfCellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
}
}
else
{