]> source.dussan.org Git - poi.git/commitdiff
Fix bug #45336 - Fix HSSFColor.getTripletHash()
authorNick Burch <nick@apache.org>
Fri, 4 Jul 2008 09:58:21 +0000 (09:58 +0000)
committerNick Burch <nick@apache.org>
Fri, 4 Jul 2008 09:58:21 +0000 (09:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@673987 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/status.xml
src/java/org/apache/poi/hssf/util/HSSFColor.java

index 104082dedd07db78ee3fbc5b4115f25f1054ab6a..f9f29be397bcd6cf268e0a0c51f98c876fcfc24a 100644 (file)
@@ -37,6 +37,7 @@
 
                <!-- Don't forget to update status.xml too! -->
         <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">45252 - Improvement for HWPF Range.replaceText()</action>
            <action dev="POI-DEVELOPERS" type="fix">45001 - Further fix for HWPF Range.delete() and unicode characters</action>
index 6a890e99344e631c4b5e548728e36faf4cd60ccf..d2c0907a8b1e6abdc95f35cff7e286029dd6c111 100644 (file)
@@ -34,6 +34,7 @@
        <!-- Don't forget to update changes.xml too! -->
     <changes>
         <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">45252 - Improvement for HWPF Range.replaceText()</action>
            <action dev="POI-DEVELOPERS" type="fix">45001 - Further fix for HWPF Range.delete() and unicode characters</action>
index 4ecc6545fdae2571a344994f149f731b12270232..289b01ef2b32235c349255e07eed09c9e2a25b17 100644 (file)
@@ -152,8 +152,12 @@ public class HSSFColor {
 
             String hexString = color.getHexString();
             if (result.containsKey(hexString)) {
-                throw new RuntimeException("Dup color hexString (" + hexString
-                        + ") for color (" + color.getClass().getName() + ")");
+               HSSFColor other = (HSSFColor)result.get(hexString);
+                throw new RuntimeException(
+                               "Dup color hexString (" + hexString
+                        + ") for color (" + color.getClass().getName() + ") - "
+                        + " already taken by (" + other.getClass().getName() + ")"
+                );
             }
             result.put(hexString, color);
         }
@@ -1508,9 +1512,9 @@ public class HSSFColor {
         public final static short   index     = 0x19;
         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()
         {