Fix bug #45336 - Fix HSSFColor.getTripletHash()

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@673987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2008-07-04 09:58:21 +00:00
parent 349d02400b
commit 183c13a1d3
3 changed files with 10 additions and 4 deletions

View File

@ -37,6 +37,7 @@
<!-- Don't forget to update status.xml too! --> <!-- Don't forget to update status.xml too! -->
<release version="3.1.1-alpha1" date="2008-??-??"> <release version="3.1.1-alpha1" date="2008-??-??">
<action dev="POI-DEVELOPERS" type="fix">45336 - Fix HSSFColor.getTripletHash()</action>
<action dev="POI-DEVELOPERS" type="fix">45334 - Fixed formula parser to handle dots in identifiers</action> <action dev="POI-DEVELOPERS" type="fix">45334 - Fixed formula parser to handle dots in identifiers</action>
<action dev="POI-DEVELOPERS" type="fix">45252 - Improvement for HWPF Range.replaceText()</action> <action dev="POI-DEVELOPERS" type="fix">45252 - Improvement for HWPF Range.replaceText()</action>
<action dev="POI-DEVELOPERS" type="fix">45001 - Further fix for HWPF Range.delete() and unicode characters</action> <action dev="POI-DEVELOPERS" type="fix">45001 - Further fix for HWPF Range.delete() and unicode characters</action>

View File

@ -34,6 +34,7 @@
<!-- Don't forget to update changes.xml too! --> <!-- Don't forget to update changes.xml too! -->
<changes> <changes>
<release version="3.1.1-alpha1" date="2008-??-??"> <release version="3.1.1-alpha1" date="2008-??-??">
<action dev="POI-DEVELOPERS" type="fix">45336 - Fix HSSFColor.getTripletHash()</action>
<action dev="POI-DEVELOPERS" type="fix">45334 - Fixed formula parser to handle dots in identifiers</action> <action dev="POI-DEVELOPERS" type="fix">45334 - Fixed formula parser to handle dots in identifiers</action>
<action dev="POI-DEVELOPERS" type="fix">45252 - Improvement for HWPF Range.replaceText()</action> <action dev="POI-DEVELOPERS" type="fix">45252 - Improvement for HWPF Range.replaceText()</action>
<action dev="POI-DEVELOPERS" type="fix">45001 - Further fix for HWPF Range.delete() and unicode characters</action> <action dev="POI-DEVELOPERS" type="fix">45001 - Further fix for HWPF Range.delete() and unicode characters</action>

View File

@ -152,8 +152,12 @@ public class HSSFColor {
String hexString = color.getHexString(); String hexString = color.getHexString();
if (result.containsKey(hexString)) { if (result.containsKey(hexString)) {
throw new RuntimeException("Dup color hexString (" + hexString HSSFColor other = (HSSFColor)result.get(hexString);
+ ") for color (" + color.getClass().getName() + ")"); throw new RuntimeException(
"Dup color hexString (" + hexString
+ ") for color (" + color.getClass().getName() + ") - "
+ " already taken by (" + other.getClass().getName() + ")"
);
} }
result.put(hexString, color); result.put(hexString, color);
} }
@ -1508,9 +1512,9 @@ public class HSSFColor {
public final static short index = 0x19; public final static short index = 0x19;
public final static short[] triplet = public final static short[] triplet =
{ {
153, 51, 102 127, 0, 0
}; };
public final static String hexString = "9999:3333:6666"; public final static String hexString = "8000:0:0";
public short getIndex() public short getIndex()
{ {