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,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -87,7 +87,7 @@ config.sub configure configure.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
@ -101,7 +101,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
@ -170,7 +170,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
test "$$subdir" != "." || dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \

12
aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -19,7 +19,7 @@ dnl PARTICULAR PURPOSE.
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
@ -47,7 +47,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
@ -88,7 +88,7 @@ AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG,
AC_DEFUN([AM_MISSING_PROG],
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
@ -104,7 +104,7 @@ AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
AC_DEFUN([AM_CONFIG_HEADER],
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.

View File

@ -1,65 +1,48 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to empty if the keyword does not work. */
#undef const
/* Define if you have the <malloc.h> header file. */
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* The number of bytes in a double. */
#undef SIZEOF_DOUBLE
/* The number of bytes in a float. */
#undef SIZEOF_FLOAT
/* The number of bytes in a long double. */
#undef SIZEOF_LONG_DOUBLE
/* The number of bytes in a unsigned char. */
#undef SIZEOF_UNSIGNED_CHAR
/* The number of bytes in a unsigned int. */
#undef SIZEOF_UNSIGNED_INT
/* The number of bytes in a unsigned long. */
#undef SIZEOF_UNSIGNED_LONG
/* The number of bytes in a unsigned long long. */
#undef SIZEOF_UNSIGNED_LONG_LONG
/* The number of bytes in a unsigned short. */
#undef SIZEOF_UNSIGNED_SHORT
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* The size of a `double', as computed by sizeof. */
#undef SIZEOF_DOUBLE
/* The size of a `float', as computed by sizeof. */
#undef SIZEOF_FLOAT
/* The size of a `long double', as computed by sizeof. */
#undef SIZEOF_LONG_DOUBLE
/* The size of a `unsigned char', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_CHAR
/* The size of a `unsigned int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_INT
/* The size of a `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* The size of a `unsigned long long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG_LONG
/* The size of a `unsigned short', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_SHORT
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define if your processor stores words with the most significant byte first
(like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t

6054
configure vendored

File diff suppressed because it is too large Load Diff

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");