Commit b000e407 authored by Jody Goldberg's avatar Jody Goldberg

Switch to new merge on demand scheme. This seems a better approximation

of the desired behavior.  It may even be correct !
As a bonus it is much mor efficent.

Lots of memory leaks.  We need to test for NULL returns from
ms_escher_get_data, and honour the setting of needs_free.
parent 1b9b0435
1999-09-18 Jody Goldberg <jgoldberg@home.com>
* ms-escher.c : More radical changes to support just in time
merging. This seems to solve the last of the problems of which
records to merge and which not. Everything seems to add up.
1999-09-17 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (ms_excel_workbook_get_sheet) : Make extern.
1999-09-15 Frank Chiulli <fchiulli@home.com>
* plugins/excel/boot.c (excel_save): Add a call to ms_summary_write
......@@ -15,8 +25,9 @@
1999-09-17 Jody Goldberg <jgoldberg@home.com>
* ms-escher.c (ms_escher_read_ClientAnchor) : Yahoo! figured out
object placement !!
* ms-escher.c : Adjust const.
(ms_escher_read_ClientAnchor) : Yahoo! figured out object placement !!
(ms_escher_read_OPT) : Some cleanup of the property names.
1999-09-16 Michael Meeks <michael@nuclecu.unam.mx>
......
......@@ -858,7 +858,7 @@ static gboolean
BC_R(gelframe)(ExcelChartHandler const *handle,
ExcelChartState *s, BiffQuery *q)
{
ms_escher_hack_get_drawing (q, s->wb, NULL);
ms_escher_parse (q, s->wb, NULL);
return FALSE;
}
static gboolean
......
This diff is collapsed.
......@@ -9,8 +9,8 @@
**/
#include "ms-excel-read.h"
extern void ms_escher_hack_get_drawing (BiffQuery *q,
ExcelWorkbook *wb,
ExcelSheet *sheet);
extern void ms_escher_parse (BiffQuery *q,
ExcelWorkbook *wb,
ExcelSheet *sheet);
#endif /* GNUMERIC_MS_OFFICE_ESCHER_H */
......@@ -1781,7 +1781,7 @@ ms_excel_workbook_detach (ExcelWorkbook *wb, ExcelSheet *ans)
return FALSE;
}
static ExcelSheet *
ExcelSheet *
ms_excel_workbook_get_sheet (ExcelWorkbook *wb, guint idx)
{
if (idx < wb->excel_sheets->len)
......@@ -2424,7 +2424,7 @@ ms_excel_read_sheet (ExcelSheet *sheet, BiffQuery *q, ExcelWorkbook *wb)
break;
case BIFF_OBJ: /* See: ms-obj.c and S59DAD.HTM */
ms_obj_read_obj (q, wb);
ms_read_OBJ (q, wb);
break;
case BIFF_SELECTION:
......@@ -2434,7 +2434,7 @@ ms_excel_read_sheet (ExcelSheet *sheet, BiffQuery *q, ExcelWorkbook *wb)
case BIFF_MS_O_DRAWING:
case BIFF_MS_O_DRAWING_GROUP:
case BIFF_MS_O_DRAWING_SELECTION:
ms_escher_hack_get_drawing (q, wb, sheet);
ms_escher_parse (q, wb, sheet);
break;
case BIFF_NOTE: /* See: S59DAB.HTM */
......@@ -3204,7 +3204,7 @@ ms_excel_read_workbook (Workbook *workbook, MsOle *file)
break;
case BIFF_OBJ: /* See: ms-obj.c and S59DAD.HTM */
ms_obj_read_obj (q, wb);
ms_read_OBJ (q, wb);
break;
case BIFF_SCL :
......@@ -3213,7 +3213,7 @@ ms_excel_read_workbook (Workbook *workbook, MsOle *file)
case BIFF_MS_O_DRAWING:
case BIFF_MS_O_DRAWING_GROUP:
case BIFF_MS_O_DRAWING_SELECTION:
ms_escher_hack_get_drawing (q, wb, NULL);
ms_escher_parse (q, wb, NULL);
break;
case BIFF_ADDMENU :
......
......@@ -103,6 +103,7 @@ typedef struct _ExcelWorkbook
Workbook *gnum_wb;
} ExcelWorkbook;
extern ExcelSheet * ms_excel_workbook_get_sheet (ExcelWorkbook *wb, guint idx);
extern Sheet* biff_get_externsheet_name (ExcelWorkbook *wb, guint16 idx, gboolean get_first);
extern char* biff_get_text (guint8 const *ptr, guint32 length, guint32 *byte_length);
extern const char* biff_get_error_text (const guint8 err);
......
......@@ -70,7 +70,7 @@ object_type_names[] =
};
void
ms_obj_read_text_impl (BiffQuery *q, ExcelWorkbook * wb)
ms_read_TXO (BiffQuery *q, ExcelWorkbook * wb)
{
static char const * const orientations[] = {
"Left to right",
......@@ -102,6 +102,7 @@ ms_obj_read_text_impl (BiffQuery *q, ExcelWorkbook * wb)
g_return_if_fail (1 <= halign && halign <= 4);
g_return_if_fail (1 <= valign && valign <= 4);
#if 0
/* TODO : figure this out. There seem to be strings with 0 formats too.
* do they indicate empty strings ? */
if (num_formats < 2) {
......@@ -109,6 +110,7 @@ ms_obj_read_text_impl (BiffQuery *q, ExcelWorkbook * wb)
"This record has %d", num_formats);
return;
}
#endif
/* MS-Documentation error. The offset for the reserved 4 x 0 is 18 */
if (unicode_flag)
......@@ -143,13 +145,6 @@ ms_obj_read_text_impl (BiffQuery *q, ExcelWorkbook * wb)
printf ("}; /* TextObject */\n");
}
}
void
ms_obj_read_text (BiffQuery *q, ExcelWorkbook * wb, int const id)
{
/* next record must be a DRAWING, it will load the TXO records */
g_return_if_fail (ms_biff_query_next (q));
ms_escher_hack_get_drawing (q, wb, NULL);
}
static void
ms_obj_dump (guint8 const * const data, int const len, char const * const name)
......@@ -362,28 +357,15 @@ ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb)
g_return_if_fail (data_len_left == 0);
/* If this was a Chart then there should be a BOF next */
switch (obj_type)
{
case 0x05 :
if (obj_type == 0x05)
ms_excel_read_chart (q, wb, obj_id);
break;
case 0x02 : /* Text Box */
case 0x06 : /* Text Box */
case 0x07 : /* Button */
ms_obj_read_text (q, wb, obj_id);
break;
default:
break;
}
if (ms_excel_read_debug > 0)
printf ("\n\n");
}
void
ms_obj_read_obj (BiffQuery *q, ExcelWorkbook * wb)
ms_read_OBJ (BiffQuery *q, ExcelWorkbook * wb)
{
if (wb->ver >= eBiffV8)
ms_obj_read_biff8_obj (q, wb);
......
......@@ -10,8 +10,7 @@
#include "ms-excel-read.h"
void ms_obj_read_obj (BiffQuery *q, ExcelWorkbook * wb);
void ms_obj_read_text (BiffQuery *q, ExcelWorkbook * wb, int const id);
void ms_obj_read_text_impl (BiffQuery *q, ExcelWorkbook * wb);
void ms_read_OBJ (BiffQuery *q, ExcelWorkbook * wb);
void ms_read_TXO (BiffQuery *q, ExcelWorkbook * wb);
#endif /* GNUMERIC_MS_OBJ_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