Commit f17355a6 authored by Arturo Espinosa's avatar Arturo Espinosa

Ok, fixed cell movement



Ok, fixed cell movement
parent d3e1a06d
1998-08-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_redraw_all): Redraw also the column and row
bars.
(sheet_insert_row): Fix. I was accessing the wrong information.
* src/dialog-insert-cells.c (dialog_insert_cells): Learn to use
GtkCauldroun's way of dealing with radio buttons.
* src/sheet.c (sheet_selection_paste): Now the clipboard fills the
region which is the union of the current selection and the
information in the clipboard.
* src/clipboard.c (clipboard_paste_region): Check the region where
we pasted for possible dependencies, and if so, queue a recalc.
(clipboard_paste_region): It now takes a region to be filled
instead of just using the contents of the clipboard.
* src/eval.c (search_cell_deps): Updated to search on cell ranges
instead of a single cell.
(region_get_dependencies): Get dependencies for a complete
region.
(cell_get_dependencies): Reworked to use new scheme
1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-insert-cells.c: New file. Handle the insert cells * src/dialog-insert-cells.c: New file. Handle the insert cells
......
1998-08-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_redraw_all): Redraw also the column and row
bars.
(sheet_insert_row): Fix. I was accessing the wrong information.
* src/dialog-insert-cells.c (dialog_insert_cells): Learn to use
GtkCauldroun's way of dealing with radio buttons.
* src/sheet.c (sheet_selection_paste): Now the clipboard fills the
region which is the union of the current selection and the
information in the clipboard.
* src/clipboard.c (clipboard_paste_region): Check the region where
we pasted for possible dependencies, and if so, queue a recalc.
(clipboard_paste_region): It now takes a region to be filled
instead of just using the contents of the clipboard.
* src/eval.c (search_cell_deps): Updated to search on cell ranges
instead of a single cell.
(region_get_dependencies): Get dependencies for a complete
region.
(cell_get_dependencies): Reworked to use new scheme
1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-insert-cells.c: New file. Handle the insert cells * src/dialog-insert-cells.c: New file. Handle the insert cells
......
1998-08-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_redraw_all): Redraw also the column and row
bars.
(sheet_insert_row): Fix. I was accessing the wrong information.
* src/dialog-insert-cells.c (dialog_insert_cells): Learn to use
GtkCauldroun's way of dealing with radio buttons.
* src/sheet.c (sheet_selection_paste): Now the clipboard fills the
region which is the union of the current selection and the
information in the clipboard.
* src/clipboard.c (clipboard_paste_region): Check the region where
we pasted for possible dependencies, and if so, queue a recalc.
(clipboard_paste_region): It now takes a region to be filled
instead of just using the contents of the clipboard.
* src/eval.c (search_cell_deps): Updated to search on cell ranges
instead of a single cell.
(region_get_dependencies): Get dependencies for a complete
region.
(cell_get_dependencies): Reworked to use new scheme
1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-insert-cells.c: New file. Handle the insert cells * src/dialog-insert-cells.c: New file. Handle the insert cells
......
1998-08-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_redraw_all): Redraw also the column and row
bars.
(sheet_insert_row): Fix. I was accessing the wrong information.
* src/dialog-insert-cells.c (dialog_insert_cells): Learn to use
GtkCauldroun's way of dealing with radio buttons.
* src/sheet.c (sheet_selection_paste): Now the clipboard fills the
region which is the union of the current selection and the
information in the clipboard.
* src/clipboard.c (clipboard_paste_region): Check the region where
we pasted for possible dependencies, and if so, queue a recalc.
(clipboard_paste_region): It now takes a region to be filled
instead of just using the contents of the clipboard.
* src/eval.c (search_cell_deps): Updated to search on cell ranges
instead of a single cell.
(region_get_dependencies): Get dependencies for a complete
region.
(cell_get_dependencies): Reworked to use new scheme
1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx> 1998-08-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/dialog-insert-cells.c: New file. Handle the insert cells * src/dialog-insert-cells.c: New file. Handle the insert cells
......
...@@ -186,6 +186,11 @@ PM/pm/p/p "AM", "am", "M" or "a" for the hours between midnight ...@@ -186,6 +186,11 @@ PM/pm/p/p "AM", "am", "M" or "a" for the hours between midnight
Implement style regions. Implement style regions.
Implement style resolution at cell creation time. Implement style resolution at cell creation time.
* Selection
Make the selection work by drawing with the invert or the xor
operations instead of drawing and redrawing on top with the text.
* Workbooks: * Workbooks:
** Notebook: ** Notebook:
......
...@@ -98,11 +98,16 @@ paste_cell (Sheet *dest_sheet, Cell *new_cell, int target_col, int target_row, i ...@@ -98,11 +98,16 @@ paste_cell (Sheet *dest_sheet, Cell *new_cell, int target_col, int target_row, i
} }
void void
clipboard_paste_region (CellRegion *region, Sheet *dest_sheet, int dest_col, int dest_row, int paste_flags) clipboard_paste_region (CellRegion *region, Sheet *dest_sheet,
int dest_col, int dest_row,
int paste_width, int paste_height,
int paste_flags)
{ {
CellCopyList *l; CellCopyList *l;
GList *deps;
int formulas = 0; int formulas = 0;
int col, row;
g_return_if_fail (region != NULL); g_return_if_fail (region != NULL);
g_return_if_fail (dest_sheet != NULL); g_return_if_fail (dest_sheet != NULL);
g_return_if_fail (IS_SHEET (dest_sheet)); g_return_if_fail (IS_SHEET (dest_sheet));
...@@ -110,31 +115,56 @@ clipboard_paste_region (CellRegion *region, Sheet *dest_sheet, int dest_col, int ...@@ -110,31 +115,56 @@ clipboard_paste_region (CellRegion *region, Sheet *dest_sheet, int dest_col, int
/* Clear the region where we will paste */ /* Clear the region where we will paste */
sheet_clear_region (dest_sheet, sheet_clear_region (dest_sheet,
dest_col, dest_row, dest_col, dest_row,
dest_col + region->cols - 1, dest_col + paste_width - 1,
dest_row + region->rows - 1); dest_row + paste_height - 1);
/* If no operations are defined, we clear the area */ /* If no operations are defined, we clear the area */
if (!(paste_flags & PASTE_OP_MASK)) if (!(paste_flags & PASTE_OP_MASK))
sheet_redraw_cell_region (dest_sheet, sheet_redraw_cell_region (dest_sheet,
dest_col, dest_row, dest_col, dest_row,
dest_col + region->cols - 1, dest_col + paste_width - 1,
dest_row + region->rows - 1); dest_row + paste_height - 1);
/* Paste each element */ /* Paste each element */
for (l = region->list; l; l = l->next){ for (col = 0; col < paste_width; col += region->cols){
CellCopy *c_copy = l->data; for (row = 0; row < paste_height; row += region->rows){
Cell *new_cell; for (l = region->list; l; l = l->next){
int target_col, target_row; CellCopy *c_copy = l->data;
Cell *new_cell;
target_col = dest_col + c_copy->col_offset; int target_col, target_row;
target_row = dest_row + c_copy->row_offset;
target_col = col + dest_col + c_copy->col_offset;
new_cell = cell_copy (c_copy->cell); target_row = row + dest_row + c_copy->row_offset;
formulas |= paste_cell (dest_sheet, new_cell, target_col, target_row, paste_flags); if (target_col > dest_col + paste_width - 1)
continue;
if (target_row > dest_row + paste_height - 1)
continue;
new_cell = cell_copy (c_copy->cell);
formulas |= paste_cell (
dest_sheet, new_cell,
target_col, target_row, paste_flags);
}
}
}
deps = region_get_dependencies (
dest_sheet,
dest_col, dest_row,
dest_col + paste_width - 1,
dest_row + paste_height -1);
if (deps){
cell_queue_recalc_list (deps);
formulas = 1;
} }
/* Trigger a recompute */ /* Trigger a recompute if required */
if (formulas) if (formulas)
workbook_recalc (dest_sheet->workbook); workbook_recalc (dest_sheet->workbook);
} }
......
...@@ -25,6 +25,8 @@ void clipboard_paste_region (CellRegion *region, ...@@ -25,6 +25,8 @@ void clipboard_paste_region (CellRegion *region,
Sheet *dest_sheet, Sheet *dest_sheet,
int dest_col, int dest_col,
int dest_row, int dest_row,
int paste_width,
int paste_height,
int paste_flags); int paste_flags);
void clipboard_release (CellRegion *region); void clipboard_release (CellRegion *region);
......
...@@ -286,26 +286,39 @@ cell_drop_dependencies (Cell *cell) ...@@ -286,26 +286,39 @@ cell_drop_dependencies (Cell *cell)
} }
typedef struct { typedef struct {
int col; int start_col, start_row;
int row; int end_col, end_row;
Sheet *sheet; Sheet *sheet;
GList *list; GList *list;
} get_dep_closure_t; } get_dep_closure_t;
static gboolean
intersects (Sheet *sheet, int col, int row, DependencyRange *range)
{
if ((col >= range->start_col) &&
(col <= range->end_col) &&
(row >= range->start_row) &&
(row <= range->end_row) &&
(sheet = range->sheet))
return TRUE;
return FALSE;
}
static void static void
search_cell_deps (gpointer key, gpointer value, gpointer closure) search_cell_deps (gpointer key, gpointer value, gpointer closure)
{ {
DependencyRange *range = key; DependencyRange *range = key;
get_dep_closure_t *c = closure; get_dep_closure_t *c = closure;
Sheet *sheet = c->sheet;
GList *l; GList *l;
if (!((c->col >= range->start_col) &&
(c->col <= range->end_col) &&
(c->row >= range->start_row) &&
(c->row <= range->end_row) &&
(c->sheet = range->sheet)))
return;
if (!(intersects (sheet, c->start_col, c->start_row, range) ||
intersects (sheet, c->end_col, c->end_row, range) ||
intersects (sheet, c->start_col, c->end_row, range) ||
intersects (sheet, c->end_col, c->start_row, range)))
return;
for (l = range->cell_list; l; l = l->next){ for (l = range->cell_list; l; l = l->next){
Cell *cell = l->data; Cell *cell = l->data;
...@@ -313,6 +326,26 @@ search_cell_deps (gpointer key, gpointer value, gpointer closure) ...@@ -313,6 +326,26 @@ search_cell_deps (gpointer key, gpointer value, gpointer closure)
} }
} }
GList *
region_get_dependencies (Sheet *sheet, int start_col, int start_row, int end_col, int end_row)
{
get_dep_closure_t closure;
if (!dependency_hash)
dependency_hash_init ();
closure.start_col = start_col;
closure.start_row = start_row;
closure.end_col = end_col;
closure.end_row = end_row;
closure.sheet = sheet;
closure.list = NULL;
g_hash_table_foreach (dependency_hash, &search_cell_deps, &closure);
return closure.list;
}
GList * GList *
cell_get_dependencies (Sheet *sheet, int col, int row) cell_get_dependencies (Sheet *sheet, int col, int row)
{ {
...@@ -321,8 +354,10 @@ cell_get_dependencies (Sheet *sheet, int col, int row) ...@@ -321,8 +354,10 @@ cell_get_dependencies (Sheet *sheet, int col, int row)
if (!dependency_hash) if (!dependency_hash)
dependency_hash_init (); dependency_hash_init ();
closure.col = col; closure.start_col = col;
closure.row = row; closure.start_row = row;
closure.end_col = col;
closure.end_row = row;
closure.sheet = sheet; closure.sheet = sheet;
closure.list = NULL; closure.list = NULL;
......
...@@ -31,6 +31,14 @@ void cell_drop_dependencies (Cell *cell); ...@@ -31,6 +31,14 @@ void cell_drop_dependencies (Cell *cell);
*/ */
GList *cell_get_dependencies (Sheet *shet, int col, int row); GList *cell_get_dependencies (Sheet *shet, int col, int row);
/*
* Returns a newly allocated list with Cells inside that
* depends on any values in the range specified
*/
GList *region_get_dependencies (Sheet *sheet,
int start_col, int start_row,
int end_col, int end_row);
/* /*
* Queue a cell or a list of cells for computation * Queue a cell or a list of cells for computation
*/ */
......
...@@ -12,17 +12,10 @@ ...@@ -12,17 +12,10 @@
#include "gnumeric-util.h" #include "gnumeric-util.h"
#include "dialogs.h" #include "dialogs.h"
typedef enum {
CMD_SHIFT_CELLS_RIGHT,
CMD_SHIFT_CELLS_DOWN,
CMD_INSERT_ROW,
CMD_INSERT_COL
} CommandType;
void void
dialog_insert_cells (Sheet *sheet) dialog_insert_cells (Sheet *sheet)
{ {
CommandType state = CMD_SHIFT_CELLS_RIGHT; int state [4] = { 1, 0, 0, 0 };
SheetSelection *ss; SheetSelection *ss;
char *ret; char *ret;
int cols, rows; int cols, rows;
...@@ -38,36 +31,36 @@ dialog_insert_cells (Sheet *sheet) ...@@ -38,36 +31,36 @@ dialog_insert_cells (Sheet *sheet)
GTK_CAULDRON_DIALOG, GTK_CAULDRON_DIALOG,
"( %[ ( %Rd // %Rd / %Rd // %Rd ) ] / ( %Bqrg || %Bqrg ) )", "( %[ ( %Rd // %Rd / %Rd // %Rd ) ] / ( %Bqrg || %Bqrg ) )",
_("Insert"), _("Insert"),
_("Shift cells right"), &state, _("Shift cells right"), &state[0],
_("Shift cells down"), &state, _("Shift cells down"), &state[1],
_("Insert a row"), &state, _("Insert a row"), &state[2],
_("Insert a column"), &state, _("Insert a column"), &state[3],
GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL); GNOME_STOCK_BUTTON_CANCEL);
printf ("return: %s\n", ret); printf ("return: %s, %d %d %d %d\n", ret, state [0], state [1], state [2], state [3]);
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0) if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return; return;
ss = sheet->selections->data; ss = sheet->selections->data;
cols = ss->end_col - ss->start_col + 1; cols = ss->end_col - ss->start_col + 1;
rows = ss->end_row - ss->start_row + 1; rows = ss->end_row - ss->start_row + 1;
switch (state){ if (state [0]){
case CMD_SHIFT_CELLS_RIGHT:
sheet_shift_rows (sheet, ss->start_col, ss->start_row, ss->end_row, cols); sheet_shift_rows (sheet, ss->start_col, ss->start_row, ss->end_row, cols);
break; return;
}
case CMD_SHIFT_CELLS_DOWN:
if (state [1]){
sheet_shift_cols (sheet, ss->start_col, ss->end_col, ss->start_row, rows); sheet_shift_cols (sheet, ss->start_col, ss->end_col, ss->start_row, rows);
break; return;
}
case CMD_INSERT_COL:
sheet_insert_col (sheet, ss->start_col, cols); if (state [2]){
break;
case CMD_INSERT_ROW:
sheet_insert_row (sheet, ss->start_row, rows); sheet_insert_row (sheet, ss->start_row, rows);
break; return;
} }
/* default */
sheet_insert_col (sheet, ss->start_col, cols);
} }
...@@ -12,17 +12,10 @@ ...@@ -12,17 +12,10 @@
#include "gnumeric-util.h" #include "gnumeric-util.h"
#include "dialogs.h" #include "dialogs.h"
typedef enum {
CMD_SHIFT_CELLS_RIGHT,
CMD_SHIFT_CELLS_DOWN,
CMD_INSERT_ROW,
CMD_INSERT_COL
} CommandType;
void void
dialog_insert_cells (Sheet *sheet) dialog_insert_cells (Sheet *sheet)
{ {
CommandType state = CMD_SHIFT_CELLS_RIGHT; int state [4] = { 1, 0, 0, 0 };
SheetSelection *ss; SheetSelection *ss;
char *ret; char *ret;
int cols, rows; int cols, rows;
...@@ -38,36 +31,36 @@ dialog_insert_cells (Sheet *sheet) ...@@ -38,36 +31,36 @@ dialog_insert_cells (Sheet *sheet)
GTK_CAULDRON_DIALOG, GTK_CAULDRON_DIALOG,
"( %[ ( %Rd // %Rd / %Rd // %Rd ) ] / ( %Bqrg || %Bqrg ) )", "( %[ ( %Rd // %Rd / %Rd // %Rd ) ] / ( %Bqrg || %Bqrg ) )",
_("Insert"), _("Insert"),
_("Shift cells right"), &state, _("Shift cells right"), &state[0],
_("Shift cells down"), &state, _("Shift cells down"), &state[1],
_("Insert a row"), &state, _("Insert a row"), &state[2],
_("Insert a column"), &state, _("Insert a column"), &state[3],
GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL); GNOME_STOCK_BUTTON_CANCEL);
printf ("return: %s\n", ret); printf ("return: %s, %d %d %d %d\n", ret, state [0], state [1], state [2], state [3]);
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0) if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return; return;
ss = sheet->selections->data; ss = sheet->selections->data;
cols = ss->end_col - ss->start_col + 1; cols = ss->end_col - ss->start_col + 1;
rows = ss->end_row - ss->start_row + 1; rows = ss->end_row - ss->start_row + 1;
switch (state){ if (state [0]){
case CMD_SHIFT_CELLS_RIGHT:
sheet_shift_rows (sheet, ss->start_col, ss->start_row, ss->end_row, cols); sheet_shift_rows (sheet, ss->start_col, ss->start_row, ss->end_row, cols);
break; return;
}
case CMD_SHIFT_CELLS_DOWN:
if (state [1]){
sheet_shift_cols (sheet, ss->start_col, ss->end_col, ss->start_row, rows); sheet_shift_cols (sheet, ss->start_col, ss->end_col, ss->start_row, rows);
break; return;
}
case CMD_INSERT_COL:
sheet_insert_col (sheet, ss->start_col, cols); if (state [2]){
break;
case CMD_INSERT_ROW:
sheet_insert_row (sheet, ss->start_row, rows); sheet_insert_row (sheet, ss->start_row, rows);
break; return;
} }
/* default */
sheet_insert_col (sheet, ss->start_col, cols);
} }
...@@ -286,26 +286,39 @@ cell_drop_dependencies (Cell *cell) ...@@ -286,26 +286,39 @@ cell_drop_dependencies (Cell *cell)
} }
typedef struct { typedef struct {
int col; int start_col, start_row;
int row; int end_col, end_row;
Sheet *sheet; Sheet *sheet;
GList *list; GList *list;
} get_dep_closure_t; } get_dep_closure_t;
static gboolean
intersects (Sheet *sheet, int col, int row, DependencyRange *range)
{
if ((col >= range->start_col) &&
(col <= range->end_col) &&
(row >= range->start_row) &&
(row <= range->end_row) &&
(sheet = range->sheet))
return TRUE;
return FALSE;
}
static void static void
search_cell_deps (gpointer key, gpointer value, gpointer closure) search_cell_deps (gpointer key, gpointer value, gpointer closure)
{ {
DependencyRange *range = key; DependencyRange *range = key;
get_dep_closure_t *c = closure; get_dep_closure_t *c = closure;
Sheet *sheet = c->sheet;
GList *l; GList *l;
if (!((c->col >= range->start_col) &&
(c->col <= range->end_col) &&
(c->row >= range->start_row) &&
(c->row <= range->end_row) &&
(c->sheet = range->sheet)))
return;
if (!(intersects (sheet, c->start_col, c->start_row, range) ||
intersects (sheet, c->end_col, c->end_row, range) ||
intersects (sheet, c->start_col, c->end_row, range) ||
intersects (sheet, c->end_col, c->start_row, range)))
return;
for (l = range->cell_list; l; l = l->next){ for (l = range->cell_list; l; l = l->next){
Cell *cell = l->data; Cell *cell = l->data;
...@@ -313,6 +326,26 @@ search_cell_deps (gpointer key, gpointer value, gpointer closure) ...@@ -313,6 +326,26 @@ search_cell_deps (gpointer key, gpointer value, gpointer closure)
} }
} }
GList *
region_get_dependencies (Sheet *sheet, int start_col, int start_row, int end_col, int end_row)
{
get_dep_closure_t closure;
if (!dependency_hash)
dependency_hash_init ();
closure.start_col = start_col;
closure.start_row = start_row;
closure.end_col = end_col;
closure.end_row = end_row;
closure.sheet = sheet;
closure.list = NULL;
g_hash_table_foreach (dependency_hash, &search_cell_deps, &closure);
return closure.list;
}
GList * GList *
cell_get_dependencies (Sheet *sheet, int col, int row) cell_get_dependencies (Sheet *sheet, int col, int row)
{ {
...@@ -321,8 +354,10 @@ cell_get_dependencies (Sheet *sheet, int col, int row) ...@@ -321,8 +354,10 @@ cell_get_dependencies (Sheet *sheet, int col, int row)
if (!dependency_hash) if (!dependency_hash)
dependency_hash_init (); dependency_hash_init ();
closure.col = col; closure.start_col = col;
closure.row = row; closure.start_row = row;
closure.end_col = col;
closure.end_row = row;
closure.sheet = sheet; closure.sheet = sheet;
closure.list = NULL; closure.list = NULL;
......
...@@ -31,6 +31,14 @@ void cell_drop_dependencies (Cell *cell); ...@@ -31,6 +31,14 @@ void cell_drop_dependencies (Cell *cell);
*/ */
GList *cell_get_dependencies (Sheet *shet, int col, int row); GList *cell_get_dependencies (Sheet *shet, int col, int row);
/*
* Returns a newly allocated list with Cells inside that
* depends on any values in the range specified
*/
GList *region_get_dependencies (Sheet *sheet,
int start_col, int start_row,
int end_col, int end_row);
/* /*
* Queue a cell or a list of cells for computation * Queue a cell or a list of cells for computation
*/ */
......
...@@ -22,6 +22,12 @@ sheet_redraw_all (Sheet *sheet) ...@@ -22,6 +22,12 @@ sheet_redraw_all (Sheet *sheet)
gnome_canvas_request_redraw ( gnome_canvas_request_redraw (
GNOME_CANVAS (sheet->sheet_view), GNOME_CANVAS (sheet->sheet_view),
0, 0, INT_MAX, INT_MAX); 0, 0, INT_MAX, INT_MAX);
gnome_canvas_request_redraw (
GNOME_CANVAS (sheet->col_canvas),
0, 0, INT_MAX, INT_MAX);
gnome_canvas_request_redraw (
GNOME_CANVAS (sheet->row_canvas),
0, 0, INT_MAX, INT_MAX);
} }
static void static void
...@@ -1358,7 +1364,7 @@ sheet_col_get (Sheet *sheet, int pos) ...@@ -1358,7 +1364,7 @@ sheet_col_get (Sheet *sheet, int pos)
} }
/* /*
* Returns an allocated column: either an existing one, or a fresh copy * Returns an allocated row: either an existing one, or a fresh copy
*/ */
ColRowInfo * ColRowInfo *
sheet_row_get (Sheet *sheet, int pos) sheet_row_get (Sheet *sheet, int pos)
...@@ -1795,8 +1801,9 @@ sheet_selection_cut (Sheet *sheet) ...@@ -1795,8 +1801,9 @@ sheet_selection_cut (Sheet *sheet)
void void
sheet_selection_paste (Sheet *sheet, int dest_col, int dest_row, int paste_flags) sheet_selection_paste (Sheet *sheet, int dest_col, int dest_row, int paste_flags)
{ {
CellRegion *content; SheetSelection *ss;
int end_col, end_row; CellRegion *content;
int end_col, end_row, paste_width, paste_height;