Add a method to HSSFFont to get the color, similar to the XSSF one
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1177410 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba88670e3e
commit
b814328848
@ -18,6 +18,7 @@
|
|||||||
package org.apache.poi.hssf.usermodel;
|
package org.apache.poi.hssf.usermodel;
|
||||||
|
|
||||||
import org.apache.poi.hssf.record.FontRecord;
|
import org.apache.poi.hssf.record.FontRecord;
|
||||||
|
import org.apache.poi.hssf.util.HSSFColor;
|
||||||
import org.apache.poi.ss.usermodel.Font;
|
import org.apache.poi.ss.usermodel.Font;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -192,6 +193,15 @@ public final class HSSFFont implements Font {
|
|||||||
return font.getColorPaletteIndex();
|
return font.getColorPaletteIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the color value for the font
|
||||||
|
*/
|
||||||
|
public HSSFColor getHSSFColor(HSSFWorkbook wb)
|
||||||
|
{
|
||||||
|
HSSFPalette pallette = wb.getCustomPalette();
|
||||||
|
return pallette.getColor( getColor() );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the boldness to use
|
* set the boldness to use
|
||||||
* @param boldweight
|
* @param boldweight
|
||||||
|
Loading…
Reference in New Issue
Block a user