Commit 302aced7 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Update copywrite years.


2000-03-24  Jody Goldberg <jgoldberg@home.com>

	* *.[ch] : Update copywrite years.

	* ms-obj.c (ms_read_OBJ) : improve debug output.
	(ms_obj_read_biff8_obj) : Try a new heuristic for dealing with trailing IMDATA.
parent 62186ebd
2000-03-24 Jody Goldberg <jgoldberg@home.com>
* *.[ch] : Update copywrite years.
* ms-obj.c (ms_read_OBJ) : improve debug output.
(ms_obj_read_biff8_obj) : Try a new heuristic for dealing with trailing IMDATA.
2000-03-23 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (biff_xf_data_new) : Support horizontal alignment
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
/**
* See S59D52.HTM for the spec.
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#include <stdio.h>
#include <sys/stat.h>
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
extern void excel_init (void);
extern void excel_shutdown (void);
......@@ -5,7 +5,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
/**
* See S59FDC.HTM for the spec.
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#ifndef GNUMERIC_EXCEL_H
#define GNUMERIC_EXCEL_H
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
/**
* See S59E2B.HTM for the spec.
......
......@@ -6,7 +6,7 @@
* Author:
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1999 Jody Goldberg
* (C) 1999, 2000 Jody Goldberg
**/
#include <config.h>
......
......@@ -9,7 +9,7 @@
* Author:
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1999 Jody Goldberg
* (C) 1999, 2000 Jody Goldberg
**/
typedef struct _GnumericChartSeries
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#include <stdio.h>
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#ifndef GNUMERIC_BIFF_H
#define GNUMERIC_BIFF_H
......
......@@ -4,7 +4,7 @@
* Author:
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1999 Jody Goldberg
* (C) 1999, 2000 Jody Goldberg
**/
#include <stdio.h>
......
......@@ -7,7 +7,7 @@
* Author:
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1999 Jody Goldberg
* (C) 1999, 2000 Jody Goldberg
**/
#include "ms-excel-read.h"
......
......@@ -5,7 +5,7 @@
* Jody Goldberg (jgoldberg@home.com)
* Michael Meeks (michael@nuclecu.unam.mx)
*
* (C) 1998, 1999 Jody Goldberg, Michael Meeks
* (C) 1998, 1999, 2000 Jody Goldberg, Michael Meeks
*
* See S59FD6.HTM for an overview...
**/
......
......@@ -8,7 +8,7 @@
* Jody Goldberg (jgoldberg@home.com)
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Jody Goldberg, Michael Meeks
* (C) 1998, 1999, 2000 Jody Goldberg, Michael Meeks
**/
#include "ms-excel-read.h"
......
......@@ -8,7 +8,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#include "excel.h"
......
......@@ -5,7 +5,7 @@
* Michael Meeks (michael@imaginator.com)
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1998, 1999 Michael Meeks, Jody Goldberg
* (C) 1998, 1999, 2000 Michael Meeks, Jody Goldberg
**/
#include <config.h>
......@@ -1290,7 +1290,9 @@ ms_excel_get_style_from_xf (ExcelSheet *sheet, guint16 xfidx)
static void
ms_excel_set_xf (ExcelSheet *sheet, int col, int row, guint16 xfidx)
{
#if UNDERSTAND_DUAL_BORDERS
MStyleBorder const * b;
#endif
Range range;
MStyle * const * const mstyle =
ms_excel_get_style_from_xf (sheet, xfidx);
......@@ -1308,7 +1310,7 @@ ms_excel_set_xf (ExcelSheet *sheet, int col, int row, guint16 xfidx)
range.end = range.start;
sheet_style_attach (sheet->gnum_sheet, range, mstyle[0]);
#if 0
#if UNDERSTAND_DUAL_BORDERS
printf ("%s%d == %hd\n", col_name(col), row+1, xfidx);
b = mstyle_get_border (mstyle[0], MSTYLE_BORDER_LEFT);
printf ("Left = %d\n", b->line_type);
......@@ -1320,7 +1322,7 @@ ms_excel_set_xf (ExcelSheet *sheet, int col, int row, guint16 xfidx)
sheet_style_attach (sheet->gnum_sheet, range, mstyle[1]);
}
if (mstyle[2] != NULL) {
#if 0
#if UNDERSTAND_DUAL_BORDERS
b = mstyle_get_border (mstyle[2], MSTYLE_BORDER_LEFT);
printf ("Right = %d\n", b->line_type);
#endif
......@@ -2847,6 +2849,8 @@ ms_excel_read_cell (BiffQuery *q, ExcelSheet *sheet)
from_name, format_name);
}
#endif
break;
case BIFF_STANDARDWIDTH :
/* What the heck is the 'standard width dialog' ? */
break;
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#ifndef GNUMERIC_MS_EXCEL_H
#define GNUMERIC_MS_EXCEL_H
......
......@@ -4,7 +4,7 @@
* Author:
* Jon K Hellan (hellan@acm.org)
*
* (C) 1999 Jon K Hellan
* (C) 1999, 2000 Jon K Hellan
**/
#include "config.h"
......
......@@ -4,7 +4,7 @@
* Author:
* Jon K Hellan (hellan@acm.org)
*
* (C) 1999 Jon K Hellan
* (C) 1999, 2000 Jon K Hellan
**/
#ifndef GNUMERIC_MS_EXCEL_UTIL_H
#define GNUMERIC_MS_EXCEL_UTIL_H
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#ifndef GNUMERIC_MS_EXCEL_WRITE_H
#define GNUMERIC_MS_EXCEL_WRITE_H
......
......@@ -5,7 +5,7 @@
* Michael Meeks (michael@imaginator.com)
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1998, 1999 Michael Meeks, Jody Goldberg
* (C) 1998, 1999, 2000 Michael Meeks, Jody Goldberg
**/
#ifndef GNUMERIC_MS_EXCEL_XF_H
#define GNUMERIC_MS_EXCEL_XF_H
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
*/
#include <fcntl.h>
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
*/
#ifndef GNUMERIC_MS_FORMULA_R_H
#define GNUMERIC_MS_FORMULA_R_H
......
......@@ -5,7 +5,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
*/
#include <fcntl.h>
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
*/
#ifndef GNUMERIC_MS_FORMULA_W_H
#define GNUMERIC_MS_FORMULA_W_H
......
......@@ -5,7 +5,7 @@
* Jody Goldberg (jgoldberg@home.com)
* Michael Meeks (mmeeks@gnu.org)
*
* (C) 1998, 1999 Jody Goldberg, Michael Meeks
* (C) 1998, 1999, 2000 Jody Goldberg, Michael Meeks
**/
#include <config.h>
......@@ -14,7 +14,7 @@
#include "ms-escher.h"
#include "utils.h"
extern int ms_excel_read_debug;
int ms_excel_object_debug;
#define GR_END 0x00
#define GR_MACRO 0x04
......@@ -62,7 +62,7 @@ object_anchor_to_position (double pixels[4], MSObj*obj, Sheet const * sheet,
g_return_val_if_fail (obj->anchor_set, TRUE);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0)
if (ms_excel_object_debug > 0)
printf ("%s\n", sheet->name);
#endif
for (i = 0; i < 4; i++) {
......@@ -81,7 +81,7 @@ object_anchor_to_position (double pixels[4], MSObj*obj, Sheet const * sheet,
pixels[i] += sheet_row_get_distance_pixels (sheet, 0, pos);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0)
if (ms_excel_object_debug > 0)
printf ("%d + %d\n", pos+1, nths);
#endif
} else {
......@@ -96,14 +96,14 @@ object_anchor_to_position (double pixels[4], MSObj*obj, Sheet const * sheet,
pixels[i] += sheet_col_get_distance_pixels (sheet, 0, pos);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0)
if (ms_excel_object_debug > 0)
printf ("%s + %d\n", col_name(pos), nths);
#endif
}
}
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0)
if (ms_excel_object_debug > 0)
printf ("Anchor position in pixels"
" left = %g, top = %g, right = %g, bottom = %g;\n",
pixels[0], pixels[1], pixels[2], pixels[3]);
......@@ -251,7 +251,7 @@ ms_parse_object_anchor (anchor_point anchor[4],
anchor[i].nths = MS_OLE_GET_GUINT16 (data + 4 * i + 2);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 1) {
if (ms_excel_object_debug > 1) {
int pos = anchor[i].pos;
printf ("%d/%d cell %s from ",
anchor[i].nths, (i & 1) ? 256 : 1024,
......@@ -335,7 +335,7 @@ ms_read_TXO (BiffQuery *q, ExcelWorkbook * wb)
}
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0) {
if (ms_excel_object_debug > 0) {
printf ("{ TextObject\n");
printf ("Text '%s'\n", text);
printf ("is %s, %s & %s;\n",
......@@ -350,7 +350,7 @@ static void
ms_obj_dump (guint8 const * const data, int const len, char const * const name)
{
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug < 2)
if (ms_excel_object_debug < 2)
return;
printf ("{ %s \n", name);
......@@ -388,7 +388,7 @@ ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet, MSObj *
guint8 *data;
gint32 data_len_left;
gboolean hit_end = FALSE;
gboolean next_biff_record_is_imdata = FALSE;
gboolean next_biff_record_maybe_imdata = FALSE;
g_return_val_if_fail (q, TRUE);
g_return_val_if_fail (q->ls_op == BIFF_OBJ, TRUE);
......@@ -439,15 +439,14 @@ ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet, MSObj *
pict_opt = MS_OLE_GET_GUINT16(data+4);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug >= 1) {
if (ms_excel_object_debug >= 1) {
printf ("{ /* PictOpt */\n");
printf ("value = %d;\n", pict_opt);
printf ("}; /* PictOpt */\n");
}
#endif
/* A value of 2 seems to indicate an IMDATA follows */
next_biff_record_is_imdata = (pict_opt == 2);
next_biff_record_maybe_imdata = TRUE;
break;
}
......@@ -500,7 +499,7 @@ ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet, MSObj *
guint16 const row = MS_OLE_GET_GUINT16(data+11);
guint16 const col = MS_OLE_GET_GUINT16(data+13) &0x3fff;
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0)
if (ms_excel_object_debug > 0)
printf ("Checkbox linked to : %s%d\n", col_name(col), row+1);
ms_obj_dump (data, len, "CheckBoxFmla");
#endif
......@@ -518,7 +517,7 @@ ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet, MSObj *
obj->id = MS_OLE_GET_GUINT16(data+6);
/* only print when debug is enabled */
if (ms_excel_read_debug == 0)
if (ms_excel_object_debug == 0)
break;
#ifndef NO_DEBUG_EXCEL
......@@ -548,20 +547,23 @@ ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet, MSObj *
/* The ftEnd record should have been the last */
if (data_len_left != 0) {
printf("OBJ : unexpected extra data (%d) at the end of the object;\n", data_len_left);
return TRUE;
}
printf("OBJ : unexpected extra data after Object End record;\n");
ms_ole_dump (data, data_len_left);
return TRUE;
}
g_return_val_if_fail (data_len_left == 0, TRUE);
if (next_biff_record_is_imdata) {
/* FIXME : Throw away the IMDATA that may follow.
* I am not sure when the IMDATA does follow, or how to display it,
* but very careful in case it is not there.
*/
if (next_biff_record_maybe_imdata) {
guint16 opcode;
/* Read the IMDATA. I am not sure that this record must follow
* a PictOpt. For now be very careful
*/
g_return_val_if_fail (ms_biff_query_peek_next (q, &opcode), TRUE);
g_return_val_if_fail (opcode == BIFF_IMDATA, TRUE);
g_return_val_if_fail (ms_biff_query_next (q), TRUE);
if (ms_biff_query_peek_next (q, &opcode) &&
opcode == BIFF_IMDATA) {
g_return_val_if_fail (ms_biff_query_next (q), TRUE);
}
}
return FALSE;
......@@ -607,12 +609,20 @@ ms_read_OBJ (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet)
obj->id = -1;
obj->anchor_set = FALSE;
#ifndef NO_DEBUG_EXCEL
if (ms_excel_object_debug > 0)
printf ("{ /* OBJ start */\n");
#endif
errors = (wb->ver >= eBiffV8)
? ms_obj_read_biff8_obj (q, wb, sheet, obj)
: ms_obj_read_pre_biff8_obj (q, wb, sheet, obj);
if (errors) {
g_free (obj);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_object_debug > 0)
printf ("}; /* OBJ error 1 */\n");
#endif
return NULL;
}
......@@ -668,14 +678,17 @@ ms_read_OBJ (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet)
printf ("EXCEL : unhandled excel object of type %s (0x%x) id = %d\n",
type_name, obj->excel_type, obj->id);
g_free(obj);
printf ("}; /* OBJ error 2 */\n");
return NULL;
}
obj->gnumeric_type = type;
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0)
if (ms_excel_object_debug > 0) {
printf ("Object (%d) is a '%s'\n", obj->id, type_name);
printf ("}; /* OBJ end */\n");
}
#endif
return obj;
......
......@@ -8,7 +8,7 @@
* Michael Meeks (michael@imaginator.com)
* Jody Goldberg (jgoldberg@home.com)
*
* (C) 1998, 1999 Michael Meeks, Jody Goldberg
* (C) 1998, 1999, 2000 Michael Meeks, Jody Goldberg
**/
#include "config.h"
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1998, 1999 Michael Meeks
* (C) 1998, 1999, 2000 Michael Meeks
**/
#include <stdio.h>
......
......@@ -4,7 +4,7 @@
* Author:
* Michael Meeks (michael@imaginator.com)
*
* (C) 1999 Michael Meeks
* (C) 1999, 2000 Michael Meeks
**/
#include "summary.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment