Commit 9a397890 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

returns a const to make it clear not to touch the result. update. update.

2006-04-30  Jody Goldberg <jody@gnome.org>

	* src/sheet-style.c (sheet_style_get) : returns a const to make it
	  clear not to touch the result.
	* src/workbook-view.c (wb_view_format_feedback) : update.
	* src/workbook-edit.c (wbcg_edit_finish) : update.
parent 853928e4
2006-04-30 Jody Goldberg <jody@gnome.org>
* src/sheet-style.c (sheet_style_get) : returns a const to make it
clear not to touch the result.
* src/workbook-view.c (wb_view_format_feedback) : update.
* src/workbook-edit.c (wbcg_edit_finish) : update.
* src/cell.c (cell_dup) : renamed from cell_copy to be more consistent
about naming, and mark as deprecated.
......
2006-04-30 Jody Goldberg <jody@gnome.org>
* src/sheet-style.c (sheet_style_get) : returns a const to make it
clear not to touch the result.
* src/workbook-view.c (wb_view_format_feedback) : update.
* src/workbook-edit.c (wbcg_edit_finish) : update.
* src/cell.c (cell_dup) : renamed from cell_copy to be more consistent
about naming, and mark as deprecated.
......
......@@ -3,7 +3,7 @@
/*
* sheet-style.c: storage mechanism for styles and eventually cells.
*
* Copyright (C) 2000-2004 Jody Goldberg (jody@gnome.org)
* Copyright (C) 2000-2006 Jody Goldberg (jody@gnome.org)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as published
......@@ -1105,14 +1105,14 @@ sheet_style_default (Sheet const *sheet)
/**
* sheet_style_get :
*
* @sheet :
* @sheet : #Sheet
* @col :
* @row :
*
* Find the fully qualified style applicable to the specified cellpos.
*/
GnmStyle *
* Does _not_ add a reference.
**/
GnmStyle const *
sheet_style_get (Sheet const *sheet, int col, int row)
{
int width = TILE_SIZE_COL*TILE_SIZE_COL*TILE_SIZE_COL;
......
......@@ -19,7 +19,7 @@ struct _GnmStyleRow {
};
GnmStyle *sheet_style_default (Sheet const *sheet);
GnmStyle *sheet_style_get (Sheet const *sheet, int col, int row);
GnmStyle const *sheet_style_get (Sheet const *sheet, int col, int row);
GnmStyle *sheet_style_find (Sheet const *sheet, GnmStyle *st);
void sheet_style_get_row (Sheet const *sheet, GnmStyleRow *sr);
void sheet_style_apply_range (Sheet *sheet, GnmRange const *r,
......
......@@ -119,7 +119,7 @@ wbcg_edit_finish (WorkbookControlGUI *wbcg, WBCEditResult result,
ValidationStatus valid;
char *free_txt = NULL;
char const *txt = wbcg_edit_get_display_text (wbcg);
GnmStyle *mstyle = sheet_style_get (sheet, sv->edit_pos.col, sv->edit_pos.row);
GnmStyle const *mstyle = sheet_style_get (sheet, sv->edit_pos.col, sv->edit_pos.row);
char const *expr_txt = NULL;
/* BE CAREFUL the standard fmts must not NOT include '@' */
......
......@@ -231,7 +231,8 @@ wb_view_format_feedback (WorkbookView *wbv, gboolean display)
if (sv == NULL)
return;
style = sheet_style_get (sv->sheet, sv->edit_pos.col, sv->edit_pos.row);
style = (GnmStyle *)sheet_style_get (sv->sheet,
sv->edit_pos.col, sv->edit_pos.row);
sf_style = gnm_style_get_format (style);
if (go_format_is_general (sf_style) &&
(cell = sheet_cell_get (sv->sheet, sv->edit_pos.col, sv->edit_pos.row)) &&
......
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