1 --- xlhtml/xlhtml/xlhtml.c.orig 2002-05-16 18:31:32.000000000 +0200
2 +++ xlhtml/xlhtml/xlhtml.c 2006-09-19 00:39:14.441514500 +0200
5 char colorTab[MAX_COLORS][8] =
7 - "000000", /* FIXME: Need to find these first 8 colors! */
15 - "FFFFFF", /*0x08 - This one's Black, too ??? */
16 - "FFFFFF", /* This one's normal */
17 + "#000000", /* FIXME: Need to find these first 8 colors! */
25 + "#FFFFFF", /*0x08 - This one's Black, too ??? */
26 + "#FFFFFF", /* This one's normal */
27 "red", /* "FF0000", */
28 "lime", /* "00FF00", */
29 "blue", /* "0000FF", */
34 "aqua", /* "00FFFF", */
35 - "800000", /* 0x10 */
36 + "#800000", /* 0x10 */
37 "green", /* "008000", */
38 "navy", /* "000080", */
43 "teal", /* "008080", */
46 "gray", /* "808080", */
47 - "9999FF", /* 0x18 */
56 - "FF00FF", /* 0x20 */
63 - "00CCFF", /* 0x28 */
71 - "3366FF", /* 0x30 */
79 - "003366", /* 0x38 */
88 + "#9999FF", /* 0x18 */
97 + "#FF00FF", /* 0x20 */
104 + "#00CCFF", /* 0x28 */
112 + "#3366FF", /* 0x30 */
120 + "#003366", /* 0x38 */
128 + "#FFFFFF" /* 0x40 */
131 int DatesR1904 = 0; /*!< Flag that the dates are based on McIntosh Dates system */
132 @@ -1765,7 +1765,7 @@
133 green = (unsigned char)working_buffer[(4*i)+3];
134 blue = (unsigned char)working_buffer[(4*i)+4];
135 /* printf("%02X%02X%02X\n", (int)red, (int)green, (int)blue); */
136 - sprintf(color_string, "%02X%02X%02X", (int)red, (int)green, (int)blue);
137 + sprintf(color_string, "#%02X%02X%02X", (int)red, (int)green, (int)blue);
138 customColors[i] = (U8 *)strdup(color_string);
141 @@ -2630,7 +2630,7 @@
143 if (fgcolor < numCustomColors)
145 - if (strcmp(default_background_color, (char *)customColors[fgcolor-8]) != 0)
146 + if (strcmp(default_background_color, ((char *)customColors[fgcolor-8]) + 1) != 0)
147 printf(" BGCOLOR=\"%s\"", customColors[fgcolor-8]);
150 @@ -2638,7 +2638,7 @@
152 if (fgcolor < MAX_COLORS)
154 - if (strcmp(default_background_color, colorTab[fgcolor]) != 0)
155 + if (strcmp(default_background_color, colorTab[fgcolor] + (colorTab[fgcolor][0] == '#')) != 0)
156 printf(" BGCOLOR=\"%s\"", colorTab[fgcolor]);
159 @@ -2657,7 +2657,7 @@
160 { /* if they are all the same...do it...that is if it's different from BLACK */
161 if (numCustomColors == 0) /* Don't do custom borders */
163 - if ((strcmp(colorTab[lcolor], "000000") != 0)&&(strcmp(colorTab[lcolor], "FFFFFF") != 0))
164 + if ((strcmp(colorTab[lcolor], "#000000") != 0)&&(strcmp(colorTab[lcolor], "#FFFFFF") != 0))
167 printf(" BORDERCOLOR=\"%s\"", colorTab[lcolor]);
168 @@ -3876,16 +3876,16 @@
169 if ((font_array[fnt_idx]->c_idx < numCustomColors)&&use_colors)
170 strcpy(color, (char *)customColors[font_array[fnt_idx]->c_idx-8]);
172 - strcpy(color, "000000");
173 + strcpy(color, "#000000");
177 if ((font_array[fnt_idx]->c_idx < MAX_COLORS)&&use_colors)
178 strcpy(color, colorTab[font_array[fnt_idx]->c_idx]);
180 - strcpy(color, "000000");
181 + strcpy(color, "#000000");
183 - if (strcmp(color, "000000") != 0)
184 + if (strcmp(color, "#000000") != 0)
187 printf(" COLOR=\"%s\"", color);