Commit c46a5465 authored by Almer S. Tigelaar's avatar Almer S. Tigelaar Committed by Almer S. Tigelaar

Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.

2001-01-25  Almer S. Tigelaar  <almer1@dds.nl>

        * src/clipboard.h : Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.

        * src/commands.c
        (cmd_paste_copy_undo): Add PASTE_UPDATE_ROW_HEIGHT to the paste flags.
        (cmd_paste_cut_redo): Update the row heights of the target region after
        pasting for consistency with the behaviour of copy.
        (cmd_paste_cut): Show source cut range in undo descriptor.

        * src/clipboard.c (clipboard_paste_region): Update row height after
        pasting if PASTE_UPDATE_ROW_HEIGHT flag is given.
parent 0426031a
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.h : Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.
* src/commands.c
(cmd_paste_copy_undo): Add PASTE_UPDATE_ROW_HEIGHT to the paste flags.
(cmd_paste_cut_redo): Update the row heights of the target region after
pasting for consistency with the behaviour of copy.
(cmd_paste_cut): Show source cut range in undo descriptor.
* src/clipboard.c (clipboard_paste_region): Update row height after
pasting if PASTE_UPDATE_ROW_HEIGHT flag is given.
2001-01-25 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste_to_selection) : allow merged regions
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.h : Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.
* src/commands.c
(cmd_paste_copy_undo): Add PASTE_UPDATE_ROW_HEIGHT to the paste flags.
(cmd_paste_cut_redo): Update the row heights of the target region after
pasting for consistency with the behaviour of copy.
(cmd_paste_cut): Show source cut range in undo descriptor.
* src/clipboard.c (clipboard_paste_region): Update row height after
pasting if PASTE_UPDATE_ROW_HEIGHT flag is given.
2001-01-25 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste_to_selection) : allow merged regions
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.h : Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.
* src/commands.c
(cmd_paste_copy_undo): Add PASTE_UPDATE_ROW_HEIGHT to the paste flags.
(cmd_paste_cut_redo): Update the row heights of the target region after
pasting for consistency with the behaviour of copy.
(cmd_paste_cut): Show source cut range in undo descriptor.
* src/clipboard.c (clipboard_paste_region): Update row height after
pasting if PASTE_UPDATE_ROW_HEIGHT flag is given.
2001-01-25 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste_to_selection) : allow merged regions
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.h : Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.
* src/commands.c
(cmd_paste_copy_undo): Add PASTE_UPDATE_ROW_HEIGHT to the paste flags.
(cmd_paste_cut_redo): Update the row heights of the target region after
pasting for consistency with the behaviour of copy.
(cmd_paste_cut): Show source cut range in undo descriptor.
* src/clipboard.c (clipboard_paste_region): Update row height after
pasting if PASTE_UPDATE_ROW_HEIGHT flag is given.
2001-01-25 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste_to_selection) : allow merged regions
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/clipboard.h : Add PASTE_UPDATE_ROW_HEIGHT as a new paste flag.
* src/commands.c
(cmd_paste_copy_undo): Add PASTE_UPDATE_ROW_HEIGHT to the paste flags.
(cmd_paste_cut_redo): Update the row heights of the target region after
pasting for consistency with the behaviour of copy.
(cmd_paste_cut): Show source cut range in undo descriptor.
* src/clipboard.c (clipboard_paste_region): Update row height after
pasting if PASTE_UPDATE_ROW_HEIGHT flag is given.
2001-01-25 Jody Goldberg <jgoldberg@home.com>
* src/cmd-edit.c (cmd_paste_to_selection) : allow merged regions
......
......@@ -412,7 +412,8 @@ clipboard_paste_region (WorkbookControl *wbc,
sheet_flag_status_update_range (pt->sheet, &pt->range);
}
rows_height_update (pt->sheet, &pt->range);
if (pt->paste_flags & PASTE_UPDATE_ROW_HEIGHT)
rows_height_update (pt->sheet, &pt->range);
return FALSE;
}
......
......@@ -25,7 +25,10 @@ enum {
PASTE_SKIP_BLANKS = 1 << 11,
/* Do not paste merged regions (probably not needed) */
PASTE_DONT_MERGE = 1 << 12
PASTE_DONT_MERGE = 1 << 12,
/* Update the row height when pasting? (for large fonts, etc.) */
PASTE_UPDATE_ROW_HEIGHT = 1 << 13
};
#define PASTE_ALL_TYPES (PASTE_CONTENT | PASTE_FORMATS)
......
......@@ -1951,6 +1951,8 @@ cmd_paste_cut_redo (GnumericCommand *cmd, WorkbookControl *wbc)
cmd_paste_cut_update_origin (&me->info, wbc);
rows_height_update (me->info.target_sheet, &tmp);
return FALSE;
}
......@@ -1979,8 +1981,9 @@ cmd_paste_cut (WorkbookControl *wbc, ExprRelocateInfo const *info,
GtkObject *obj;
CmdPasteCut *me;
/* FIXME : improve on this */
char *descriptor = g_strdup_printf (_("Moving cells") );
/* FIXME: Do we want to show the destination range alwell? */
char *descriptor = g_strdup_printf (_("Moving %s"),
range_name (&info->origin));
g_return_val_if_fail (info != NULL, TRUE);
......@@ -2038,6 +2041,8 @@ cmd_paste_copy_undo (GnumericCommand *cmd, WorkbookControl *wbc)
g_return_val_if_fail (me != NULL, TRUE);
g_return_val_if_fail (me->content != NULL, TRUE);
me->dst.paste_flags |= PASTE_UPDATE_ROW_HEIGHT;
content = clipboard_copy_range (me->dst.sheet, &me->dst.range);
if (clipboard_paste_region (wbc, &me->dst, me->content)) {
/* There was a problem, avoid leaking */
......
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