Ejemplo n.º 1
0
        private static Hashtable CreateColorsByHexStringMap()
        {
            HSSFColor[] colors = GetAllColors();
            Hashtable   result = new Hashtable(colors.Length * 3 / 2);

            for (int i = 0; i < colors.Length; i++)
            {
                HSSFColor color = colors[i];

                String hexString = color.GetHexString();
                if (result.ContainsKey(hexString))
                {
                    throw new InvalidDataException("Dup color hexString (" + hexString
                                                   + ") for color (" + color.GetType().Name + ")");
                }
                result[hexString] = color;
            }
            return(result);
        }