Commit e3402379 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Minor patch so that objects begin with a non zero size. This needs to be


2000-05-18  Jody Goldberg <jgoldberg@home.com>

	* src/sheet-object.c (sheet_button_press) : Minor patch so that
	  objects begin with a non zero size.  This needs to be reworked into
	  a more general technique so that a 0 sized object is not possible in
	  instances when that should be disabled.
parent f2687336
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object.c (sheet_button_press) : Minor patch so that
objects begin with a non zero size. This needs to be reworked into
a more general technique so that a 0 sized object is not possible in
instances when that should be disabled.
* src/print-cell.c (print_cell) : Correct double negative that was
breaking printing for cells with multiple lines that were bottom
or center aligned.
......
2000-05-18 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (ms_excel_read_mergecells) : Produce a warning.
2000-05-11 Michael Meeks <michael@helixcode.com>
* boot.c (excel_load): add basic hooks.
......
......@@ -3034,6 +3034,8 @@ ms_excel_read_guts (BiffQuery *q, ExcelSheet *sheet)
static void
ms_excel_read_mergecells (BiffQuery *q, ExcelSheet *sheet)
{
static gboolean need_warning = TRUE;
guint16 const num_merged = MS_OLE_GET_GUINT16(q->data);
guint8 const *ptr = q->data + 2;
int i;
......@@ -3043,6 +3045,11 @@ ms_excel_read_mergecells (BiffQuery *q, ExcelSheet *sheet)
*/
g_return_if_fail (q->length == 2+8*num_merged);
if (need_warning) {
need_warning = FALSE;
g_warning ("EXCEL : Merged Cells are not supported yet.");
}
for (i = 0 ; i < num_merged ; ++i, ptr += 8) {
Range r;
r.start.row = MS_OLE_GET_GUINT16(ptr);
......@@ -3051,7 +3058,6 @@ ms_excel_read_mergecells (BiffQuery *q, ExcelSheet *sheet)
r.end.col = MS_OLE_GET_GUINT16(ptr+6);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 0) {
printf ("EXCEL Unimplemented merge-cells : ");
range_dump (&r);
}
}
......
......@@ -480,11 +480,6 @@ create_object (Sheet *sheet, gdouble to_x, gdouble to_y)
case SHEET_MODE_CREATE_GRAPHIC:
#ifdef ENABLE_BONOBO
/* Bug 9984 : do not start objects with size 0,0 */
if (x1 == x2)
x2 += 50.;
if (y1 == y2)
y2 += 50.;
g_warning ("Ugly API name follows, fix it");
o = sheet_object_container_new_bonobo (
sheet, x1, y1, x2, y2, sheet->mode_data);
......@@ -613,6 +608,7 @@ static int
sheet_button_press (GnumericSheet *gsheet, GdkEventButton *event, Sheet *sheet)
{
ObjectCoords *oc;
double x1, y1;
if (sheet->current_object) {
sheet_object_stop_editing (sheet->current_object);
......@@ -624,11 +620,13 @@ sheet_button_press (GnumericSheet *gsheet, GdkEventButton *event, Sheet *sheet)
oc = g_new (ObjectCoords, 1);
gnome_canvas_window_to_world (GNOME_CANVAS (gsheet), event->x, event->y, &oc->x, &oc->y);
gnome_canvas_window_to_world (GNOME_CANVAS (gsheet), event->x, event->y, &x1, &y1);
/* Bug 9984 : do not start objects with size 0,0 */
oc->x = MAX(x1 - 50., 0.);
oc->y = MAX(y1 - 50., 0.);
sheet->coords = g_list_append (sheet->coords, oc);
sheet->current_object = create_object (sheet, oc->x, oc->y);
sheet->current_object = create_object (sheet, x1, y1);
/*
* If something fails during object creation,
......
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