Commit 819a535b authored by Morten Welinder's avatar Morten Welinder

Code cleanup

parent 74ede8cf
......@@ -1011,7 +1011,7 @@ applix_read_view (ApplixReadState *state, unsigned char *buffer)
GnmCellPos pos;
if (applix_parse_cellref (state, buffer+15, &sheet, &pos, ':') &&
valid_cellpos (sheet, &pos))
sv_set_initial_top_left (sheet_get_view (sheet, state->wb_view),
gnm_sheet_view_set_initial_top_left (sheet_get_view (sheet, state->wb_view),
pos.col, pos.row);
} else if (!a_strncmp (buffer, "View Open Cell: ")) {
GnmCellPos pos;
......
......@@ -5090,8 +5090,8 @@ excel_read_PANE (BiffQuery *q, ExcelReadSheet *esheet, WorkbookView *wb_view)
unfrozen.row += y;
else
rwTop = sv->initial_top_left.row;
sv_freeze_panes (sv, &frozen, &unfrozen);
sv_set_initial_top_left (sv, colLeft, rwTop);
gnm_sheet_view_freeze_panes (sv, &frozen, &unfrozen);
gnm_sheet_view_set_initial_top_left (sv, colLeft, rwTop);
} else {
g_warning ("EXCEL : no support for split panes yet (%s)", esheet->sheet->name_unquoted);
}
......@@ -5178,11 +5178,11 @@ excel_read_WINDOW2 (BiffQuery *q, ExcelReadSheet *esheet, WorkbookView *wb_view)
/* until we import multiple views unfreeze just in case a previous view
* had frozen */
sv_freeze_panes (sv, NULL, NULL);
gnm_sheet_view_freeze_panes (sv, NULL, NULL);
/* NOTE : This is top left of screen even if frozen, modify when
* we read PANE */
sv_set_initial_top_left (sv, left_col, top_row);
gnm_sheet_view_set_initial_top_left (sv, left_col, top_row);
}
static void
......
......@@ -811,7 +811,7 @@ excel_write_WINDOW2 (BiffPut *bp, ExcelWriteSheet *esheet, SheetView *sv)
options |= 0x0002;
if (!sheet->hide_col_header || !sheet->hide_row_header)
options |= 0x0004;
if (sv_is_frozen (sv))
if (gnm_sheet_view_is_frozen (sv))
options |= 0x0108;
if (!sheet->hide_zero)
options |= 0x0010;
......@@ -851,7 +851,7 @@ excel_write_WINDOW2 (BiffPut *bp, ExcelWriteSheet *esheet, SheetView *sv)
style_color_unref (sheet_auto);
style_color_unref (default_auto);
if (sv_is_frozen (sv)) {
if (gnm_sheet_view_is_frozen (sv)) {
data = ms_biff_put_len_next (bp, BIFF_PANE, 10);
if (sv->unfrozen_top_left.col > 0)
......
......@@ -2887,10 +2887,10 @@ xlsx_CT_SheetView_begin (GsfXMLIn *xin, xmlChar const **attrs)
/* until we import multiple views unfreeze just in case a previous view
* had frozen */
sv_freeze_panes (state->sv, NULL, NULL);
gnm_sheet_view_freeze_panes (state->sv, NULL, NULL);
if (topLeft.col >= 0)
sv_set_initial_top_left (state->sv, topLeft.col, topLeft.row);
gnm_sheet_view_set_initial_top_left (state->sv, topLeft.col, topLeft.row);
g_object_set (state->sheet,
"text-is-rtl", rightToLeft,
"display-formulas", showFormulas,
......@@ -2990,7 +2990,7 @@ xlsx_CT_Selection (GsfXMLIn *xin, xmlChar const **attrs)
sv_selection_add_range (state->sv, ptr->data);
g_free (ptr->data);
}
sv_set_edit_pos (state->sv, &edit_pos);
gnm_sheet_view_set_edit_pos (state->sv, &edit_pos);
g_slist_free (accum);
}
}
......@@ -3108,8 +3108,8 @@ xlsx_CT_Pane (GsfXMLIn *xin, xmlChar const **attrs)
unfrozen.row += ySplit;
else
topLeft.row = state->sv->initial_top_left.row;
sv_freeze_panes (state->sv, &frozen, &unfrozen);
sv_set_initial_top_left (state->sv, topLeft.col, topLeft.row);
gnm_sheet_view_freeze_panes (state->sv, &frozen, &unfrozen);
gnm_sheet_view_set_initial_top_left (state->sv, topLeft.col, topLeft.row);
}
}
......
......@@ -1446,7 +1446,7 @@ xlsx_write_sheet_view (GsfXMLOut *xml, SheetView const *sv)
style_color_unref (sheet_auto);
style_color_unref (default_auto);
if (sv_is_frozen (sv)) {
if (gnm_sheet_view_is_frozen (sv)) {
activePane = "bottomRight"; /* h&v freeze */
gsf_xml_out_start_element (xml, "pane");
......
......@@ -11250,7 +11250,7 @@ odf_selection_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
OOParseState *state = (OOParseState *)xin->user_state;
sv_set_edit_pos (sheet_get_view (state->pos.sheet, state->wb_view), &state->pos.eval);
gnm_sheet_view_set_edit_pos (sheet_get_view (state->pos.sheet, state->wb_view), &state->pos.eval);
}
......@@ -11511,7 +11511,7 @@ odf_apply_ooo_table_config (char const *key, GValue *val, OOParseState *state)
sv_selection_reset (sv);
sv_selection_add_range (sv, &r);
sv_set_edit_pos
gnm_sheet_view_set_edit_pos
(sheet_get_view (sheet, state->wb_view),
&pos);
}
......@@ -11554,7 +11554,7 @@ odf_apply_ooo_table_config (char const *key, GValue *val, OOParseState *state)
GnmCellPos fpos = {0, 0};
pos.col = hsp;
pos.row = vsp;
sv_freeze_panes (sv, &fpos, &pos);
gnm_sheet_view_freeze_panes (sv, &fpos, &pos);
}
item = g_hash_table_lookup (hash, "PositionRight");
......@@ -11568,7 +11568,7 @@ odf_apply_ooo_table_config (char const *key, GValue *val, OOParseState *state)
if (item != NULL && G_VALUE_HOLDS(item, G_TYPE_INT))
pos_bottom = g_value_get_int (item);
sv_set_initial_top_left (sv, pos_left, pos_bottom);
gnm_sheet_view_set_initial_top_left (sv, pos_left, pos_bottom);
}
}
}
......
......@@ -6200,7 +6200,7 @@ odf_write_ooo_settings (GnmOOExport *state)
odf_add_bool (state->xml, NULL, !sheet->hide_zero);
gsf_xml_out_end_element (state->xml); /* </config:config-item> */
if (sv_is_frozen (sv)) {
if (gnm_sheet_view_is_frozen (sv)) {
gsf_xml_out_start_element (state->xml, CONFIG "config-item");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "HorizontalSplitMode");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "short");
......
......@@ -291,7 +291,6 @@ src/stf-export.c
src/stf-parse.c
src/stf.c
src/style.c
src/test-pango.c
src/tools/analysis-anova.c
src/tools/analysis-auto-expression.c
src/tools/analysis-chi-squared.c
......
......@@ -350,7 +350,6 @@ src/stf-export.c
src/stf-parse.c
src/stf.c
src/style.c
src/test-pango.c
src/tools/analysis-anova.c
src/tools/analysis-auto-expression.c
src/tools/analysis-chi-squared.c
......
......@@ -27,8 +27,6 @@ sstest
sstest.exe
ssdiff
ssdiff.exe
test-pango
test-pango.exe
GNOME_Gnumeric-gtk.xml
libspreadsheet.def
local.def
......
......@@ -27,7 +27,6 @@ noinst_HEADERS = dead-kittens.h compilation.h gnm-i18n.h
if WITH_GTK
SUBDIRS += dialogs widgets
bin_PROGRAMS += gnumeric
check_PROGRAMS += test-pango
endif
bin_PROGRAMS += ssconvert ssindex ssgrep ssdiff
......@@ -388,11 +387,6 @@ ssdiff_LDFLAGS = -export-dynamic
ssdiff_SOURCES = \
ssdiff.c
test_pango_LDADD = $(gnumeric_LDADD)
test_pango_LDFLAGS = -export-dynamic
test_pango_SOURCES = \
test-pango.c
if WITH_NATIVE_WIN32
gnumeric_LDADD += gnumeric_rc.o
gnumeric_LDFLAGS += -mwindows -Wl,--stack,0x4000000
......
......@@ -186,11 +186,11 @@ gnm_app_clipboard_clear (gboolean drop_selection)
app->clipboard_copied_contents = NULL;
}
if (app->clipboard_sheet_view != NULL) {
sv_unant (app->clipboard_sheet_view);
gnm_sheet_view_unant (app->clipboard_sheet_view);
g_signal_emit (G_OBJECT (app), signals[CLIPBOARD_MODIFIED], 0);
sv_weak_unref (&(app->clipboard_sheet_view));
gnm_sheet_view_weak_unref (&(app->clipboard_sheet_view));
/* Release the selection */
if (drop_selection)
......@@ -214,7 +214,7 @@ gnm_app_clipboard_unant (void)
g_return_if_fail (app != NULL);
if (app->clipboard_sheet_view != NULL)
sv_unant (app->clipboard_sheet_view);
gnm_sheet_view_unant (app->clipboard_sheet_view);
}
/**
......@@ -244,7 +244,7 @@ gnm_app_clipboard_cut_copy (WorkbookControl *wbc, gboolean is_cut,
{
Sheet *sheet;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
g_return_if_fail (area != NULL);
g_return_if_fail (app != NULL);
......@@ -252,14 +252,14 @@ gnm_app_clipboard_cut_copy (WorkbookControl *wbc, gboolean is_cut,
sheet = sv_sheet (sv);
g_free (app->clipboard_cut_range);
app->clipboard_cut_range = gnm_range_dup (area);
sv_weak_ref (sv, &(app->clipboard_sheet_view));
gnm_sheet_view_weak_ref (sv, &(app->clipboard_sheet_view));
if (!is_cut)
app->clipboard_copied_contents =
clipboard_copy_range (sheet, area);
if (animate_cursor) {
GList *l = g_list_append (NULL, (gpointer)area);
sv_ant (sv, l);
gnm_sheet_view_ant (sv, l);
g_list_free (l);
}
......@@ -284,14 +284,14 @@ void
gnm_app_clipboard_cut_copy_obj (WorkbookControl *wbc, gboolean is_cut,
SheetView *sv, GSList *objects)
{
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
g_return_if_fail (objects != NULL);
g_return_if_fail (app != NULL);
gnm_app_clipboard_clear (FALSE);
g_free (app->clipboard_cut_range);
app->clipboard_cut_range = NULL;
sv_weak_ref (sv, &(app->clipboard_sheet_view));
gnm_sheet_view_weak_ref (sv, &(app->clipboard_sheet_view));
app->clipboard_copied_contents
= clipboard_copy_obj (sv_sheet (sv), objects);
if (is_cut) {
......
......@@ -146,7 +146,7 @@ sv_select_cur_depends (SheetView *sv)
GnmCell *cur_cell, dummy;
GList *deps = NULL, *ptr = NULL;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
cur_cell = sheet_cell_get (sv->sheet,
sv->edit_pos.col, sv->edit_pos.row);
......@@ -238,7 +238,7 @@ sv_select_cur_inputs (SheetView *sv)
GSList *ranges, *ptr;
GnmEvalPos ep;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
cell = sheet_cell_get (sv->sheet,
sv->edit_pos.col, sv->edit_pos.row);
......
......@@ -281,7 +281,7 @@ select_range (Sheet *sheet, const GnmRange *r, WorkbookControl *wbc)
sv = sheet_get_view (sheet, wb_control_view (wbc));
sv_selection_reset (sv);
sv_selection_add_range (sv, r);
sv_make_cell_visible (sv, r->start.col, r->start.row, FALSE);
gnm_sheet_view_make_cell_visible (sv, r->start.col, r->start.row, FALSE);
}
/*
......@@ -304,7 +304,7 @@ select_selection (Sheet *sheet, GSList *selection, WorkbookControl *wbc)
sv_selection_add_range (sv, r);
r0 = r;
}
sv_make_cell_visible (sv, r0->start.col, r0->start.row, FALSE);
gnm_sheet_view_make_cell_visible (sv, r0->start.col, r0->start.row, FALSE);
}
/**
......@@ -1388,7 +1388,7 @@ cmd_ins_del_colrow_finalize (GObject *cmd)
g_free (me->cutcopied);
sv_weak_unref (&(me->cut_copy_view));
gnm_sheet_view_weak_unref (&(me->cut_copy_view));
gnm_command_finalize (cmd);
}
......@@ -1441,7 +1441,7 @@ cmd_ins_del_colrow (WorkbookControl *wbc,
sheet == gnm_app_clipboard_sheet_get ()) {
me->cutcopied = gnm_range_dup (gnm_app_clipboard_area_get ());
me->is_cut = gnm_app_clipboard_is_cut ();
sv_weak_ref (gnm_app_clipboard_sheet_view_get (),
gnm_sheet_view_weak_ref (gnm_app_clipboard_sheet_view_get (),
&(me->cut_copy_view));
} else
me->cutcopied = NULL;
......@@ -7738,7 +7738,7 @@ gboolean
cmd_autofilter_add_remove (WorkbookControl *wbc)
{
SheetView *sv = wb_control_cur_sheet_view (wbc);
GnmFilter *f = sv_editpos_in_filter (sv);
GnmFilter *f = gnm_sheet_view_editpos_in_filter (sv);
gboolean add = (f == NULL);
char *descr = NULL, *name = NULL;
GOUndo *undo = NULL;
......
......@@ -2884,7 +2884,7 @@ workbook_recalc (Workbook *wb)
*/
if (redraw) {
WORKBOOK_FOREACH_SHEET (wb, sheet, {
SHEET_FOREACH_VIEW (sheet, sv, sv_flag_selection_change (sv););
SHEET_FOREACH_VIEW (sheet, sv, gnm_sheet_view_flag_selection_change (sv););
sheet_redraw_all (sheet, FALSE);});
}
}
......
......@@ -237,7 +237,7 @@ dialog_data_slicer (WBCGtk *wbcg, gboolean create)
state->dialog = go_gtk_builder_get_widget (gui, "dialog_data_slicer");
state->notebook = go_gtk_builder_get_widget (gui, "notebook");
state->slicer = create ? NULL : sv_editpos_in_slicer (state->sv);
state->slicer = create ? NULL : gnm_sheet_view_editpos_in_slicer (state->sv);
state->cache = NULL;
state->source = NULL;
......
......@@ -295,10 +295,10 @@ cursor_change (GtkTreeView *tree_view, DialogState *dd)
if (wb_control_cur_sheet (wbc) != item->ep.sheet)
wb_view_sheet_focus (wbv, item->ep.sheet);
sv = wb_view_cur_sheet_view (wbv);
sv_set_edit_pos (sv, &item->ep.eval);
gnm_sheet_view_set_edit_pos (sv, &item->ep.eval);
sv_selection_set (sv, &item->ep.eval, col, row, col, row);
sv_make_cell_visible (sv, col, row, FALSE);
sv_update (sv);
gnm_sheet_view_make_cell_visible (sv, col, row, FALSE);
gnm_sheet_view_update (sv);
}
}
......
......@@ -788,10 +788,10 @@ find_and_focus (GnmRangeRef const *loc, SheetView *avoid)
if (wb_view_cur_sheet (view) != loc_sheet)
continue;
sv_set_edit_pos (sv, &r.start);
gnm_sheet_view_set_edit_pos (sv, &r.start);
sv_selection_set (sv, &r.start, col, row, col, row);
sv_make_cell_visible (sv, col, row, FALSE);
sv_update (sv);
gnm_sheet_view_make_cell_visible (sv, col, row, FALSE);
gnm_sheet_view_update (sv);
return sv;
});
return NULL;
......
......@@ -39,11 +39,11 @@ gnm_cell_combo_set_sv (GnmCellCombo *ccombo, SheetView *sv)
return;
if (NULL != ccombo->sv)
sv_weak_unref (&ccombo->sv);
gnm_sheet_view_weak_unref (&ccombo->sv);
ccombo->sv = sv;
if (sv)
sv_weak_ref (sv, &ccombo->sv);
gnm_sheet_view_weak_ref (sv, &ccombo->sv);
}
static void
......@@ -119,7 +119,7 @@ gnm_cell_combo_class_init (GObjectClass *gobject_class)
g_object_class_install_property (gobject_class, PROP_SV,
g_param_spec_object ("sheet-view", NULL, NULL,
GNM_SV_TYPE, GSF_PARAM_STATIC | G_PARAM_READWRITE));
GNM_SHEET_VIEW_TYPE, GSF_PARAM_STATIC | G_PARAM_READWRITE));
}
GSF_CLASS_ABSTRACT (GnmCellCombo, gnm_cell_combo,
......
......@@ -363,7 +363,7 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *kevent,
if (gnm_pane_guru_key (wbcg, event))
break;
if (state == GDK_CONTROL_MASK)
sv_selection_copy (sv, GNM_WBC (wbcg));
gnm_sheet_view_selection_copy (sv, GNM_WBC (wbcg));
else if (state == GDK_SHIFT_MASK)
cmd_paste_to_selection (GNM_WBC (wbcg), sv, PASTE_DEFAULT);
break;
......@@ -394,7 +394,7 @@ gnm_pane_key_mode_sheet (GnmPane *pane, GdkEventKey *kevent,
break;
if (state == GDK_SHIFT_MASK) {
scg_mode_edit (scg);
sv_selection_cut (sv, GNM_WBC (wbcg));
gnm_sheet_view_selection_cut (sv, GNM_WBC (wbcg));
} else
cmd_selection_clear (GNM_WBC (wbcg), CLEAR_VALUES);
break;
......
......@@ -284,7 +284,7 @@ gnm_hlink_cur_wb_activate (GnmHLink *lnk, WBCGtk *wbcg)
sv_selection_set (sv, &sr.range.start,
sr.range.start.col, sr.range.start.row,
sr.range.end.col, sr.range.end.row);
sv_make_cell_visible (sv, sr.range.start.col, sr.range.start.row, FALSE);
gnm_sheet_view_make_cell_visible (sv, sr.range.start.col, sr.range.start.row, FALSE);
if (wbcg_cur_sheet (wbcg) != sr.sheet)
wb_view_sheet_focus (wb_control_view (wbc), sr.sheet);
......
......@@ -761,7 +761,7 @@ item_cursor_do_action (GnmItemCursor *ic, ActionType action)
switch (action) {
case ACTION_COPY_CELLS:
if (!sv_selection_copy (sv, wbc))
if (!gnm_sheet_view_selection_copy (sv, wbc))
break;
cmd_paste (wbc,
paste_target_init (&pt, sheet, &ic->pos,
......@@ -769,7 +769,7 @@ item_cursor_do_action (GnmItemCursor *ic, ActionType action)
break;
case ACTION_MOVE_CELLS:
if (!sv_selection_cut (sv, wbc))
if (!gnm_sheet_view_selection_cut (sv, wbc))
break;
cmd_paste (wbc,
paste_target_init (&pt, sheet, &ic->pos,
......@@ -777,7 +777,7 @@ item_cursor_do_action (GnmItemCursor *ic, ActionType action)
break;
case ACTION_COPY_FORMATS:
if (!sv_selection_copy (sv, wbc))
if (!gnm_sheet_view_selection_copy (sv, wbc))
break;
cmd_paste (wbc,
paste_target_init (&pt, sheet, &ic->pos,
......@@ -785,7 +785,7 @@ item_cursor_do_action (GnmItemCursor *ic, ActionType action)
break;
case ACTION_COPY_VALUES:
if (!sv_selection_copy (sv, wbc))
if (!gnm_sheet_view_selection_copy (sv, wbc))
break;
cmd_paste (wbc,
paste_target_init (&pt, sheet, &ic->pos,
......
......@@ -991,7 +991,7 @@ item_grid_button_pressed (GocItem *item, int button, double x_, double y_)
(already_selected && (event->button.state & GDK_CONTROL_MASK)) ?
GNM_SELECTION_MODE_REMOVE :
GNM_SELECTION_MODE_ADD);
sv_make_cell_visible (sv, pos.col, pos.row, FALSE);
gnm_sheet_view_make_cell_visible (sv, pos.col, pos.row, FALSE);
} else sv_selection_extend_to (sv, pos.col, pos.row);
sheet_update (sheet);
}
......
......@@ -159,7 +159,7 @@ GnmEvalPos *
eval_pos_init_editpos (GnmEvalPos *ep, SheetView const *sv)
{
g_return_val_if_fail (ep != NULL, NULL);
g_return_val_if_fail (GNM_IS_SV (sv), NULL);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), NULL);
return eval_pos_init (ep, sv_sheet (sv),
sv->edit_pos.col, sv->edit_pos.row);
......@@ -332,7 +332,7 @@ parse_pos_init_evalpos (GnmParsePos *pp, GnmEvalPos const *ep)
GnmParsePos *
parse_pos_init_editpos (GnmParsePos *pp, SheetView const *sv)
{
g_return_val_if_fail (GNM_IS_SV (sv), NULL);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), NULL);
return parse_pos_init (pp, NULL, sv_sheet (sv),
sv->edit_pos.col, sv->edit_pos.row);
......
......@@ -191,7 +191,7 @@ sv_is_colrow_selected (SheetView const *sv, int colrow, gboolean is_col)
{
GSList *l;
g_return_val_if_fail (GNM_IS_SV (sv), FALSE);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), FALSE);
for (l = sv_selection_calc_simplification (sv);
l != NULL; l = l->next) {
......@@ -227,7 +227,7 @@ sv_is_full_colrow_selected (SheetView const *sv, gboolean is_cols, int index)
GSList *l;
gboolean found = FALSE;
g_return_val_if_fail (GNM_IS_SV (sv), FALSE);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), FALSE);
for (l = sv_selection_calc_simplification (sv);
l != NULL; l = l->next){
......@@ -262,7 +262,7 @@ sv_selection_col_type (SheetView const *sv, int col)
GnmRange const *sr;
int ret = COL_ROW_NO_SELECTION;
g_return_val_if_fail (GNM_IS_SV (sv), COL_ROW_NO_SELECTION);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), COL_ROW_NO_SELECTION);
if (sv->selections == NULL)
return COL_ROW_NO_SELECTION;
......@@ -298,7 +298,7 @@ sv_selection_row_type (SheetView const *sv, int row)
GnmRange const *sr;
int ret = COL_ROW_NO_SELECTION;
g_return_val_if_fail (GNM_IS_SV (sv), COL_ROW_NO_SELECTION);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), COL_ROW_NO_SELECTION);
if (sv->selections == NULL)
return COL_ROW_NO_SELECTION;
......@@ -364,7 +364,7 @@ sv_menu_enable_insert (SheetView *sv, gboolean col, gboolean row)
{
int flags = 0;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
if (sv->enable_insert_cols != col) {
flags |= MS_INSERT_COLS;
......@@ -403,7 +403,7 @@ selection_first_range (SheetView const *sv,
GnmRange const *r;
GSList *l;
g_return_val_if_fail (GNM_IS_SV (sv), NULL);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), NULL);
l = sv->selections;
......@@ -500,13 +500,13 @@ sheet_selection_set_internal (SheetView *sv,
*ss = new_sel;
/* Set the cursor boundary */
sv_cursor_set (sv, edit,
gnm_sheet_view_cursor_set (sv, edit,
base_col, base_row,
move_col, move_row, ss);
if (just_add_it) {
sv_redraw_range (sv, &new_sel);
sv_redraw_headers (sv, TRUE, TRUE, &new_sel);
gnm_sheet_view_redraw_range (sv, &new_sel);
gnm_sheet_view_redraw_headers (sv, TRUE, TRUE, &new_sel);
goto set_menu_flags;
}
......@@ -519,11 +519,11 @@ sheet_selection_set_internal (SheetView *sv,
ranges = range_fragment (&old_sel, &new_sel);
for (l = ranges->next; l; l = l->next)
sv_redraw_range (sv, l->data);
gnm_sheet_view_redraw_range (sv, l->data);
range_fragment_free (ranges);
} else {
sv_redraw_range (sv, &old_sel);
sv_redraw_range (sv, &new_sel);
gnm_sheet_view_redraw_range (sv, &old_sel);
gnm_sheet_view_redraw_range (sv, &new_sel);
}
/* Has the entire row been selected/unselected */
......@@ -531,7 +531,7 @@ sheet_selection_set_internal (SheetView *sv,
(old_sel.start.row == 0 && old_sel.end.row == gnm_sheet_get_last_row (sv->sheet)))
|| sv->selection_mode != GNM_SELECTION_MODE_ADD) {
GnmRange tmp = range_union (&new_sel, &old_sel);
sv_redraw_headers (sv, TRUE, FALSE, &tmp);
gnm_sheet_view_redraw_headers (sv, TRUE, FALSE, &tmp);
} else {
GnmRange tmp = new_sel;
int diff;
......@@ -545,7 +545,7 @@ sheet_selection_set_internal (SheetView *sv,
tmp.end.col = old_sel.start.col;
tmp.start.col = new_sel.start.col;
}
sv_redraw_headers (sv, TRUE, FALSE, &tmp);
gnm_sheet_view_redraw_headers (sv, TRUE, FALSE, &tmp);
}
diff = new_sel.end.col - old_sel.end.col;
if (diff != 0) {
......@@ -556,7 +556,7 @@ sheet_selection_set_internal (SheetView *sv,
tmp.end.col = old_sel.end.col;
tmp.start.col = new_sel.end.col;
}
sv_redraw_headers (sv, TRUE, FALSE, &tmp);
gnm_sheet_view_redraw_headers (sv, TRUE, FALSE, &tmp);
}
}
......@@ -565,7 +565,7 @@ sheet_selection_set_internal (SheetView *sv,
(old_sel.start.col == 0 && old_sel.end.col == gnm_sheet_get_last_col (sv->sheet)))
|| sv->selection_mode != GNM_SELECTION_MODE_ADD) {
GnmRange tmp = range_union (&new_sel, &old_sel);
sv_redraw_headers (sv, FALSE, TRUE, &tmp);
gnm_sheet_view_redraw_headers (sv, FALSE, TRUE, &tmp);
} else {
GnmRange tmp = new_sel;
int diff;
......@@ -579,7 +579,7 @@ sheet_selection_set_internal (SheetView *sv,
tmp.end.row = old_sel.start.row;
tmp.start.row = new_sel.start.row;
}
sv_redraw_headers (sv, FALSE, TRUE, &tmp);
gnm_sheet_view_redraw_headers (sv, FALSE, TRUE, &tmp);
}
diff = new_sel.end.row - old_sel.end.row;
......@@ -591,12 +591,12 @@ sheet_selection_set_internal (SheetView *sv,
tmp.end.row = old_sel.end.row;
tmp.start.row = new_sel.end.row;
}
sv_redraw_headers (sv, FALSE, TRUE, &tmp);
gnm_sheet_view_redraw_headers (sv, FALSE, TRUE, &tmp);
}
}
set_menu_flags:
sv_flag_selection_change (sv);
gnm_sheet_view_flag_selection_change (sv);
/*
* Now see if there is some selection which selects a
......@@ -636,7 +636,7 @@ sv_selection_set (SheetView *sv, GnmCellPos const *edit,
int base_col, int base_row,
int move_col, int move_row)
{
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
sheet_selection_set_internal (sv, edit,
base_col, base_row,
......@@ -688,7 +688,7 @@ sv_selection_add_full (SheetView *sv,
GnmRange *ss;
GnmCellPos edit;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
sv_selection_simplify (sv);
/* Create and prepend new selection */
......@@ -761,7 +761,7 @@ sv_selection_reset (SheetView *sv)
{
GSList *list, *tmp;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
/* Empty the sheets selection */
list = sv->selections;
......@@ -771,8 +771,8 @@ sv_selection_reset (SheetView *sv)
/* Redraw the grid, & headers for each region */
for (tmp = list; tmp; tmp = tmp->next){
GnmRange *ss = tmp->data;
sv_redraw_range (sv, ss);
sv_redraw_headers (sv, TRUE, TRUE, ss);
gnm_sheet_view_redraw_range (sv, ss);
gnm_sheet_view_redraw_headers (sv, TRUE, TRUE, ss);
g_free (ss);
}
......@@ -1094,7 +1094,7 @@ sv_selection_apply (SheetView *sv, SelectionApplyFunc const func,
GSList *l;
GSList *proposed = NULL;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
if (allow_intersection) {
for (l = sv_selection_calc_simplification (sv);
......@@ -1154,7 +1154,7 @@ sv_selection_apply_in_order (SheetView *sv, SelectionApplyFunc const func,
{
GSList *l, *reverse;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
reverse = g_slist_copy (sv_selection_calc_simplification (sv));
reverse = g_slist_reverse (reverse);
......@@ -1202,7 +1202,7 @@ sv_selection_foreach (SheetView *sv,
{
GSList *l;
g_return_val_if_fail (GNM_IS_SV (sv), FALSE);
g_return_val_if_fail (GNM_IS_SHEET_VIEW (sv), FALSE);
for (l = sv_selection_calc_simplification (sv); l != NULL; l = l->next) {
GnmRange *ss = l->data;
......@@ -1339,7 +1339,7 @@ sv_selection_walk_step (SheetView *sv, gboolean forward, gboolean horizontal)
gboolean is_singleton = FALSE;
GSList *selections;
g_return_if_fail (GNM_IS_SV (sv));
g_return_if_fail (GNM_IS_SHEET_VIEW (sv));
g_return_if_fail (sv->selections != NULL);
selections = sv_selection_calc_simplification (sv);
......@@ -1392,7 +1392,7 @@ sv_selection_walk_step (SheetView *sv, gboolean forward, gboolean horizontal)
sv_selection_set (sv, &destination,
destination.col, destination.row,
destination.col, destination.row);
sv_make_cell_visible (sv, sv->edit_pos.col,
gnm_sheet_view_make_cell_visible (sv, sv->edit_pos.col,
sv->edit_pos.row, FALSE);
if (horizontal)
sv->first_tab_col = (first_tab_col < 0 || cur_col < first_tab_col) ? cur_col : first_tab_col;
......@@ -1417,13 +1417,13 @@ sv_selection_walk_step (SheetView *sv, gboolean forward, gboolean horizontal)
destination = ss->end;
}
if (selections_count != 1)
sv_cursor_set (sv, &destination,
gnm_sheet_view_cursor_set (sv, &destination,
ss->start.col, ss->start.row,
ss->end.col, ss->end.row, NULL);
}
sv_set_edit_pos (sv, &destination);
sv_make_cell_visible (sv, destination.col, destination.row, FALSE);
gnm_sheet_view_set_edit_pos (sv, &destination);
gnm_sheet_view_make_cell_visible (sv, destination.col, destination.row, FALSE);
}
#include <goffice/goffice.h>
......
......@@ -385,7 +385,7 @@ scg_resize (SheetControlGUI *scg, G_GNUC_UNUSED gboolean force_scroll)
scg->pane[0]->row.item, FALSE,
-1, btn_h, scg->row_group.buttons, scg->row_group.button_box);
if (scg->active_panes != 1 && sv_is_frozen (scg_view (scg))) {
if (scg->active_panes != 1 && gnm_sheet_view_is_frozen (scg_view (scg))) {
GnmCellPos const *tl = &scg_view (scg)->frozen_top_left;
GnmCellPos const *br = &scg_view (scg)->unfrozen_top_left;
int const l = scg_colrow_distance_get (scg, TRUE,
......@@ -521,7 +521,7 @@ scg_scrollbar_config_real (SheetControl const *sc)