/* * 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 colrow_set_visibility_list (Sheet *sheet, gboolean is_cols, gboolean visible, ColRowVisList *list) { ColRowVisList *ptr; ColRowIndex *info; for (ptr = list; ptr != NULL ; ptr = ptr->next) { info = ptr->data; colrow_set_visibility (sheet, is_cols, visible, info->first, info->last); } if (visible) sheet_colrow_optimize (sheet); if (is_cols) sheet_queue_respan (sheet, 0, gnm_sheet_get_last_row (sheet)); if (list != NULL) sheet_redraw_all (sheet, TRUE); }
static void resize_columns (Sheet *sheet) { GnmRange r; if (gnm_debug_flag ("stf")) g_printerr ("Auto-fitting columns...\n"); /* If we have lots of rows, auto-fitting will take a very long time. It is probably better to look at only, say, 1000 rows of data. */ range_init_full_sheet (&r, sheet); r.end.row = MIN (r.end.row, 1000); colrow_autofit (sheet, &r, TRUE, TRUE, /* Ignore strings */ TRUE, /* Don't shrink */ TRUE, /* Don't shrink */ NULL, NULL); if (gnm_debug_flag ("stf")) g_printerr ("Auto-fitting columns... done\n"); sheet_queue_respan (sheet, 0, gnm_sheet_get_last_row (sheet)); }