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 # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # 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) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = gtar
GZIP_ENV = --best GZIP_ENV = --best
all: all-redirect all: all-redirect
.SUFFIXES: .SUFFIXES:
@ -101,7 +101,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(ACLOCAL_M4): configure.in $(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL) cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
@ -170,7 +170,7 @@ maintainer-clean-recursive:
dot_seen=no; \ dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \ rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \ test "$$subdir" != "." || dot_seen=yes; \
done; \ done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \ test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \ 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 This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -19,7 +19,7 @@ dnl PARTICULAR PURPOSE.
dnl Usage: dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE, AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL]) [AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1] PACKAGE=[$1]
AC_SUBST(PACKAGE) AC_SUBST(PACKAGE)
@ -47,7 +47,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# Check to make sure that the build environment is sane. # 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]) [AC_MSG_CHECKING([whether build environment is sane])
# Just in case # Just in case
sleep 1 sleep 1
@ -88,7 +88,7 @@ AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version. dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG, AC_DEFUN([AM_MISSING_PROG],
[AC_MSG_CHECKING(for working $2) [AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # 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. # Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER, AC_DEFUN([AM_CONFIG_HEADER],
[AC_PREREQ([2.12]) [AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1]) AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file. 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. */ /* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have the <inttypes.h> header file. */ /* Define to empty if the keyword does not work. */
#undef HAVE_INTTYPES_H #undef const
/* Define if you have the <malloc.h> header file. */ /* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef HAVE_MALLOC_H #undef size_t
/* 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. */ /* Define if you have the ANSI C header files. */
#undef STDC_HEADERS #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
/* Name of package */
#undef PACKAGE
/* Version number of package */ /* Version number of package */
#undef VERSION #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

5728
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,17 @@
xlHtml ChangeLog 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 0.5 04/13/02
* Fixed some memory leaks * Fixed some memory leaks
* Increased file name limit to 256 characters * Increased file name limit to 256 characters
@ -198,4 +210,3 @@
0.0.1 08/8/1999 Initial Release. 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... */ /* Print the author's name in itallics... */
if (author.str) if (author.str)
{ {
printf("<FONT SIZE=-1><I>Spreadsheet's Author:&nbsp;"); printf("<FONT SIZE=\"-1\"><I>Spreadsheet's Author:&nbsp;");
OutputString(&author); OutputString(&author);
printf("</I></FONT><br>"); printf("</I></FONT><br>");
do_cr(); do_cr();
} }
/* Print when & how the file was last updated. */ /* Print when & how the file was last updated. */
printf("<FONT SIZE=-1><I>Last Updated "); printf("<FONT SIZE=\"-1\"><I>Last Updated ");
if (lastUpdated) if (lastUpdated)
printf("%s&nbsp; ", lastUpdated); printf("%s&nbsp; ", lastUpdated);
switch (file_version) switch (file_version)
@ -244,7 +244,7 @@ void OutputTableHTML(void)
do_cr(); do_cr();
/* Output Credit */ /* 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(); do_cr();
/* Output Tail */ /* Output Tail */
@ -389,4 +389,9 @@ void output_end_html_attr(html_attr *h)
printf("</A>"); printf("</A>");
h->uflag = 0; 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); */ /* printf("I:%04X BL:%04X\n", bufidx, buflast); */
cont_str_array = 1; cont_str_array = 1;
cont_grbit = data; 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; return;
} }
@ -2516,16 +2527,20 @@ void output_cell(cell *c, int xml)
html_attr h; html_attr h;
if (c == NULL) if (c == NULL)
printf( xml ? "" : "<TD>&nbsp;"); printf( xml ? ">" : "<TD>&nbsp;");
else if (c->spanned != 0) else if (c->spanned != 0)
{
if (xml)
printf(">");
return; return;
}
else else
{ /* Determine whether or not it is of numeric origin.. */ { /* Determine whether or not it is of numeric origin.. */
int numeric = IsCellNumeric(c); /* 0=Text 1=Numeric */ int numeric = IsCellNumeric(c); /* 0=Text 1=Numeric */
html_flag_init(&h); html_flag_init(&h);
if (c->xfmt == 0) if (c->xfmt == 0)
{ /* Unknown format... */ { /* Unknown format... */
printf( xml ? "" : "<TD>"); /* This section doesn't use Unicode */ printf( xml ? ">" : "<TD>"); /* This section doesn't use Unicode */
if (c->ustr.str) if (c->ustr.str)
OutputString(&(c->ustr)); OutputString(&(c->ustr));
else else
@ -2551,9 +2566,9 @@ void output_cell(cell *c, int xml)
if ((c->rowspan != 0)||(c->colspan != 0)) if ((c->rowspan != 0)||(c->colspan != 0))
{ {
if (c->colspan) if (c->colspan)
printf( xml ? "<colspan>%d</colspan>" : " COLSPAN=\"%d\"", c->colspan); printf( xml ? " colspan=\"%d\"" : " COLSPAN=\"%d\"", c->colspan);
if (c->rowspan) if (c->rowspan)
printf( xml ? "<rowspan>%d</rowspan>" : " ROWSPAN=\"%d\"", c->rowspan); printf( xml ? " rowspan=\"%d\"" : " ROWSPAN=\"%d\"", c->rowspan);
} }
if ((safe > 0)&&(!nullString)) if ((safe > 0)&&(!nullString))
{ {
@ -2667,8 +2682,8 @@ void output_cell(cell *c, int xml)
} }
} }
/* Close up the <TD>... */ /* Close up the <TD> or <cell>... */
printf(xml ? "" : ">"); printf(">");
/* Next set font properties */ /* Next set font properties */
if (safe > 1 && !xml ) if (safe > 1 && !xml )
@ -2719,8 +2734,6 @@ void output_cell(cell *c, int xml)
/* Now close the tags... */ /* Now close the tags... */
output_end_html_attr(&h); output_end_html_attr(&h);
if (h.fflag)
printf("</FONT>");
} }
if (!aggressive) if (!aggressive)
@ -3584,8 +3597,6 @@ void OutputString(uni_string *u)
if (format_changed) if (format_changed)
{ /* if old attributs, close */ { /* if old attributs, close */
output_end_html_attr(&h_flags); output_end_html_attr(&h_flags);
if (h_flags.fflag)
printf("</FONT>");
} }
else else
{ /* FIXME: Also need to consider that a font may already be set for { /* 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) if (format_changed)
{ {
output_end_html_attr(&h_flags); output_end_html_attr(&h_flags);
if (h_flags.fflag)
printf("</FONT>");
} }
} }
else else
@ -3906,11 +3915,11 @@ void output_start_font_attribute(html_attr *h, U16 fnt_idx)
if (font_array[fnt_idx]->super & 0x0003) if (font_array[fnt_idx]->super & 0x0003)
{ {
if (h->fflag) if (h->fflag)
printf(" SIZE=2"); /* Sub & Superscript */ printf(" SIZE=\"2\""); /* Sub & Superscript */
else else
{ {
h->fflag = 1; h->fflag = 1;
printf("<FONT SIZE=2"); /* Sub & Superscript */ printf("<FONT SIZE=\"2\""); /* Sub & Superscript */
} }
} }
else else
@ -3918,14 +3927,14 @@ void output_start_font_attribute(html_attr *h, U16 fnt_idx)
if (h->fflag) if (h->fflag)
{ {
if (font_array[fnt_idx]->size != default_fontsize) 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 else
{ {
if (font_array[fnt_idx]->size != default_fontsize) if (font_array[fnt_idx]->size != default_fontsize)
{ {
h->fflag = 1; 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"); printf("\t\t\t\t<row>\n");
for (k=ws_array[i]->first_col; k<=ws_array[i]->biggest_col; k++) 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... */ output_cell(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k], 1); /* This stuff happens for each cell... */
printf("</cell>\n" ); printf("</cell>\n" );
if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]) 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\t</rows>\n" );
printf("\t\t</sheet>\n"); printf("\t\t</sheet>\n");