You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2011/09/29 21:40:47 UTC
svn commit: r1177410 -
/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
Author: nick
Date: Thu Sep 29 19:40:47 2011
New Revision: 1177410
URL: http://svn.apache.org/viewvc?rev=1177410&view=rev
Log:
Add a method to HSSFFont to get the color, similar to the XSSF one
Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java?rev=1177410&r1=1177409&r2=1177410&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java Thu Sep 29 19:40:47 2011
@@ -18,6 +18,7 @@
package org.apache.poi.hssf.usermodel;
import org.apache.poi.hssf.record.FontRecord;
+import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.Font;
/**
@@ -191,6 +192,15 @@ public final class HSSFFont implements F
{
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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org