Applied patches from Vaclav Dvorak

This commit is contained in:
slidedraw
2002-05-10 15:17:47 +00:00
parent c330eac117
commit 9c1a133973
8 changed files with 1444 additions and 4838 deletions

View File

@@ -1,19 +1,31 @@
xlHtml ChangeLog
HEAD
* Temporary fix for non-Unicode 8-bit characters in utf-8 output until
real charset conversion is in place
* Fixed some typos and formatting
* Fixed closing of <FONT> tag
* Fixed raw Unicode (A.B.C.D., where . is character 0x00) in output
when string in XLS begins as 8-bit but continues as 16-bit
* Fixed invalid XML output - missing quotes aroud size attribute
of <FONT>
* Made rowspan and colspan attributes instead of content of <cell>
in XML output
0.5 04/13/02
*Fixed some memory leaks
*Increased file name limit to 256 characters
* Fixed some memory leaks
* Increased file name limit to 256 characters
0.4.9.3 03/19/02
*Began code modularization
*Changed pointers to xlhtml web site
* Began code modularization
* Changed pointers to xlhtml web site
0.4.9.2 03/13/02
*Turned over xlhtml to Charles Wyble
*Added a patch to support bold formatting
* Turned over xlhtml to Charles Wyble
* Added a patch to support bold formatting
0.4.9.1 03/10/02
* Fixed bug in cole.c which causes errors reading ppthtml files - Takahiro Kambe
* Fixed bug in cole.c which causes errors reading ppthtml files - Takahiro Kambe
* Fixed bug in page name output for non-html output
* xlhtml now uses Microsoft CodePages - Victor Wagner
@@ -31,10 +43,10 @@
* Added doxygen doco generation - Rafael Kitover
* Added patch to support String Formulas - Rafael Kitover
* Changed unsupported numeric formats to output using floating point
technique with the decimal suppressed. Was truncating to MAXINT.
technique with the decimal suppressed. Was truncating to MAXINT.
* Fixed bug where CSV was not escaping currency fields - Rafael Kitover
* Fixed bug where unknown field types were not escaped in CSV
- Rafael Kitover
- Rafael Kitover
* Fixed bug in cell merging where the whole row was selected
* Fixed bug in mailto hyperlink
* Now supports custom colors
@@ -45,7 +57,7 @@
* Optimized html further so it suppresses alignment of blank rows
* Improved portability to DOS & WIN32
* Moved everything over to U8, U16, U32, F32, & F64 data types. This is in
effort to improve support on 64 bit platforms.
effort to improve support on 64 bit platforms.
* Added the xlv script from Asher Blum
0.3 10/19/01
@@ -53,7 +65,7 @@
* Fixed situation where ellipses were not being rendered correctly
* Fixed Unicode problem in Label Cells
* Fixed problem where cells created by row data were not being updated
when the cell was officially created.
when the cell was officially created.
* Program renamed to xlhtml...all lowercase.
* Moved xlHtml over to a new makefile system. It does a static build now.
* Finished moving cole library to mkstemp from tempnam()
@@ -82,7 +94,7 @@
* Fixed extended string + rich string
* Fixed a misplaced array initialization for ws_array
* Fixed problem where the html closing tags were being output during error
messages when -asc option was given
messages when -asc option was given
* Changed all the comments over to standard C comments for increased
portability
@@ -100,9 +112,9 @@
0.2.4 12/04/1999
* Added Cell Merging capabilities
* Added -te command line option to "trim the edges" (empty rows or
columns at the edges of a worksheet).
columns at the edges of a worksheet).
* Added the contributed excel2text script to let mutt clients see xls
attachments
attachments
* Added a -v command line switch for version information
* Added code to optimize font size statements similar to font face
* Fixed Unicode bugs in font name and sheet name - Thanks Hironori !
@@ -123,14 +135,14 @@
* Added -tc command line optine to override the text color
* Added -bi command line option to add a background image
* Added better support for Excel 95 & 5.0. Had to disable
colors since it looked crazy. Probably has a different palette.
colors since it looked crazy. Probably has a different palette.
* Added -a command line to use aggressive optimization. This doesn't
generate closing tags for TD & TR tags. This could be a problem
for older browsers.
generate closing tags for TD & TR tags. This could be a problem
for older browsers.
* Further reduced generated html output.
* Program now displays the last saved value of a formula.
* Added command line option to suppress warning that formula data
may be stale or inaccurate.
may be stale or inaccurate.
* Updated uploader.pl documentation
* Added nsopen *bash* script in contrib directory
@@ -142,16 +154,16 @@
0.1.6 9/25/1999
* Re-designed the Test.xls file to really workout xlHtml
* Added support for most built-in cell formats :date, time,
number, and scientific formats
* Added support for most built-in cell formats: date, time,
number, and scientific formats
* Added support for general formatting
* Fixed MS induced glitch in LabelSST - only very large files
would have this problem.
would have this problem.
* Fixed bug in default Row XF's - only seen in colored blank cells
* Optimized html tags. Avg 40% less html!
* Added more documentation in README-xlHtml
* Cleaned out document folder. It had some files that were created
from the ./configure script. Reduced total tar size significantly.
from the ./configure script. Reduced total tar size significantly.
* Fixed bug in RK number conversion
0.1.4 9/15/1999
@@ -197,5 +209,4 @@
* Labels are now supported.
0.0.1 08/8/1999 Initial Release.
*So far it supports most strings, empty cells, and integers.
* So far it supports most strings, empty cells, and integers.

View File

@@ -145,14 +145,14 @@ void OutputTableHTML(void)
/* Print the author's name in itallics... */
if (author.str)
{
printf("<FONT SIZE=-1><I>Spreadsheet's Author:&nbsp;");
printf("<FONT SIZE=\"-1\"><I>Spreadsheet's Author:&nbsp;");
OutputString(&author);
printf("</I></FONT><br>");
do_cr();
}
/* Print when & how the file was last updated. */
printf("<FONT SIZE=-1><I>Last Updated ");
printf("<FONT SIZE=\"-1\"><I>Last Updated ");
if (lastUpdated)
printf("%s&nbsp; ", lastUpdated);
switch (file_version)
@@ -244,7 +244,7 @@ void OutputTableHTML(void)
do_cr();
/* Output Credit */
printf("<hr><FONT SIZE=-1>Created with <a href=\"http://chicago.sf.net/xlhtml\">xlhtml %s</a></FONT><br>", VERSION);
printf("<hr><FONT SIZE=\"-1\">Created with <a href=\"http://chicago.sf.net/xlhtml\">xlhtml %s</a></FONT><br>", VERSION);
do_cr();
/* Output Tail */
@@ -389,4 +389,9 @@ void output_end_html_attr(html_attr *h)
printf("</A>");
h->uflag = 0;
}
if (h->fflag)
{
printf("</FONT>");
h->fflag = 0;
}
}

View File

@@ -980,6 +980,17 @@ void main_line_processor(U16 opcode, U16 version, U32 count, U16 last, U8 data)
/* printf("I:%04X BL:%04X\n", bufidx, buflast); */
cont_str_array = 1;
cont_grbit = data;
if ((cont_grbit & 0x01) && !(grbit & 0x01))
{ /* previous chunk was not Unicode but this one is */
int i;
grbit |= 0x01;
for (i = bufidx-1; i >= 0; i--) {
working_buffer[2*i] = working_buffer[i];
working_buffer[2*i+1] = 0;
}
bufidx = 2 * bufidx;
buflast = 2 * buflast;
}
return;
}
@@ -2516,16 +2527,20 @@ void output_cell(cell *c, int xml)
html_attr h;
if (c == NULL)
printf( xml ? "" : "<TD>&nbsp;");
printf( xml ? ">" : "<TD>&nbsp;");
else if (c->spanned != 0)
{
if (xml)
printf(">");
return;
}
else
{ /* Determine whether or not it is of numeric origin.. */
int numeric = IsCellNumeric(c); /* 0=Text 1=Numeric */
html_flag_init(&h);
if (c->xfmt == 0)
{ /* Unknown format... */
printf( xml ? "" : "<TD>"); /* This section doesn't use Unicode */
printf( xml ? ">" : "<TD>"); /* This section doesn't use Unicode */
if (c->ustr.str)
OutputString(&(c->ustr));
else
@@ -2551,9 +2566,9 @@ void output_cell(cell *c, int xml)
if ((c->rowspan != 0)||(c->colspan != 0))
{
if (c->colspan)
printf( xml ? "<colspan>%d</colspan>" : " COLSPAN=\"%d\"", c->colspan);
printf( xml ? " colspan=\"%d\"" : " COLSPAN=\"%d\"", c->colspan);
if (c->rowspan)
printf( xml ? "<rowspan>%d</rowspan>" : " ROWSPAN=\"%d\"", c->rowspan);
printf( xml ? " rowspan=\"%d\"" : " ROWSPAN=\"%d\"", c->rowspan);
}
if ((safe > 0)&&(!nullString))
{
@@ -2667,8 +2682,8 @@ void output_cell(cell *c, int xml)
}
}
/* Close up the <TD>... */
printf(xml ? "" : ">");
/* Close up the <TD> or <cell>... */
printf(">");
/* Next set font properties */
if (safe > 1 && !xml )
@@ -2719,8 +2734,6 @@ void output_cell(cell *c, int xml)
/* Now close the tags... */
output_end_html_attr(&h);
if (h.fflag)
printf("</FONT>");
}
if (!aggressive)
@@ -3584,8 +3597,6 @@ void OutputString(uni_string *u)
if (format_changed)
{ /* if old attributs, close */
output_end_html_attr(&h_flags);
if (h_flags.fflag)
printf("</FONT>");
}
else
{ /* FIXME: Also need to consider that a font may already be set for
@@ -3609,8 +3620,6 @@ void OutputString(uni_string *u)
if (format_changed)
{
output_end_html_attr(&h_flags);
if (h_flags.fflag)
printf("</FONT>");
}
}
else
@@ -3906,11 +3915,11 @@ void output_start_font_attribute(html_attr *h, U16 fnt_idx)
if (font_array[fnt_idx]->super & 0x0003)
{
if (h->fflag)
printf(" SIZE=2"); /* Sub & Superscript */
printf(" SIZE=\"2\""); /* Sub & Superscript */
else
{
h->fflag = 1;
printf("<FONT SIZE=2"); /* Sub & Superscript */
printf("<FONT SIZE=\"2\""); /* Sub & Superscript */
}
}
else
@@ -3918,14 +3927,14 @@ void output_start_font_attribute(html_attr *h, U16 fnt_idx)
if (h->fflag)
{
if (font_array[fnt_idx]->size != default_fontsize)
printf(" SIZE=%d", font_array[fnt_idx]->size);
printf(" SIZE=\"%d\"", font_array[fnt_idx]->size);
}
else
{
if (font_array[fnt_idx]->size != default_fontsize)
{
h->fflag = 1;
printf("<FONT SIZE=%d", font_array[fnt_idx]->size);
printf("<FONT SIZE=\"%d\"", font_array[fnt_idx]->size);
}
}
}

View File

@@ -98,7 +98,7 @@ void OutputTableXML(void)
printf("\t\t\t\t<row>\n");
for (k=ws_array[i]->first_col; k<=ws_array[i]->biggest_col; k++)
{
printf("\t\t\t\t\t<cell row=\"%d\" col=\"%d\">", j, k );
printf("\t\t\t\t\t<cell row=\"%d\" col=\"%d\"", j, k );
output_cell(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k], 1); /* This stuff happens for each cell... */
printf("</cell>\n" );
if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k])
@@ -109,7 +109,7 @@ void OutputTableXML(void)
}
printf("</row>\n");
printf("\t\t\t\t</row>\n");
}
printf( "\t\t\t</rows>\n" );
printf("\t\t</sheet>\n");