Commit fc6e11fe authored by Michael Meeks's avatar Michael Meeks

Fiddled with object creation,

Added a load of new cursors for object moving / sizing,
Fixed sheet object sizing,
Add sheet object popup menus.
parent cfe75406
1999-09-21 Michael Meeks <michael@nuclecu.unam.mx>
* src/sheet-object-container.c (make_container_item): Add widget_handle.
(sheet_object_container_destroy): clean.
* src/sheet-object-widget.c (sheet_object_widget_realize): add widget
handling hook.
* src/sheet-object.c (sheet_object_event): renamed to canvas_event.
(control_point_handle_event): use gdouble for x,y & remove duff w2w &
dx*zoom code.
* src/sheet-object.h: add various signals + a type.
* src/sheet-object-widget.c (sheet_object_widget_construct): set press.
* src/sheet-object.c (sheet_object_event, sheet_object_make_current):
remove redundant 'Sheet' argument.
(control_point_handle_event): Add make_current to button press.
(sheet_object_start_editing): clean + setup cursor data.
(control_point_handle_event): Use sizing cursors.
(sheet_object_event): Add 'press' cursor.
(sheet_object_widget_event, sheet_object_widget_handle): handlers to pass
events around.
* src/sheet-object-container.c (user_activation_request_cb): update
make_current.
* src/cursors.h: Add new cursors.
* src/cursors.c: ditto.
1999-09-21 Morten Welinder <terra@diku.dk>
* src/functions/fn-stat.c (gnumeric_logest): Add some meat.
......
1999-09-21 Michael Meeks <michael@nuclecu.unam.mx>
* src/sheet-object-container.c (make_container_item): Add widget_handle.
(sheet_object_container_destroy): clean.
* src/sheet-object-widget.c (sheet_object_widget_realize): add widget
handling hook.
* src/sheet-object.c (sheet_object_event): renamed to canvas_event.
(control_point_handle_event): use gdouble for x,y & remove duff w2w &
dx*zoom code.
* src/sheet-object.h: add various signals + a type.
* src/sheet-object-widget.c (sheet_object_widget_construct): set press.
* src/sheet-object.c (sheet_object_event, sheet_object_make_current):
remove redundant 'Sheet' argument.
(control_point_handle_event): Add make_current to button press.
(sheet_object_start_editing): clean + setup cursor data.
(control_point_handle_event): Use sizing cursors.
(sheet_object_event): Add 'press' cursor.
(sheet_object_widget_event, sheet_object_widget_handle): handlers to pass
events around.
* src/sheet-object-container.c (user_activation_request_cb): update
make_current.
* src/cursors.h: Add new cursors.
* src/cursors.c: ditto.
1999-09-21 Morten Welinder <terra@diku.dk>
* src/functions/fn-stat.c (gnumeric_logest): Add some meat.
......
1999-09-21 Michael Meeks <michael@nuclecu.unam.mx>
* ms-obj.c (ms_parse_object_anchor): remove zoom.
(ms_obj_realize): Add zoom here.
* ms-excel-read.c (ms_excel_read_sheet): queue objects for later.
(ms_excel_read_workbook): Realise sheet objects after read.
(ms_excel_sheet_new): NULL obj queue ptr.
* ms-obj.c: Add lots of missing cross references.
(ms_excel_sheet_realize_objs): Implement.
1999-09-21 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (ms_excel_read_workbook) : Prefer 'workbook' to
......
......@@ -385,7 +385,7 @@ ms_escher_read_Blip (MSEscherState * state, MSEscherHeader * h)
{
int const header = 17 + primary_uid_size + common_header_len;
gboolean needs_free;
guint8 const * data =
guint8 const *data =
ms_escher_get_data (state, h->offset, h->len,
header, &needs_free);
const char *repoid = NULL;
......
......@@ -1659,7 +1659,8 @@ ms_excel_sheet_new (ExcelWorkbook *wb, const char *name)
ExcelSheet *ans = (ExcelSheet *) g_malloc (sizeof (ExcelSheet));
ans->gnum_sheet = sheet_new (wb->gnum_wb, name);
ans->wb = wb;
ans->wb = wb;
ans->obj_queue = NULL;
ans->shared_formulae =
g_hash_table_new ((GHashFunc)biff_shared_formula_hash,
......@@ -2430,8 +2431,8 @@ ms_excel_read_sheet (ExcelSheet *sheet, BiffQuery *q, ExcelWorkbook *wb)
break;
case BIFF_OBJ: /* See: ms-obj.c and S59DAD.HTM */
ms_obj_realize(ms_read_OBJ (q, wb, sheet->gnum_sheet),
wb, sheet);
sheet->obj_queue = g_list_append (sheet->obj_queue,
ms_read_OBJ (q, wb, sheet->gnum_sheet));
break;
case BIFF_SELECTION:
......@@ -2895,7 +2896,8 @@ ms_excel_read_workbook (Workbook *workbook, MsOle *file)
{
ExcelSheet *sheet = ms_excel_workbook_get_sheet (wb, current_sheet);
ms_excel_sheet_set_version (sheet, ver->version);
ms_excel_read_sheet (sheet, q, wb);
ms_excel_read_sheet (sheet, q, wb);
ms_excel_sheet_realize_objs (sheet);
current_sheet++;
}
} else if (ver->type == eBiffTChart)
......
......@@ -16,6 +16,7 @@ typedef struct _ExcelSheet
struct _ExcelWorkbook *wb;
eBiff_version ver;
GHashTable *shared_formulae;
GList *obj_queue;
} ExcelSheet;
typedef struct _BiffBoundsheetData
......
......@@ -2,8 +2,8 @@
* ms-obj.c: MS Excel Object support for Gnumeric
*
* Author:
* Michael Meeks (michael@imaginator.com)
* Jody Goldberg (jgoldberg@home.com)
* Michael Meeks (mmeeks@gnu.org)
**/
#include "ms-obj.h"
......@@ -38,14 +38,20 @@ extern int ms_excel_read_debug;
* NOTE : The MSObj is freed by this routine
*/
gboolean
ms_obj_realize(MSObj * obj, ExcelWorkbook *wb, ExcelSheet * sheet)
ms_obj_realize (MSObj *obj, ExcelWorkbook *wb, ExcelSheet *sheet)
{
int * anchor = NULL;
int *anchor = NULL, i;
float zoom;
if (obj == NULL)
return TRUE;
anchor = obj->anchor;
zoom = sheet->gnum_sheet->last_zoom_factor_used;
for (i = 0; i < 4; i++)
anchor[i] *= zoom;
switch (obj->gnumeric_type) {
case SHEET_OBJECT_BUTTON :
sheet_object_create_button (sheet->gnum_sheet,
......@@ -99,45 +105,59 @@ ms_obj_realize(MSObj * obj, ExcelWorkbook *wb, ExcelSheet * sheet)
return FALSE;
}
/**
* ms_excel_sheet_realize_objs:
* @sheet:
*
* This realizes the objects after the zoom factor has been
* loaded.
**/
void
ms_excel_sheet_realize_objs (ExcelSheet *sheet)
{
GList *l;
for (l = sheet->obj_queue; l; l = g_list_next (l))
ms_obj_realize (l->data, sheet->wb, sheet);
g_list_free (sheet->obj_queue);
sheet->obj_queue = NULL;
}
gboolean
ms_parse_object_anchor (int anchor[4],
Sheet const * sheet, guint8 const * data)
{
/* Words 0, 4, 8, 12 : The row/col of the corners */
/* Words 2, 6, 10, 14 : distance from cell edge measured in 1/1024 of an inch */
float zoom;
int i;
/* FIXME : How to handle objects not in sheets ?? */
g_return_val_if_fail (sheet != NULL, TRUE);
zoom = sheet->last_zoom_factor_used;
for (i = 0; i < 4; ++i) {
guint16 const pos = MS_OLE_GET_GUINT16(data + 4*i);
guint16 const pos = MS_OLE_GET_GUINT16 (data + 4 * i);
/* FIXME : we are slightly off. Tweak the pixels/inch ratio
* to make this come out on my screen for pic.xls.
* 66 pixels/inch seems correct ???
*/
float margin = (MS_OLE_GET_GUINT16(data + 4*i + 2) / (1024./66.));
float margin = (MS_OLE_GET_GUINT16 (data + 4 * i + 2) / (1024. / 66.));
float const tmp = (i&1) /* odds are rows */
? sheet_row_get_unit_distance (sheet, 0, pos)
: sheet_col_get_unit_distance (sheet, 0, pos);
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 1) {
printf ("zoom = %f;\n", zoom);
printf ("%f units (%d pixels) from ",
margin, (int)(zoom * margin));
if (i&1)
printf ("row %d;\n", pos+1);
margin, (int)(margin));
if (i & 1)
printf ("row %d;\n", pos + 1);
else
printf ("col %s (%d);\n", col_name(pos), pos);
}
#endif
margin += tmp;
margin *= zoom;
anchor[i] = (int)margin;
}
......@@ -151,6 +171,9 @@ ms_parse_object_anchor (int anchor[4],
return FALSE;
}
/*
* See: S59EOE.HTM
*/
void
ms_read_TXO (BiffQuery *q, ExcelWorkbook * wb)
{
......@@ -195,11 +218,9 @@ ms_read_TXO (BiffQuery *q, ExcelWorkbook * wb)
#endif
/* MS-Documentation error. The offset for the reserved 4 x 0 is 18 */
if (unicode_flag)
{
if (unicode_flag) {
static gboolean first = TRUE;
if (first)
{
if (first) {
first = FALSE;
g_warning ("EXCEL : Unicode text is unsupported");
}
......@@ -213,13 +234,11 @@ ms_read_TXO (BiffQuery *q, ExcelWorkbook * wb)
text[text_len] = '\0';
/* FIXME : Should I worry about padding between the records ? */
for (i = 0; i < num_formats ; ++i)
{
for (i = 0; i < num_formats ; ++i) {
/* TODO TODO finish */
}
if (ms_excel_read_debug > 0)
{
if (ms_excel_read_debug > 0) {
printf ("{ TextObject\n");
printf ("Text '%s'\n", text);
printf ("is %s, %s & %s;\n",
......@@ -239,6 +258,10 @@ ms_obj_dump (guint8 const * const data, int const len, char const * const name)
printf ("}; /* %s */\n", name);
}
/*
* See: S59DAD.HTM
*/
static gboolean
ms_obj_read_pre_biff8_obj (BiffQuery *q, ExcelWorkbook * wb,
Sheet * sheet, MSObj * obj)
......@@ -249,12 +272,15 @@ ms_obj_read_pre_biff8_obj (BiffQuery *q, ExcelWorkbook * wb,
guint32 const numObjects = MS_OLE_GET_GUINT16(q->data);
guint16 const flags = MS_OLE_GET_GUINT16(q->data+8);
#endif
obj->excel_type = MS_OLE_GET_GUINT16(q->data+4);
obj->id = MS_OLE_GET_GUINT32(q->data+6);
obj->excel_type = MS_OLE_GET_GUINT16(q->data + 4);
obj->id = MS_OLE_GET_GUINT32(q->data + 6);
return ms_parse_object_anchor (obj->anchor, sheet, q->data+10);
}
/*
* See: S59DAD.HTM
*/
static gboolean
ms_obj_read_biff8_obj (BiffQuery *q, ExcelWorkbook * wb, Sheet * sheet, MSObj * obj)
{
......
......@@ -43,6 +43,8 @@ gboolean ms_parse_object_anchor (int pos[4],
gboolean ms_obj_realize(MSObj * obj,
ExcelWorkbook *wb, ExcelSheet * sheet);
void ms_excel_sheet_realize_objs (ExcelSheet *sheet);
MSObj * ms_read_OBJ (BiffQuery *q,
ExcelWorkbook * wb, Sheet * sheet);
......
......@@ -10,11 +10,16 @@
GnumericCursorDef gnumeric_cursors [] = {
{ NULL, 17, 17, cursor_cross_xpm },
{ NULL, GDK_INTERNAL_CURSOR, GDK_CROSSHAIR, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_ARROW, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_FLEUR, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_CROSSHAIR, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_ARROW, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_FLEUR, NULL },
{ NULL, 24, 24, cursor_zoom_in_xpm },
{ NULL, 24, 24, cursor_zoom_out_xpm },
{ NULL, GDK_INTERNAL_CURSOR, GDK_SB_H_DOUBLE_ARROW, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_SB_V_DOUBLE_ARROW, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_SIZING, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_SIZING, NULL },
{ NULL, GDK_INTERNAL_CURSOR, GDK_HAND2, NULL },
{ NULL, 0, 0, NULL }
};
......
......@@ -13,6 +13,11 @@ typedef struct {
#define GNUMERIC_CURSOR_MOVE 3
#define GNUMERIC_CURSOR_ZOOM_IN 4
#define GNUMERIC_CURSOR_ZOOM_OUT 5
#define GNUMERIC_CURSOR_SIZE_X 6
#define GNUMERIC_CURSOR_SIZE_Y 7
#define GNUMERIC_CURSOR_SIZE_TL 8
#define GNUMERIC_CURSOR_SIZE_TR 9
#define GNUMERIC_CURSOR_PRESS 10
extern GnumericCursorDef gnumeric_cursors [];
......
......@@ -22,3 +22,4 @@
#include "pixmaps/preview.xpm"
#endif /* GNUMERIC_PIXMAPS_H */
......@@ -30,14 +30,17 @@ static void
sheet_object_container_destroy (GtkObject *object)
{
SheetObjectContainer *soc = SHEET_OBJECT_CONTAINER (object);
g_free (soc->repoid);
if (soc->repoid)
g_free (soc->repoid);
soc->repoid = NULL;
if (soc->client_site)
gnome_object_destroy (GNOME_OBJECT (soc->client_site));
soc->client_site = NULL;
/* Call parent's destroy method */
GTK_OBJECT_CLASS(sheet_object_container_parent_class)->destroy (object);
GTK_OBJECT_CLASS (sheet_object_container_parent_class)->destroy (object);
}
static GnomeCanvasItem *
......@@ -57,8 +60,9 @@ make_container_item (SheetObject *so, SheetView *sheet_view, GtkWidget *w)
"height", y2 - y1,
"size_pixels", FALSE,
NULL);
sheet_object_widget_handle (so, w, item);
gtk_widget_show (w);
return item;
}
......@@ -67,7 +71,7 @@ sheet_object_container_destroy_views (SheetObject *so)
{
GList *l;
for (l = so->realized_list; l; l = l->next){
for (l = so->realized_list; l; l = l->next) {
GnomeCanvasItem *item = l->data;
gtk_object_destroy (GTK_OBJECT (item));
......@@ -90,7 +94,7 @@ user_activation_request_cb (GnomeViewFrame *view_frame, SheetObject *so)
}
gnome_view_frame_view_activate (view_frame);
sheet_object_make_current (sheet, so);
sheet_object_make_current (so);
return FALSE;
}
......@@ -228,9 +232,9 @@ sheet_object_container_land (SheetObject *so, const gchar *fname,
file = get_file_name ();
else
file = g_strdup (fname);
if (file){
if (file)
GNOME_PersistFile_load (ret, file, &ev);
}
GNOME_Unknown_unref ((GNOME_Unknown) ret, &ev);
CORBA_Object_release (ret, &ev);
g_free (file);
......@@ -252,7 +256,7 @@ sheet_object_container_land (SheetObject *so, const gchar *fname,
GnomeStream *stream;
stream = gnome_stream_fs_open (file, GNOME_Storage_READ);
if (stream){
if (stream) {
GNOME_PersistStream_load (
ret,
(GNOME_Stream) gnome_object_corba_objref (
......
......@@ -13,6 +13,7 @@
#include "gnumeric.h"
#include "gnumeric-util.h"
#include "gnumeric-sheet.h"
#include "cursors.h"
#include "sheet-object-widget.h"
static SheetObject *sheet_object_widget_parent_class;
......@@ -38,6 +39,9 @@ sheet_object_widget_realize (SheetObject *so, SheetView *sheet_view)
"height", y2 - y1,
"size_pixels", FALSE,
NULL);
sheet_object_widget_handle (so, view_widget, item);
return item;
}
......@@ -119,6 +123,7 @@ sheet_object_widget_construct (SheetObjectWidget *sow,
so = SHEET_OBJECT (sow);
sheet_object_construct (so, sheet);
so->type = SHEET_OBJECT_ACTION_CAN_PRESS;
sheet_object_set_bounds (so, x1, y1, x2, y2);
sow->realize = realize;
......
......@@ -31,6 +31,8 @@ static GtkObjectClass *sheet_object_parent_class;
static void sheet_finish_object_creation (Sheet *sheet, SheetObject *so);
static void sheet_object_start_editing (SheetObject *so);
static void sheet_object_stop_editing (SheetObject *so);
static void sheet_object_start_popup (SheetObject *so, GtkMenu *menu);
static void sheet_object_end_popup (SheetObject *so, GtkMenu *menu);
typedef struct {
gdouble x, y;
......@@ -100,6 +102,8 @@ sheet_object_class_init (GtkObjectClass *object_class)
object_class->destroy = sheet_object_destroy;
sheet_object_class->update_bounds = sheet_object_update_bounds;
sheet_object_class->start_popup = sheet_object_start_popup;
sheet_object_class->end_popup = sheet_object_end_popup;
}
GtkType
......@@ -133,10 +137,11 @@ sheet_object_construct (SheetObject *so, Sheet *sheet)
g_return_if_fail (sheet != NULL);
g_return_if_fail (IS_SHEET (sheet));
so->sheet = sheet;
so->type = SHEET_OBJECT_ACTION_STATIC;
so->sheet = sheet;
so->bbox_points = gnome_canvas_points_new (2);
sheet->objects = g_list_prepend (sheet->objects, so);
sheet->objects = g_list_prepend (sheet->objects, so);
}
void
......@@ -260,7 +265,7 @@ sheet_view_object_realize (SheetView *sheet_view, SheetObject *so)
}
gtk_signal_connect (GTK_OBJECT (item), "event",
GTK_SIGNAL_FUNC (sheet_object_event), so);
GTK_SIGNAL_FUNC (sheet_object_canvas_event), so);
so->realized_list = g_list_prepend (so->realized_list, item);
return item;
......@@ -502,7 +507,9 @@ sheet_motion_notify (GnumericSheet *gsheet, GdkEvent *event, Sheet *sheet)
so = SHEET_OBJECT (sheet->current_object);
gnome_canvas_window_to_world (GNOME_CANVAS (gsheet), event->button.x, event->button.y, &brx, &bry);
gnome_canvas_window_to_world (GNOME_CANVAS (gsheet),
event->button.x, event->button.y,
&brx, &bry);
tl = (ObjectCoords *)sheet->coords->data;
......@@ -824,12 +831,15 @@ static int
control_point_handle_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject *so)
{
int idx;
static int last_x, last_y;
static gdouble last_x, last_y;
switch (event->type){
switch (event->type) {
case GDK_ENTER_NOTIFY:
cursor_set_widget (item->canvas, GNUMERIC_CURSOR_ARROW);
{
gpointer p = gtk_object_get_data (GTK_OBJECT (item), "cursor");
cursor_set_widget (item->canvas, GPOINTER_TO_UINT (p));
break;
}
case GDK_BUTTON_RELEASE:
if (!so->dragging)
......@@ -847,6 +857,7 @@ control_point_handle_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject
NULL, event->button.time);
last_x = event->button.x;
last_y = event->button.y;
sheet_object_make_current (so);
break;
case GDK_MOTION_NOTIFY: {
......@@ -857,16 +868,11 @@ control_point_handle_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject
return FALSE;
idx = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item)));
gnome_canvas_c2w (item->canvas,
event->button.x - last_x,
event->button.y - last_y,
&dx, &dy);
dx = event->button.x - last_x;
dy = event->button.y - last_y;
last_x = event->button.x;
last_y = event->button.y;
zoom = so->sheet->last_zoom_factor_used;
dx *= zoom;
dy *= zoom;
switch (idx) {
case 0:
......@@ -915,39 +921,113 @@ control_point_handle_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject
return TRUE;
}
static void
sheet_object_remove_cb (GtkWidget *widget, SheetObject *so)
{
gtk_signal_emit_by_name (GTK_OBJECT (so), "destroy");
}
/**
* sheet_object_start_popup:
* @so: the sheet object
* @menu: the menu to insert into
*
* Add standard items to the object's popup menu.
**/
static void
sheet_object_start_popup (SheetObject *so, GtkMenu *menu)
{
GtkWidget *item = gtk_menu_item_new_with_label (_("Remove"));
gtk_signal_connect (GTK_OBJECT (item), "activate",
GTK_SIGNAL_FUNC (sheet_object_remove_cb), so);
gtk_menu_append (menu, item);
}
/**
* sheet_object_end_popup:
* @so: the sheet object
* @menu: the menu to remove from.
*
* clean standard items from the objects popup menu.
**/
static void
sheet_object_end_popup (SheetObject *so, GtkMenu *menu)
{
}
static void
menu_unrealize_cb (GtkMenu *menu, SheetObject *so)
{
SO_CLASS(so)->end_popup (so, menu);
}
static GtkMenu *
create_popup_menu (SheetObject *so)
{
GtkMenu *menu = GTK_MENU (gtk_menu_new ());
SO_CLASS(so)->start_popup (so, menu);
gtk_signal_connect (GTK_OBJECT (menu), "unrealize",
GTK_SIGNAL_FUNC (menu_unrealize_cb), so);
return menu;
}
/*
* sheet_object_event
* sheet_object_canvas_event
*
* Event handler for a SheetObject
*/
int
sheet_object_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject *so)
sheet_object_canvas_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject *so)
{
static int last_x, last_y;
static int total_x, total_y;
int dx, dy;
static int event_last_x, event_last_y;
static int event_total_x, event_total_y;
switch (event->type) {
case GDK_ENTER_NOTIFY:
cursor_set_widget (item->canvas, GNUMERIC_CURSOR_ARROW);
if (so->type == SHEET_OBJECT_ACTION_STATIC)
cursor_set_widget (item->canvas, GNUMERIC_CURSOR_ARROW);
else
cursor_set_widget (item->canvas, GNUMERIC_CURSOR_PRESS);
break;
case GDK_BUTTON_PRESS:
if (so->sheet->current_object) {
sheet_object_stop_editing (so->sheet->current_object);
so->sheet->current_object = NULL;
{
switch (event->button.button) {
case 1:
case 2:
if (so->sheet->current_object) {
sheet_object_stop_editing (so->sheet->current_object);
so->sheet->current_object = NULL;
}
so->dragging = TRUE;
gnome_canvas_item_grab (item,
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, event->button.time);
event_last_x = event->button.x;
event_last_y = event->button.y;
event_total_x = 0;
event_total_y = 0;
break;
case 3:
default:
{
GtkMenu *menu;
sheet_object_make_current (so);
menu = create_popup_menu (so);
gtk_widget_show_all (GTK_WIDGET (menu));
gnumeric_popup_menu (menu, (GdkEventButton *)event);
break;
}
}
so->dragging = TRUE;
gnome_canvas_item_grab (item,
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL, event->button.time);
last_x = event->button.x;
last_y = event->button.y;
total_x = 0;
total_y = 0;
break;
}
case GDK_BUTTON_RELEASE:
if (!so->dragging)
......@@ -958,27 +1038,31 @@ sheet_object_event (GnomeCanvasItem *item, GdkEvent *event, SheetObject *so)
gnome_canvas_item_ungrab (item, event->button.time);
sheet_object_unrealize (so);
so->bbox_points->coords [0] += total_x;
so->bbox_points->coords [1] += total_y;
so->bbox_points->coords [2] += total_x;
so->bbox_points->coords [3] += total_y;
so->bbox_points->coords [0] += event_total_x;
so->bbox_points->coords [1] += event_total_y;
so->bbox_points->coords [2] += event_total_x;
so->bbox_points->coords [3] += event_total_y;
sheet_object_realize (so);
sheet_object_make_current (so->sheet, so);
sheet_object_make_current (so);
break;