Commit 7ac894fe authored by Jody Goldberg's avatar Jody Goldberg

Fix some breakage in gnumeric-bonbobo.

This is not the RIGHT fix, but it is A fix.  When this is developed we
can solve it properly.
parent 28e0b6c6
2000-02-19 Jody Goldberg <jgoldberg@home.com>
* src/corba-workbook-factory.c (WorkbookFactory_read) : Create a tmp
corba context with which to report problems while reading a new
workbook. This is a temporary work around until corba_context is
implemented and we see what the requirements are.
* src/command-context-corba.c (command_context_corba_new) : longer
require a workbook.
* src/corba-workbook.c (workbook_corba_setup) : Support above change.
2000-02-19 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_extend) : Don't store the results
......
2000-02-19 Jody Goldberg <jgoldberg@home.com>
* src/corba-workbook-factory.c (WorkbookFactory_read) : Create a tmp
corba context with which to report problems while reading a new
workbook. This is a temporary work around until corba_context is
implemented and we see what the requirements are.
* src/command-context-corba.c (command_context_corba_new) : longer
require a workbook.
* src/corba-workbook.c (workbook_corba_setup) : Support above change.
2000-02-19 Jody Goldberg <jgoldberg@home.com>
* src/selection.c (sheet_selection_extend) : Don't store the results
......
2000-02-18 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (ms_excel_get_style_from_xf) : Hard code 'auto'
border colours to black for now. We are not guessing well.
2000-02-15 Jody Goldberg <jgoldberg@home.com>
* ms-obj.c (object_anchor_to_position) : Improve debug output.
......
......@@ -1226,7 +1226,11 @@ ms_excel_get_style_from_xf (ExcelSheet *sheet, guint16 xfidx)
int const color_index = xf->border_color[i];
/* Handle auto colours */
StyleColor *color = (color_index == 64 || color_index == 65 || color_index == 127)
#if 0
/* FIXME : This does not choose well, hard code to black for now */
? black_or_white_contrast (back_color)
#endif
? style_color_black ()
: ms_excel_palette_get (sheet->wb->palette,
color_index);
if (xf->border_type [i] != STYLE_BORDER_NONE) {
......@@ -2410,7 +2414,8 @@ ms_excel_read_row (BiffQuery *q, ExcelSheet *sheet)
guint16 const end_col = MS_OLE_GET_GUINT16(q->data+4) - 1;
guint16 const height = MS_OLE_GET_GUINT16(q->data+6);
guint16 const flags = MS_OLE_GET_GUINT16(q->data+12);
guint16 const xf = MS_OLE_GET_GUINT16(q->data+14) & 0xfff;
guint16 const flags2 = MS_OLE_GET_GUINT16(q->data+14);
guint16 const xf = flags2 & 0xfff;
/* If the bit is on it indicates that the row is of 'standard' height.
* However the remaining bits still include the size.
......@@ -2418,14 +2423,20 @@ ms_excel_read_row (BiffQuery *q, ExcelSheet *sheet)
gboolean const is_std_height = (height & 0x8000) != 0;
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 1)
if (ms_excel_read_debug > 1) {
printf ("Row %d height 0x%x;\n", row+1, height);
if (is_std_height)
puts ("Is Std Height");
if (flags2 & 0x1000)
puts ("Top thick");
if (flags2 & 0x2000)
puts ("Bottom thick");
}
#endif
/* TODO : Set put mechanism in place to increase the margins */
/* TODO : sync the approach used for the columns with the row.
* columns actually set the size even when it is the default.
* Why ?
/* TODO : Put mechanism in place to handle thick margins */
/* TODO : Columns actually set the size even when it is the default.
* Which approach is better ?
*/
/* TODO : We should store the default row style too.
* Which has precedence rows or cols ??
......
......@@ -57,14 +57,11 @@ ccc_init_class (GtkObjectClass *object_class)
GNUMERIC_MAKE_TYPE(command_context_corba, "CommandContextCorba", CommandContextCorba, ccc_init_class, NULL, PARENT_TYPE)
CommandContext *
command_context_corba_new (Workbook *wb)
command_context_corba_new ()
{
CommandContextCorba *ccg;
ccg = gtk_type_new (command_context_corba_get_type ());
ccg->wb = wb;
return COMMAND_CONTEXT (ccg);
}
......@@ -12,7 +12,6 @@
typedef struct {
CommandContext parent;
Workbook *wb;
} CommandContextCorba;
typedef struct {
......@@ -20,7 +19,7 @@ typedef struct {
} CommandContextCorbaClass;
GtkType command_context_corba_get_type (void);
CommandContext *command_context_corba_new (Workbook *wb);
CommandContext *command_context_corba_new (void);
#endif /* GNUMERIC_COMMAND_CONTEXT_CORBA_H */
......@@ -37,10 +37,11 @@ static POA_GNOME_Gnumeric_WorkbookFactory__vepv gnumeric_workbook_factory_vepv;
static GNOME_Gnumeric_Workbook
WorkbookFactory_read (PortableServer_Servant servant, const CORBA_char * filename, CORBA_Environment * ev)
{
Workbook *workbook = workbook_read (
command_context_corba (
), filename);
CommandContext *tmp_context = command_context_corba_new ();
Workbook *workbook = workbook_read (tmp_context, filename);
gtk_widget_show (workbook->toplevel);
gtk_object_unref (GTK_OBJECT (tmp_context));
if (workbook)
return CORBA_Object_duplicate (workbook->corba_server, ev);
......
......@@ -231,7 +231,7 @@ workbook_corba_setup (Workbook *workbook)
CORBA_free (objid);
workbook->corba_server = PortableServer_POA_servant_to_reference (gnumeric_poa, ws, &ev);
workbook->priv->corba_context = command_context_corba_new (workbook);
workbook->priv->corba_context = command_context_corba_new ();
CORBA_exception_free (&ev);
}
......
......@@ -57,14 +57,11 @@ ccc_init_class (GtkObjectClass *object_class)
GNUMERIC_MAKE_TYPE(command_context_corba, "CommandContextCorba", CommandContextCorba, ccc_init_class, NULL, PARENT_TYPE)
CommandContext *
command_context_corba_new (Workbook *wb)
command_context_corba_new ()
{
CommandContextCorba *ccg;
ccg = gtk_type_new (command_context_corba_get_type ());
ccg->wb = wb;
return COMMAND_CONTEXT (ccg);
}
......@@ -12,7 +12,6 @@
typedef struct {
CommandContext parent;
Workbook *wb;
} CommandContextCorba;
typedef struct {
......@@ -20,7 +19,7 @@ typedef struct {
} CommandContextCorbaClass;
GtkType command_context_corba_get_type (void);
CommandContext *command_context_corba_new (Workbook *wb);
CommandContext *command_context_corba_new (void);
#endif /* GNUMERIC_COMMAND_CONTEXT_CORBA_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