Commit ca54dab3 authored by Michael Meeks's avatar Michael Meeks

More excel write work,

Names compile fix,
Todo list grows to monster proportions.
parent 1c1a89dd
1999-07-08 Michael Meeks <michael@edenproject.org>
* src/eval.c (add_tree_deps): Change exprt to expr_tree.
* src/Gnumeric.idl: Removed : GNOME::Unknown from Workbook so
people can compile for now.
......
1999-07-08 Michael Meeks <michael@edenproject.org>
* src/eval.c (add_tree_deps): Change exprt to expr_tree.
* src/Gnumeric.idl: Removed : GNOME::Unknown from Workbook so
people can compile for now.
......
1999-07-08 Michael Meeks <michael@edenproject.org>
* src/eval.c (add_tree_deps): Change exprt to expr_tree.
* src/Gnumeric.idl: Removed : GNOME::Unknown from Workbook so
people can compile for now.
......
1999-07-08 Michael Meeks <michael@edenproject.org>
* src/eval.c (add_tree_deps): Change exprt to expr_tree.
* src/Gnumeric.idl: Removed : GNOME::Unknown from Workbook so
people can compile for now.
......
1999-07-08 Michael Meeks <michael@edenproject.org>
* ms-excel-read.h (_ExcelWorkbook): Removed internal_names and
comments.
* ms-excel-write.c (write_bits): Merged write_constants
into this + add 'wb' parameter.
(write_bits): Add TABID, DSF records.
Add PROT4REV, PROT4REVPASS.
(write_fonts): Changed put_text from eBiffV7, AS_PER_VER.
* ms-excel-read.c (ms_excel_read_workbook): Update DFS -> DSF
* biff-types.h (BIFF_DSF): Mod. from DFS.
1999-07-08 Michael Meeks <michael@edenproject.org>
* ms-formula-read.c (ms_excel_parse_formula): Add magic 0x17
......
......@@ -30,8 +30,4 @@ Or to put / get files to / from an OLE file use:
or
./ole somefile.xls get <stream name> <filename>
1999-04-13 Michael Meeks <michael@imaginator.com>
TODO:
sort out padding, do we need it ? where is the bug ?
1999-07-07 Michael Meeks <michael@imaginator.com>
......@@ -2,21 +2,26 @@ Michael
* Change all structure names ToCapitalisedLikeThisNames
* In ms-formula-write.c
* Booleans
* test IF and CHOOSE: need 'optimising'
* test if IF and CHOOSE: need 'optimising'
* Sort out silly things with massive sized sheets
* Deeper DBCELL records
* Truncated Index records
* Intelligent blank cell removal on insertion.
* Fix balls-up in ms_excel_externname Re: 'unicode' !
* New style support so we can do
* Colours
* Fonts etc.
* Convert ms-formula-read: PARSE_LIST to ParseStack.
* Sort out biff padding =>
* Sort out better versioning scheme & helper macros.
* Rationalise Missing Argument stuff ... a new value ?
* Remove silly name record in writing ( after debugging is done )
* Fix inter-sheet dependencies ... well broken.
* Lookup Harvest and see if we can help with doc summary info for
searches.
* Implement document summary information, S59FD3.HTM ( wrong ).
* Use the document summary information
* Use same XML as Office for elegance (?)
* Get font / layout sizes correct for new Print-stuff.
Jody
*
......@@ -45,5 +50,7 @@ Jody
Integrate into libvfs.
Update to better understanding of file, see wine.
Add Bonobo::Storage interface...
Split to a separate library.
......@@ -165,7 +165,7 @@
#define BIFF_SXDBEX 0x122 /* ONLY 1 */
#define BIFF_TABID 0x13d /* ONLY 1 */
#define BIFF_USESELFS 0x160 /* ONLY 1 */
#define BIFF_DFS 0x161 /* ONLY 1 */
#define BIFF_DSF 0x161 /* ONLY 1 */
#define BIFF_XL5MODIFY 0x162 /* ONLY 1 */
#define BIFF_FILESHARING2 0x1a5
#define BIFF_USERDBVIEW 0x1a9 /* ONLY 1 */
......
......@@ -2561,7 +2561,7 @@ ms_excel_read_workbook (MsOle *file)
if (0x1 == q->ms_op) {
switch (q->opcode)
{
case BIFF_DFS :
case BIFF_DSF :
printf ("Double Stream File : %s\n",
(BIFF_GET_GUINT16(q->data) == 1)
? "Yes" : "No");
......
......@@ -87,8 +87,7 @@ typedef struct _ExcelWorkbook
GPtrArray *XF_style_records;
GHashTable *font_data;
GHashTable *format_data;
GPtrArray *name_data; /* Seems to be for external names */
GPtrArray *internal_names; /* For internal names */
GPtrArray *name_data;
int read_drawing_group;
GPtrArray *excel_sheets;
BiffExternSheetData *extern_sheets;
......
......@@ -229,36 +229,6 @@ write_magic_interface (BiffPut *bp, eBiff_version ver)
}
}
static void
write_constants (BiffPut *bp, eBiff_version ver)
{
guint8 *data;
/* See: S59E1A.HTM */
ms_biff_put_var_next (bp, BIFF_WRITEACCESS);
/* biff_put_text (bp, "the free software foundation ", ver, TRUE); */
biff_put_text (bp, "Michael Meeks", ver, TRUE, AS_PER_VER); /* For testing */
ms_biff_put_var_write (bp, " "
" "
" "
" "
" "
" ", 16*6+2);
ms_biff_put_commit (bp);
/* See: S59D66.HTM */
data = ms_biff_put_len_next (bp, BIFF_CODEPAGE, 2);
BIFF_SET_GUINT16 (data, 0x04e4); /* ANSI */
ms_biff_put_commit (bp);
/* See: S59D8A.HTM */
if (ver >= eBiffV7) {
data = ms_biff_put_len_next (bp, BIFF_FNGROUPCOUNT, 2);
BIFF_SET_GUINT16 (data, 0x0e);
ms_biff_put_commit (bp);
}
}
static void
write_externsheets (BiffPut *bp, ExcelWorkbook *wb, ExcelSheet *ignore)
{
......@@ -317,10 +287,46 @@ write_window1 (BiffPut *bp, eBiff_version ver)
}
static void
write_bits (BiffPut *bp, eBiff_version ver)
write_bits (BiffPut *bp, ExcelWorkbook *wb, eBiff_version ver)
{
guint8 *data;
/* See: S59E1A.HTM */
ms_biff_put_var_next (bp, BIFF_WRITEACCESS);
/* biff_put_text (bp, "the free software foundation ", ver, TRUE); */
biff_put_text (bp, "Michael Meeks", ver, TRUE, AS_PER_VER); /* For testing */
ms_biff_put_var_write (bp, " "
" "
" "
" "
" "
" ", 16*6+2);
ms_biff_put_commit (bp);
/* See: S59D66.HTM */
data = ms_biff_put_len_next (bp, BIFF_CODEPAGE, 2);
BIFF_SET_GUINT16 (data, 0x04e4); /* ANSI */
ms_biff_put_commit (bp);
if (ver >= eBiffV8) { /* See S59D78.HTM */
int lp, len;
data = ms_biff_put_len_next (bp, BIFF_DSF, 2);
BIFF_SET_GUINT16 (data, 0x0);
ms_biff_put_commit (bp);
/* See: S59E09.HTM */
len = wb->sheets->len;
data = ms_biff_put_len_next (bp, BIFF_TABID, len);
for (lp = 0; lp < len; lp++) /* FIXME: ? */
BIFF_SET_GUINT16 (data + lp*2, lp);
ms_biff_put_commit (bp);
}
/* See: S59D8A.HTM */
data = ms_biff_put_len_next (bp, BIFF_FNGROUPCOUNT, 2);
BIFF_SET_GUINT16 (data, 0x0e);
ms_biff_put_commit (bp);
/* See: S59E19.HTM */
data = ms_biff_put_len_next (bp, BIFF_WINDOWPROTECT, 2);
BIFF_SET_GUINT16 (data, 0x0);
......@@ -335,6 +341,18 @@ write_bits (BiffPut *bp, eBiff_version ver)
data = ms_biff_put_len_next (bp, BIFF_PASSWORD, 2);
BIFF_SET_GUINT16 (data, 0x0);
ms_biff_put_commit (bp);
if (ver >= eBiffV8) {
/* See: S59DD2.HTM */
data = ms_biff_put_len_next (bp, BIFF_PROT4REV, 2);
BIFF_SET_GUINT16 (data, 0x0);
ms_biff_put_commit (bp);
/* See: S59DD3.HTM */
data = ms_biff_put_len_next (bp, BIFF_PROT4REVPASS, 2);
BIFF_SET_GUINT16 (data, 0x0);
ms_biff_put_commit (bp);
}
write_window1 (bp, ver);
......@@ -539,7 +557,7 @@ write_fonts (BiffPut *bp, ExcelWorkbook *wb)
BIFF_SET_GUINT8 (data +13, 0);
ms_biff_put_var_write (bp, data, 14);
biff_put_text (bp, "Arial", eBiffV7, TRUE, AS_PER_VER);
biff_put_text (bp, "Arial", wb->ver, TRUE, EIGHT_BIT);
ms_biff_put_commit (bp);
}
......@@ -1296,9 +1314,8 @@ write_workbook (BiffPut *bp, Workbook *gwb, eBiff_version ver)
wb->streamPos = biff_bof_write (bp, ver, eBiffTWorkbook);
write_magic_interface (bp, ver);
write_constants (bp, ver);
/* write_externsheets (bp, wb, NULL); */
write_bits (bp, ver);
write_bits (bp, wb, ver);
wb->fonts = write_fonts (bp, wb);
wb->formats = write_formats (bp, wb);
......
......@@ -61,7 +61,12 @@ extern int ms_excel_write_get_externsheet_idx (ExcelWorkbook *wb,
Sheet *gnum_sheeta,
Sheet *gnum_sheetb);
typedef enum { AS_PER_VER, SIXTEEN_BIT, EIGHT_BIT } PutType;
typedef enum {
AS_PER_VER, /* Biff7: byte length, UTF8, Biff8: word length, unicode */
SIXTEEN_BIT, /* word length, Biff7: UTF8, Biff8: unicode */
EIGHT_BIT /* byte length, Biff7: UTF8, Biff8: unicode */
} PutType;
extern int
biff_put_text (BiffPut *bp, char *txt, eBiff_version ver,
gboolean write_len, PutType how);
......
......@@ -242,7 +242,7 @@ add_tree_deps (Cell *cell, ExprTree *tree)
if (tree->u.name->builtin) {
/* FIXME: insufficiently flexible dependancy code (?) */
} else
add_tree_deps (cell, tree->u.name->t.exprt);
add_tree_deps (cell, tree->u.name->t.expr_tree);
return;
case OPER_ARRAY:
......
......@@ -242,7 +242,7 @@ add_tree_deps (Cell *cell, ExprTree *tree)
if (tree->u.name->builtin) {
/* FIXME: insufficiently flexible dependancy code (?) */
} else
add_tree_deps (cell, tree->u.name->t.exprt);
add_tree_deps (cell, tree->u.name->t.expr_tree);
return;
case OPER_ARRAY:
......
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