GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 30c9841e authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Tidy up the naming scheme a bit. s/row_col/colrow/ s/col_row/colrow/


2000-12-15  Jody Goldberg <jgoldberg@home.com>

	Tidy up the naming scheme a bit.
	s/row_col/colrow/
	s/col_row/colrow/
	s/SheetSelection/Range/

	* src/workbook-cmd-format.c (workbook_cmd_resize_selected_colrow) :
	  Merged from workbook_cmd_format_column_width and.
	  & workbook_cmd_format_row_height

	* src/item-bar.c (item_bar_end_resize) : Call scg_colrow_size_set
	  directly.
	(item_bar_class_init) : remove the SIZE_CHANGED signal.

	* src/selection.c (sheet_selection_full_cols_rows) : merge
	  sheet_selection_full_cols & sheet_selection_full_rows.
parent 17fb06d4
2000-12-15 Jody Goldberg <jgoldberg@home.com>
Tidy up the naming scheme a bit.
s/row_col/colrow/
s/col_row/colrow/
s/SheetSelection/Range/
* src/workbook-cmd-format.c (workbook_cmd_resize_selected_colrow) :
Merged from workbook_cmd_format_column_width and.
& workbook_cmd_format_row_height
* src/item-bar.c (item_bar_end_resize) : Call scg_colrow_size_set
directly.
(item_bar_class_init) : remove the SIZE_CHANGED signal.
* src/selection.c (sheet_selection_full_cols_rows) : merge
sheet_selection_full_cols & sheet_selection_full_rows.
2000-12-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : Move the span handling here.
......
......@@ -5,10 +5,14 @@ Alan Cox:
Jody:
* Work on sheet object persistence.
* Begin honouring the current format when parsing.
Morten:
* Fix scripts generating documentation.
Chema:
* Some work on the name dialog.
--------------------------------------------------------------------------
Gnumeric 0.60
......
2000-12-15 Jody Goldberg <jgoldberg@home.com>
Tidy up the naming scheme a bit.
s/row_col/colrow/
s/col_row/colrow/
s/SheetSelection/Range/
* src/workbook-cmd-format.c (workbook_cmd_resize_selected_colrow) :
Merged from workbook_cmd_format_column_width and.
& workbook_cmd_format_row_height
* src/item-bar.c (item_bar_end_resize) : Call scg_colrow_size_set
directly.
(item_bar_class_init) : remove the SIZE_CHANGED signal.
* src/selection.c (sheet_selection_full_cols_rows) : merge
sheet_selection_full_cols & sheet_selection_full_rows.
2000-12-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : Move the span handling here.
......
2000-12-15 Jody Goldberg <jgoldberg@home.com>
Tidy up the naming scheme a bit.
s/row_col/colrow/
s/col_row/colrow/
s/SheetSelection/Range/
* src/workbook-cmd-format.c (workbook_cmd_resize_selected_colrow) :
Merged from workbook_cmd_format_column_width and.
& workbook_cmd_format_row_height
* src/item-bar.c (item_bar_end_resize) : Call scg_colrow_size_set
directly.
(item_bar_class_init) : remove the SIZE_CHANGED signal.
* src/selection.c (sheet_selection_full_cols_rows) : merge
sheet_selection_full_cols & sheet_selection_full_rows.
2000-12-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : Move the span handling here.
......
2000-12-15 Jody Goldberg <jgoldberg@home.com>
Tidy up the naming scheme a bit.
s/row_col/colrow/
s/col_row/colrow/
s/SheetSelection/Range/
* src/workbook-cmd-format.c (workbook_cmd_resize_selected_colrow) :
Merged from workbook_cmd_format_column_width and.
& workbook_cmd_format_row_height
* src/item-bar.c (item_bar_end_resize) : Call scg_colrow_size_set
directly.
(item_bar_class_init) : remove the SIZE_CHANGED signal.
* src/selection.c (sheet_selection_full_cols_rows) : merge
sheet_selection_full_cols & sheet_selection_full_rows.
2000-12-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : Move the span handling here.
......
2000-12-15 Jody Goldberg <jgoldberg@home.com>
Tidy up the naming scheme a bit.
s/row_col/colrow/
s/col_row/colrow/
s/SheetSelection/Range/
* src/workbook-cmd-format.c (workbook_cmd_resize_selected_colrow) :
Merged from workbook_cmd_format_column_width and.
& workbook_cmd_format_row_height
* src/item-bar.c (item_bar_end_resize) : Call scg_colrow_size_set
directly.
(item_bar_class_init) : remove the SIZE_CHANGED signal.
* src/selection.c (sheet_selection_full_cols_rows) : merge
sheet_selection_full_cols & sheet_selection_full_rows.
2000-12-14 Jody Goldberg <jgoldberg@home.com>
* src/item-grid.c (item_grid_draw) : Move the span handling here.
......
......@@ -2959,7 +2959,7 @@ ms_excel_read_row (BiffQuery *q, ExcelSheet *sheet)
/* FIXME : I am not clear on the difference between collapsed, and dyn 0
* Use both for now */
if (flags & 0x30)
col_row_set_visibility (sheet->gnum_sheet, FALSE, FALSE, row, row);
colrow_set_visibility (sheet->gnum_sheet, FALSE, FALSE, row, row);
if (flags & 0x80) {
ms_excel_set_xf_segment (sheet, 0, SHEET_MAX_COLS-1, row, xf);
......@@ -3023,7 +3023,7 @@ ms_excel_read_colinfo (BiffQuery *q, ExcelSheet *sheet)
/* TODO : We should associate a style region with the columns */
if (hidden)
col_row_set_visibility (sheet->gnum_sheet, TRUE, FALSE,
colrow_set_visibility (sheet->gnum_sheet, TRUE, FALSE,
firstcol, lastcol);
}
......
......@@ -590,13 +590,13 @@ xml2ParseColRow (XML2ParseState *state, CHAR const **attrs, gboolean is_col)
sheet_col_set_size_pts (state->sheet, pos, size, cri->hard_size);
/* resize flags are already set only need to copy the sizes */
while (--count > 0)
col_row_copy (sheet_col_fetch (state->sheet, ++pos), cri);
colrow_copy (sheet_col_fetch (state->sheet, ++pos), cri);
} else {
int pos = cri->pos;
sheet_row_set_size_pts (state->sheet, cri->pos, size, cri->hard_size);
/* resize flags are already set only need to copy the sizes */
while (--count > 0)
col_row_copy (sheet_row_fetch (state->sheet, ++pos), cri);
colrow_copy (sheet_row_fetch (state->sheet, ++pos), cri);
}
}
......
......@@ -590,13 +590,13 @@ xml2ParseColRow (XML2ParseState *state, CHAR const **attrs, gboolean is_col)
sheet_col_set_size_pts (state->sheet, pos, size, cri->hard_size);
/* resize flags are already set only need to copy the sizes */
while (--count > 0)
col_row_copy (sheet_col_fetch (state->sheet, ++pos), cri);
colrow_copy (sheet_col_fetch (state->sheet, ++pos), cri);
} else {
int pos = cri->pos;
sheet_row_set_size_pts (state->sheet, cri->pos, size, cri->hard_size);
/* resize flags are already set only need to copy the sizes */
while (--count > 0)
col_row_copy (sheet_row_fetch (state->sheet, ++pos), cri);
colrow_copy (sheet_row_fetch (state->sheet, ++pos), cri);
}
}
......
......@@ -14,14 +14,14 @@
#include "sheet-private.h"
/**
* col_row_equal :
* colrow_equal :
* @a : ColRowInfo #1
* @b : ColRowInfo #2
*
* Returns true if the infos are equivalent.
*/
gboolean
col_row_equal (ColRowInfo const *a, ColRowInfo const *b)
colrow_equal (ColRowInfo const *a, ColRowInfo const *b)
{
if (a == NULL || b == NULL)
return FALSE;
......@@ -35,7 +35,7 @@ col_row_equal (ColRowInfo const *a, ColRowInfo const *b)
}
void
col_row_copy (ColRowInfo *dst, ColRowInfo const *src)
colrow_copy (ColRowInfo *dst, ColRowInfo const *src)
{
dst->margin_a = src->margin_a;
dst->margin_b = src->margin_b;
......@@ -46,7 +46,7 @@ col_row_copy (ColRowInfo *dst, ColRowInfo const *src)
}
/**
* col_row_foreach:
* colrow_foreach:
* @sheet the sheet
* @infos The Row or Column collection.
* @start start position (inclusive)
......@@ -60,8 +60,8 @@ col_row_copy (ColRowInfo *dst, ColRowInfo const *src)
* TRUE iteration stops.
*/
gboolean
col_row_foreach (ColRowCollection const *infos, int first, int last,
col_row_callback callback, void *user_data)
colrow_foreach (ColRowCollection const *infos, int first, int last,
ColRowHandler callback, void *user_data)
{
int i;
......@@ -95,7 +95,7 @@ typedef struct _ColRowIndex
} ColRowIndex;
ColRowSizeList *
col_row_size_list_destroy (ColRowSizeList *list)
colrow_size_list_destroy (ColRowSizeList *list)
{
ColRowSizeList *ptr;
for (ptr = list; ptr != NULL ; ptr = ptr->next)
......@@ -104,7 +104,7 @@ col_row_size_list_destroy (ColRowSizeList *list)
return NULL;
}
ColRowIndexList *
col_row_index_list_destroy (ColRowIndexList *list)
colrow_index_list_destroy (ColRowIndexList *list)
{
ColRowIndexList *ptr;
for (ptr = list; ptr != NULL ; ptr = ptr->next)
......@@ -120,13 +120,13 @@ colrow_index_compare (ColRowIndex const * a, ColRowIndex const * b)
}
/**
* col_row_get_index_list :
* colrow_get_index_list :
*
* Build an ordered list of pairs doing intelligent merging
* of overlapping regions.
*/
ColRowIndexList *
col_row_get_index_list (int first, int last, ColRowIndexList *list)
colrow_get_index_list (int first, int last, ColRowIndexList *list)
{
ColRowIndex *tmp, *prev;
GList *ptr;
......@@ -158,7 +158,7 @@ col_row_get_index_list (int first, int last, ColRowIndexList *list)
}
double *
col_row_save_sizes (Sheet *sheet, gboolean const is_cols, int first, int last)
colrow_save_sizes (Sheet *sheet, gboolean const is_cols, int first, int last)
{
int i;
double *res = NULL;
......@@ -204,8 +204,8 @@ cb_set_colrow_size (ColRowInfo *info, void *userdata)
}
ColRowSizeList *
col_row_set_sizes (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *src, int new_size)
colrow_set_sizes (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *src, int new_size)
{
int i;
ColRowSizeList *res = NULL;
......@@ -214,7 +214,7 @@ col_row_set_sizes (Sheet *sheet, gboolean const is_cols,
for (ptr = src; ptr != NULL ; ptr = ptr->next) {
ColRowIndex *index = ptr->data;
res = g_slist_prepend (res,
col_row_save_sizes (sheet, is_cols, index->first, index->last));
colrow_save_sizes (sheet, is_cols, index->first, index->last));
/* FIXME :
* If we are changing the size of more than half of the rows/col to
......@@ -242,8 +242,8 @@ col_row_set_sizes (Sheet *sheet, gboolean const is_cols,
closure.sheet = sheet;
closure.new_size = new_size;
closure.is_cols = is_cols;
col_row_foreach (&sheet->cols, 0, SHEET_MAX_COLS,
&cb_set_colrow_size, &closure);
colrow_foreach (&sheet->cols, 0, SHEET_MAX_COLS,
&cb_set_colrow_size, &closure);
return res;
}
......@@ -272,8 +272,8 @@ col_row_set_sizes (Sheet *sheet, gboolean const is_cols,
* reposition objects
*/
void
col_row_restore_sizes (Sheet *sheet, gboolean const is_cols,
int first, int last, double *sizes)
colrow_restore_sizes (Sheet *sheet, gboolean const is_cols,
int first, int last, double *sizes)
{
int i;
......@@ -324,10 +324,10 @@ col_row_restore_sizes (Sheet *sheet, gboolean const is_cols,
}
void
col_row_restore_sizes_group (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *selection,
ColRowSizeList *saved_sizes,
int old_size)
colrow_restore_sizes_group (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *selection,
ColRowSizeList *saved_sizes,
int old_size)
{
ColRowSizeList *ptr = saved_sizes;
while (selection != NULL && ptr != NULL) {
......@@ -346,9 +346,9 @@ col_row_restore_sizes_group (Sheet *sheet, gboolean const is_cols,
g_free (old_def);
}
col_row_restore_sizes (sheet, is_cols,
index->first, index->last,
ptr->data);
colrow_restore_sizes (sheet, is_cols,
index->first, index->last,
ptr->data);
selection = selection->next;
ptr = ptr->next;
......@@ -382,22 +382,22 @@ rows_height_update (Sheet *sheet, Range const * range)
/* FIXME : this needs to check font sizes and contents rather than
* just contents. Empty cells will cause resize also
*/
col_row_foreach (&sheet->rows, range->start.row, range->end.row,
&cb_autofit_height, sheet);
colrow_foreach (&sheet->rows, range->start.row, range->end.row,
&cb_autofit_height, sheet);
}
/*****************************************************************************/
struct row_col_visiblity
struct col_row_visiblity
{
gboolean is_cols, visible;
ColRowVisList *elements;
};
static void
cb_row_col_visibility (Sheet *sheet, Range const *r,
cb_col_row_visibility (Sheet *sheet, Range const *r,
void *closure)
{
struct row_col_visiblity * const dat = closure;
struct col_row_visiblity * const dat = closure;
gboolean const visible = dat->visible;
ColRowInfo * (*fetch) (Sheet *sheet, int pos);
int i, j, end;
......@@ -437,7 +437,7 @@ cb_row_col_visibility (Sheet *sheet, Range const *r,
}
/*
* col_row_get_visiblity_toggle :
* colrow_get_visiblity_toggle :
* @sheet : The sheet whose selection we are interested in.
* @is_cols: A flag indicating whether this it is a column or a row.
* @is_visible: Should we unhide or hide the cols/rows.
......@@ -446,21 +446,21 @@ cb_row_col_visibility (Sheet *sheet, Range const *r,
* pairs of row/col ranges that need to be hidden or unhiden.
*/
ColRowVisList *
col_row_get_visiblity_toggle (Sheet *sheet, gboolean const is_cols,
gboolean const visible)
colrow_get_visiblity_toggle (Sheet *sheet, gboolean const is_cols,
gboolean const visible)
{
struct row_col_visiblity closure;
struct col_row_visiblity closure;
closure.is_cols = is_cols;
closure.visible = visible;
closure.elements = NULL;
selection_apply (sheet, &cb_row_col_visibility, FALSE, &closure);
selection_apply (sheet, &cb_col_row_visibility, FALSE, &closure);
return closure.elements;
}
ColRowVisList *
col_row_vis_list_destroy (ColRowVisList *list)
colrow_vis_list_destroy (ColRowVisList *list)
{
ColRowVisList *ptr;
for (ptr = list; ptr != NULL ; ptr = ptr->next)
......@@ -470,14 +470,14 @@ col_row_vis_list_destroy (ColRowVisList *list)
}
/*
* col_row_set_visibility_list :
* colrow_set_visibility_list :
*
* This is the high level command that is wrapped by undo and redo.
* It should not be called by other commands.
*/
void
col_row_set_visibility_list (Sheet *sheet, gboolean const is_cols,
gboolean const visible, ColRowVisList *list)
colrow_set_visibility_list (Sheet *sheet, gboolean const is_cols,
gboolean const visible, ColRowVisList *list)
{
/* Trivial optimization */
if (list == NULL)
......@@ -486,8 +486,8 @@ col_row_set_visibility_list (Sheet *sheet, gboolean const is_cols,
for (; list != NULL ; list = list->next) {
int min_col, max_col;
ColRowIndex *info = list->data;
col_row_set_visibility (sheet, is_cols, visible,
info->first, info->last);
colrow_set_visibility (sheet, is_cols, visible,
info->first, info->last);
sheet_regen_adjacent_spans (sheet,
info->first, 0,
info->last, SHEET_MAX_ROWS-1,
......@@ -499,7 +499,7 @@ col_row_set_visibility_list (Sheet *sheet, gboolean const is_cols,
}
/**
* col_row_set_visibility:
* colrow_set_visibility:
* @sheet : the sheet
* @is_cols : Are we dealing with rows or columns.
* @visible : Make things visible or invisible.
......@@ -509,8 +509,8 @@ col_row_set_visibility_list (Sheet *sheet, gboolean const is_cols,
* Change the visibility of the selected range of contiguous rows/cols.
*/
void
col_row_set_visibility (Sheet *sheet, gboolean const is_cols, gboolean const visible,
int first, int last)
colrow_set_visibility (Sheet *sheet, gboolean const is_cols, gboolean const visible,
int first, int last)
{
int i;
g_return_if_fail (sheet != NULL);
......
......@@ -42,45 +42,45 @@ struct _ColRowCollection
struct _ColRowSegment
{
ColRowInfo *info [COLROW_SEGMENT_SIZE];
int needs_respan [(COLROW_SEGMENT_SIZE/sizeof(int)) + 1]; /* be safe */
};
#define COL_INTERNAL_WIDTH(col) ((col)->size_pixels - ((col)->margin_b + (col)->margin_a + 1))
gboolean col_row_equal (ColRowInfo const *a, ColRowInfo const *b);
void col_row_copy (ColRowInfo *dst, ColRowInfo const *src);
gboolean col_row_foreach (ColRowCollection const *infos,
int first, int last,
col_row_callback callback,
void *user_data);
gboolean colrow_equal (ColRowInfo const *a, ColRowInfo const *b);
void colrow_copy (ColRowInfo *dst, ColRowInfo const *src);
gboolean colrow_foreach (ColRowCollection const *infos,
int first, int last,
ColRowHandler callback,
void *user_data);
/* Support for Col/Row resizing */
ColRowSizeList *col_row_size_list_destroy (ColRowSizeList *list);
ColRowIndexList *col_row_index_list_destroy (ColRowIndexList *list);
ColRowIndexList *col_row_get_index_list (int first, int last, ColRowIndexList *list);
double *col_row_save_sizes (Sheet *sheet, gboolean const is_cols,
int first, int last);
ColRowSizeList *col_row_set_sizes (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *src, int new_size);
void col_row_restore_sizes (Sheet *sheet, gboolean const is_cols,
int first, int last, double *);
void col_row_restore_sizes_group (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *selection,
ColRowSizeList *saved_sizes,
int old_size);
void rows_height_update (Sheet *sheet, Range const *range);
ColRowSizeList *colrow_size_list_destroy (ColRowSizeList *list);
ColRowIndexList *colrow_index_list_destroy (ColRowIndexList *list);
ColRowIndexList *colrow_get_index_list (int first, int last,
ColRowIndexList *list);
double *colrow_save_sizes (Sheet *sheet, gboolean const is_cols,
int first, int last);
ColRowSizeList *colrow_set_sizes (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *src, int new_size);
void colrow_restore_sizes (Sheet *sheet, gboolean const is_cols,
int first, int last, double *);
void colrow_restore_sizes_group (Sheet *sheet, gboolean const is_cols,
ColRowIndexList *selection,
ColRowSizeList *saved_sizes,
int old_size);
/* Support for Col/Row visibility */
void col_row_set_visibility (Sheet *sheet, gboolean const is_col,
gboolean const visible,
int first, int last);
ColRowVisList *col_row_get_visiblity_toggle (Sheet *sheet, gboolean const is_col,
gboolean const visible);
ColRowVisList *col_row_vis_list_destroy (ColRowVisList *list);
void col_row_set_visibility_list (Sheet *sheet, gboolean const is_col,
gboolean const visible,
ColRowVisList *list);
void colrow_set_visibility (Sheet *sheet, gboolean const is_col,
gboolean const visible,
int first, int last);
ColRowVisList *colrow_get_visiblity_toggle (Sheet *sheet, gboolean const is_col,
gboolean const visible);
ColRowVisList *colrow_vis_list_destroy (ColRowVisList *list);
void colrow_set_visibility_list (Sheet *sheet, gboolean const is_col,
gboolean const visible,
ColRowVisList *list);
void rows_height_update (Sheet *sheet, Range const *range);
#endif /* GNUMERIC_COLROW_H */
......@@ -733,8 +733,8 @@ cmd_area_set_text (WorkbookControl *wbc, EvalPos const *pos,
/******************************************************************/
#define CMD_INS_DEL_ROW_COL_TYPE (cmd_ins_del_row_col_get_type ())
#define CMD_INS_DEL_ROW_COL(o) (GTK_CHECK_CAST ((o), CMD_INS_DEL_ROW_COL_TYPE, CmdInsDelRowCol))
#define CMD_INS_DEL_COLROW_TYPE (cmd_ins_del_colrow_get_type ())
#define CMD_INS_DEL_COLROW(o) (GTK_CHECK_CAST ((o), CMD_INS_DEL_COLROW_TYPE, CmdInsDelColRow))
typedef struct
{
......@@ -749,14 +749,14 @@ typedef struct
double *sizes;
CellRegion *contents;
GSList *reloc_storage;
} CmdInsDelRowCol;
} CmdInsDelColRow;
GNUMERIC_MAKE_COMMAND (CmdInsDelRowCol, cmd_ins_del_row_col);
GNUMERIC_MAKE_COMMAND (CmdInsDelColRow, cmd_ins_del_colrow);
static gboolean
cmd_ins_del_row_col_undo (GnumericCommand *cmd, WorkbookControl *wbc)
cmd_ins_del_colrow_undo (GnumericCommand *cmd, WorkbookControl *wbc)
{
CmdInsDelRowCol *me = CMD_INS_DEL_ROW_COL (cmd);
CmdInsDelColRow *me = CMD_INS_DEL_COLROW (cmd);
int index;
GSList *tmp = NULL;
gboolean trouble;
......@@ -782,7 +782,7 @@ cmd_ins_del_row_col_undo (GnumericCommand *cmd, WorkbookControl *wbc)
}
/* restore row/col sizes */
col_row_restore_sizes (me->sheet, me->is_cols, index, index + me->count - 1, me->sizes);
colrow_restore_sizes (me->sheet, me->is_cols, index, index + me->count - 1, me->sizes);
me->sizes = NULL;
/* restore row/col contents */
......@@ -818,9 +818,9 @@ cmd_ins_del_row_col_undo (GnumericCommand *cmd, WorkbookControl *wbc)
}
static gboolean
cmd_ins_del_row_col_redo (GnumericCommand *cmd, WorkbookControl *wbc)
cmd_ins_del_colrow_redo (GnumericCommand *cmd, WorkbookControl *wbc)
{
CmdInsDelRowCol *me = CMD_INS_DEL_ROW_COL (cmd);
CmdInsDelColRow *me = CMD_INS_DEL_COLROW (cmd);
Range r;
gboolean trouble;
int first, last;
......@@ -834,7 +834,7 @@ cmd_ins_del_row_col_redo (GnumericCommand *cmd, WorkbookControl *wbc)
: me->index;
last = first + me->count - 1;
me->sizes = col_row_save_sizes (me->sheet, me->is_cols, first, last);
me->sizes = colrow_save_sizes (me->sheet, me->is_cols, first, last);
me->contents = clipboard_copy_range (me->sheet,
(me->is_cols)
? range_init (&r, first, 0, last, SHEET_MAX_ROWS - 1)
......@@ -869,9 +869,9 @@ cmd_ins_del_row_col_redo (GnumericCommand *cmd, WorkbookControl *wbc)
}
static void
cmd_ins_del_row_col_destroy (GtkObject *cmd)
cmd_ins_del_colrow_destroy (GtkObject *cmd)
{
CmdInsDelRowCol *me = CMD_INS_DEL_ROW_COL (cmd);
CmdInsDelColRow *me = CMD_INS_DEL_COLROW (cmd);
if (me->sizes) {
g_free (me->sizes);
......@@ -889,18 +889,18 @@ cmd_ins_del_row_col_destroy (GtkObject *cmd)
}
static gboolean
cmd_ins_del_row_col (WorkbookControl *wbc,
cmd_ins_del_colrow (WorkbookControl *wbc,
Sheet *sheet,
gboolean is_cols, gboolean is_insert,
char const * descriptor, int index, int count)
{
GtkObject *obj;
CmdInsDelRowCol *me;
CmdInsDelColRow *me;
g_return_val_if_fail (sheet != NULL, TRUE);
obj = gtk_type_new (CMD_INS_DEL_ROW_COL_TYPE);
me = CMD_INS_DEL_ROW_COL (obj);
obj = gtk_type_new (CMD_INS_DEL_COLROW_TYPE);
me = CMD_INS_DEL_COLROW (obj);
/* Store the specs for the object */
me->sheet = sheet;
......@@ -927,8 +927,8 @@ cmd_insert_cols (WorkbookControl *wbc,
? _("Inserting %d columns before %s")
: _("Inserting %d column before %s"), count,
col_name (start_col));
return cmd_ins_del_row_col (wbc, sheet, TRUE, TRUE, mesg,
start_col, count);
return cmd_ins_del_colrow (wbc, sheet, TRUE, TRUE, mesg,
start_col, count);
}
gboolean
......@@ -939,8 +939,8 @@ cmd_insert_rows (WorkbookControl *wbc,
? _("Inserting %d rows before %d")
: _("Inserting %d row before %d"),
count, start_row+1);
return cmd_ins_del_row_col (wbc, sheet, FALSE, TRUE, mesg,
start_row, count);
return cmd_ins_del_colrow (wbc, sheet, FALSE, TRUE, mesg,
start_row, count);
}
gboolean
......@@ -958,7 +958,7 @@ cmd_delete_cols (WorkbookControl *wbc,
mesg = g_strdup_printf (_("Deleting column %s"),
col_name (start_col));
return cmd_ins_del_row_col (wbc, sheet, TRUE, FALSE, mesg, start_col, count);
return cmd_ins_del_colrow (wbc, sheet, TRUE, FALSE, mesg, start_col, count);
}
gboolean
......@@ -970,7 +970,7 @@ cmd_delete_rows (WorkbookControl *wbc,
start_row+count-1)
: g_strdup_printf (_("Deleting row %d"), start_row);
return cmd_ins_del_row_col (wbc, sheet, FALSE, FALSE, mesg, start_row, count);
return cmd_ins_del_colrow (wbc, sheet, FALSE, FALSE, mesg, start_row, count);
}
/******************************************************************/
......@@ -1530,8 +1530,8 @@ cmd_set_date_time (WorkbookControl *wbc,
/******************************************************************/
#define CMD_RESIZE_ROW_COL_TYPE (cmd_resize_row_col_get_type ())
#define CMD_RESIZE_ROW_COL(o) (GTK_CHECK_CAST ((o), CMD_RESIZE_ROW_COL_TYPE, CmdResizeRowCol))
#define CMD_RESIZE_COLROW_TYPE (cmd_resize_colrow_get_type ())
#define CMD_RESIZE_COLROW(o) (GTK_CHECK_CAST ((o), CMD_RESIZE_COLROW_TYPE, CmdResizeColRow))
typedef struct
{
......@@ -1542,22 +1542,22 @@ typedef struct
ColRowIndexList *selection;
ColRowSizeList *saved_sizes;
int new_size;
} CmdResizeRowCol;
} CmdResizeColRow;
GNUMERIC_MAKE_COMMAND (CmdResizeRowCol, cmd_resize_row_col);
GNUMERIC_MAKE_COMMAND (CmdResizeColRow, cmd_resize_colrow);
static gboolean
cmd_resize_row_col_undo (GnumericCommand *cmd, WorkbookControl *wbc)
cmd_resize_colrow_undo (GnumericCommand *cmd, WorkbookControl *wbc)
{
CmdResizeRowCol *me = CMD_RESIZE_ROW_COL (cmd);
CmdResizeColRow *me = CMD_RESIZE_COLROW (cmd);
g_return_val_if_fail (me != NULL, TRUE);
g_return_val_if_fail (me->selection != NULL, TRUE);
g_return_val_if_fail (me->saved_sizes != NULL, TRUE);
col_row_restore_sizes_group (me->sheet, me->is_cols,
me->selection, me->saved_sizes,
me->new_size);
colrow_restore_sizes_group (me->sheet, me->is_cols,
me->selection, me->saved_sizes,
me->new_size);
me->saved_sizes = NULL;
sheet_set_dirty (me->sheet, TRUE);
......@@ -1567,16 +1567,16 @@ cmd_resize_row_col_undo (GnumericCommand *cmd, WorkbookControl *wbc)