Commit 87cfd6cb authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

bug 30243

2000-10-31  Jody Goldberg <jgoldberg@home.com>

	* src/cmd-edit.c (cmd_paste) : change the selection when pasting.
	(cmd_shift_{rows,cols}) : Do not change the selection when pasting.

	* src/commands.c (cmd_paste_cut_{undo,redo}) : Only select the target
	  if requested.
	(cmd_paste_cut) : new argument.
parent e39fd4e9
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste) : change the selection when pasting.
(cmd_shift_{rows,cols}) : Do not change the selection when pasting.
* src/commands.c (cmd_paste_cut_{undo,redo}) : Only select the target
if requested.
(cmd_paste_cut) : new argument.
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_new_from_string) : Reset errno on over/underflow.
......
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste) : change the selection when pasting.
(cmd_shift_{rows,cols}) : Do not change the selection when pasting.
* src/commands.c (cmd_paste_cut_{undo,redo}) : Only select the target
if requested.
(cmd_paste_cut) : new argument.
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_new_from_string) : Reset errno on over/underflow.
......
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste) : change the selection when pasting.
(cmd_shift_{rows,cols}) : Do not change the selection when pasting.
* src/commands.c (cmd_paste_cut_{undo,redo}) : Only select the target
if requested.
(cmd_paste_cut) : new argument.
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_new_from_string) : Reset errno on over/underflow.
......
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste) : change the selection when pasting.
(cmd_shift_{rows,cols}) : Do not change the selection when pasting.
* src/commands.c (cmd_paste_cut_{undo,redo}) : Only select the target
if requested.
(cmd_paste_cut) : new argument.
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_new_from_string) : Reset errno on over/underflow.
......
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste) : change the selection when pasting.
(cmd_shift_{rows,cols}) : Do not change the selection when pasting.
* src/commands.c (cmd_paste_cut_{undo,redo}) : Only select the target
if requested.
(cmd_paste_cut) : new argument.
2000-10-31 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_new_from_string) : Reset errno on over/underflow.
......
......@@ -327,7 +327,7 @@ cmd_paste (WorkbookControl *wbc, PasteTarget const *pt, guint32 time)
rinfo.origin_sheet = src_sheet;
rinfo.target_sheet = pt->sheet;
cmd_paste_cut (wbc, &rinfo);
cmd_paste_cut (wbc, &rinfo, TRUE);
application_clipboard_clear (TRUE);
} else
/*
......@@ -394,7 +394,7 @@ cmd_shift_rows (WorkbookControl *wbc, Sheet *sheet,
rinfo.origin.end.row = end_row;
rinfo.origin.end.col = SHEET_MAX_COLS-1;
cmd_paste_cut (wbc, &rinfo);
cmd_paste_cut (wbc, &rinfo, FALSE);
}
/**
......@@ -425,6 +425,6 @@ cmd_shift_cols (WorkbookControl *wbc, Sheet *sheet,
rinfo.origin.end.col = end_col;
rinfo.origin.end.row = SHEET_MAX_ROWS-1;
cmd_paste_cut (wbc, &rinfo);
cmd_paste_cut (wbc, &rinfo, FALSE);
}
......@@ -1698,6 +1698,7 @@ typedef struct
ExprRelocateInfo info;
GSList *paste_content;
GSList *reloc_storage;
gboolean move_selection;
} CmdPasteCut;
GNUMERIC_MAKE_COMMAND (CmdPasteCut, cmd_paste_cut);
......@@ -1749,13 +1750,14 @@ cmd_paste_cut_undo (GnumericCommand *cmd, WorkbookControl *wbc)
sheet_flag_status_update_range (me->info.target_sheet, NULL /* force update */);
/* Select the original region */
sheet_selection_set (me->info.origin_sheet,
me->info.origin.start.col,
me->info.origin.start.row,
me->info.origin.start.col,
me->info.origin.start.row,
me->info.origin.end.col,
me->info.origin.end.row);
if (me->move_selection)
sheet_selection_set (me->info.origin_sheet,
me->info.origin.start.col,
me->info.origin.start.row,
me->info.origin.start.col,
me->info.origin.start.row,
me->info.origin.end.col,
me->info.origin.end.row);
sheet_set_dirty (me->info.target_sheet, TRUE);
workbook_recalc (me->info.target_sheet->workbook);
......@@ -1814,10 +1816,11 @@ cmd_paste_cut_redo (GnumericCommand *cmd, WorkbookControl *wbc)
tmp.end.row = SHEET_MAX_ROWS-1;
/* Make sure the destination is selected */
sheet_selection_set (me->info.target_sheet,
tmp.start.col, tmp.start.row,
tmp.start.col, tmp.start.row,
tmp.end.col, tmp.end.row);
if (me->move_selection)
sheet_selection_set (me->info.target_sheet,
tmp.start.col, tmp.start.row,
tmp.start.col, tmp.start.row,
tmp.end.col, tmp.end.row);
sheet_move_range (wbc, &me->info, &me->reloc_storage);
......@@ -1846,7 +1849,8 @@ cmd_paste_cut_destroy (GtkObject *cmd)
}
gboolean
cmd_paste_cut (WorkbookControl *wbc, ExprRelocateInfo const *info)
cmd_paste_cut (WorkbookControl *wbc, ExprRelocateInfo const *info,
gboolean move_selection)
{
GtkObject *obj;
CmdPasteCut *me;
......@@ -1861,8 +1865,9 @@ cmd_paste_cut (WorkbookControl *wbc, ExprRelocateInfo const *info)
/* Store the specs for the object */
me->info = *info;
me->paste_content = NULL;
me->reloc_storage = NULL;
me->paste_content = NULL;
me->reloc_storage = NULL;
me->move_selection = move_selection;
me->parent.cmd_descriptor = descriptor;
......
......@@ -32,7 +32,8 @@ gboolean cmd_resize_row_col (WorkbookControl *wbc, Sheet *sheet,
int new_size);
gboolean cmd_paste_cut (WorkbookControl *wbc,
const ExprRelocateInfo *info);
const ExprRelocateInfo *info,
gboolean move_selection);
gboolean cmd_paste_copy (WorkbookControl *wbc,
const PasteTarget *pt, CellRegion *content);
......
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