Commit 0e25d62c authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

I'd forgotten that we were already collecting styles. Adding this

functionality was easy in that context.

bug 53180

2001-05-05  Jody Goldberg <jgoldberg@home.com>

	* ms-excel-write.c (pre_cell) : XL does not differentiate between
	  parse and display formats.  When exporting a cell with General that
	  has a parse format create a new XF with the parse format as the
	  display format.
parent ba8c408f
2001-05-05 Jody Goldberg <jgoldberg@home.com>
* ms-excel-write.c (pre_cell) : XL does not differentiate between
parse and display formats. When exporting a cell with General that
has a parse format create a new XF with the parse format as the
display format.
2001-04-30 Morten Welinder <terra@diku.dk> 2001-04-30 Morten Welinder <terra@diku.dk>
* ms-summary.c (sum_name_to_excel): Fix index count. Constify. * ms-summary.c (sum_name_to_excel): Fix index count. Constify.
......
...@@ -1574,6 +1574,8 @@ pre_cell (gconstpointer dummy, Cell *cell, ExcelSheet *sheet) ...@@ -1574,6 +1574,8 @@ pre_cell (gconstpointer dummy, Cell *cell, ExcelSheet *sheet)
{ {
ExcelCell *c; ExcelCell *c;
int col, row; int col, row;
MStyle *cell_style;
StyleFormat *fmt;
g_return_if_fail (cell != NULL); g_return_if_fail (cell != NULL);
g_return_if_fail (sheet != NULL); g_return_if_fail (sheet != NULL);
...@@ -1600,7 +1602,18 @@ pre_cell (gconstpointer dummy, Cell *cell, ExcelSheet *sheet) ...@@ -1600,7 +1602,18 @@ pre_cell (gconstpointer dummy, Cell *cell, ExcelSheet *sheet)
/* Save cell pointer */ /* Save cell pointer */
c = excel_cell_get (sheet, col, row); c = excel_cell_get (sheet, col, row);
c->gnum_cell = cell; c->gnum_cell = cell;
c->xf = put_mstyle (sheet->wb, cell_get_mstyle (cell));
/* For the general format XL assigns the parse format */
cell_style = cell_get_mstyle (cell);
if (cell->format != NULL &&
!style_format_is_general (cell->format) &&
style_format_is_general (mstyle_get_format (cell_style))) {
cell_style = mstyle_copy (cell_style);
mstyle_set_format (cell_style, cell->format);
c->xf = put_mstyle (sheet->wb, cell_style);
mstyle_ref (cell_style);
} else
c->xf = put_mstyle (sheet->wb, cell_style);
} }
/** /**
......
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