Commit 36afb7f3 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Remove. Remove. Remove. Remove. Remove. Remove. Remove.

2006-03-31  Morten Welinder  <terra@gnome.org>

	* src/mathfunc.c (gcd): Remove.
	* src/sheet-view.c (sv_get_control): Remove.
	* src/stf-parse.c (stf_parse_options_remove_line_terminator): Remove.
	* src/value.c (value_new_error_RECALC, value_array_resize): Remove.
	* src/workbook-view.c (-wb_view_sheet_remove): Remove.
	* src/ranges.c (range_adjacent, range_merge, range_is_infinite,
	gnm_sheet_range_dup): Remove.
	* src/sheet-control-gui.c (scg_toplevel): Remove.

	* src/print-info.c (hf_formats_base_num): Make static.
	* src/number-match.c (datetime_locale): Make static.
parent 00db6c06
2006-03-31 Morten Welinder <terra@gnome.org>
* src/mathfunc.c (gcd): Remove.
* src/sheet-view.c (sv_get_control): Remove.
* src/stf-parse.c (stf_parse_options_remove_line_terminator): Remove.
* src/value.c (value_new_error_RECALC, value_array_resize): Remove.
* src/workbook-view.c (-wb_view_sheet_remove): Remove.
* src/ranges.c (range_adjacent, range_merge, range_is_infinite,
gnm_sheet_range_dup): Remove.
* src/sheet-control-gui.c (scg_toplevel): Remove.
* src/print-info.c (hf_formats_base_num): Make static.
* src/number-match.c (datetime_locale): Make static.
2006-03-30 Morten Welinder <terra@gnome.org>
* */*.c: Use VALUE_IS_STRING, VALUE_IS_ERROR, VALUE_IS_BOOLEAN,
......
2006-03-31 Morten Welinder <terra@gnome.org>
* src/mathfunc.c (gcd): Remove.
* src/sheet-view.c (sv_get_control): Remove.
* src/stf-parse.c (stf_parse_options_remove_line_terminator): Remove.
* src/value.c (value_new_error_RECALC, value_array_resize): Remove.
* src/workbook-view.c (-wb_view_sheet_remove): Remove.
* src/ranges.c (range_adjacent, range_merge, range_is_infinite,
gnm_sheet_range_dup): Remove.
* src/sheet-control-gui.c (scg_toplevel): Remove.
* src/print-info.c (hf_formats_base_num): Make static.
* src/number-match.c (datetime_locale): Make static.
2006-03-30 Morten Welinder <terra@gnome.org>
* */*.c: Use VALUE_IS_STRING, VALUE_IS_ERROR, VALUE_IS_BOOLEAN,
......
2006-03-31 Morten Welinder <terra@gnome.org>
* dialog-stf-preview.c (stf_preview_set_startrow): Remove.
* dialog-analysis-tools.c (tool_destroy): Make static.
2006-03-27 Morten Welinder <terra@gnome.org>
* dialog-sheet-order.c (cb_add_clicked): Fix 0/NULL confusion
......
......@@ -212,7 +212,7 @@ error_in_entry (GenericToolState *state, GtkWidget *entry, const char *err_str)
* Destroy the dialog and associated data structures.
*
**/
gboolean
static gboolean
tool_destroy (GtkObject *w, GenericToolState *state)
{
gboolean res = FALSE;
......
......@@ -234,24 +234,6 @@ stf_preview_set_lines (RenderData_t *renderdata,
g_object_unref (ll);
}
/**
* stf_preview_set_startrow
* @renderdata : struct containing rendering information
* @startrow : the new row to start rendering at
*
* This will set a new row to start rendering.
*
* returns : nothing
**/
void
stf_preview_set_startrow (RenderData_t *renderdata, int startrow)
{
g_return_if_fail (renderdata != NULL);
g_return_if_fail (startrow >= 0);
renderdata->startrow = startrow;
}
/**
* stf_preview_colformats_clear
* @renderdata : a struct containing rendering information
......
......@@ -50,7 +50,6 @@ void stf_preview_free (RenderData_t *data);
void stf_preview_set_lines (RenderData_t *data,
GStringChunk *lines_chunk,
GPtrArray *lines);
void stf_preview_set_startrow (RenderData_t *data, int startrow);
void stf_preview_colformats_clear (RenderData_t *renderdata);
void stf_preview_colformats_add (RenderData_t *renderdata, GOFormat *format);
......
......@@ -48,7 +48,6 @@ struct _GenericToolState {
} ;
void tool_load_selection (GenericToolState *state, gboolean allow_multiple);
gboolean tool_destroy (GtkObject *w, GenericToolState *state);
void dialog_tool_init_buttons (GenericToolState *state,
GCallback ok_function,
GCallback close_function);
......
......@@ -51,7 +51,6 @@ typedef enum {
GNM_ERROR_NAME,
GNM_ERROR_NUM,
GNM_ERROR_NA,
GNM_ERROR_RECALC,
GNM_ERROR_UNKNOWN
} GnmStdError;
......
......@@ -7555,21 +7555,6 @@ random_landau (void)
/* ------------------------------------------------------------------------ */
/*
* Euclid's Algorithm. Assumes non-negative numbers.
*/
int
gcd (int a, int b)
{
while (b != 0) {
int r = a % b;
a = b;
b = r;
}
return a;
}
gnm_float
combin (gnm_float n, gnm_float k)
{
......
......@@ -176,7 +176,6 @@ void mmult (gnm_float *A, gnm_float *B, int cols_a, int rows_a, int cols_b,
/* ------------------------------------------------------------------------- */
int gcd (int a, int b);
gnm_float combin (gnm_float n, gnm_float k);
gnm_float permut (gnm_float n, gnm_float k);
gnm_float fact (int n);
......
......@@ -109,7 +109,7 @@ format_match_simple (char const *text)
return NULL;
}
struct {
static struct {
char *lc_time;
GORegexp re_MMMMddyyyy;
GORegexp re_ddMMMMyyyy;
......
......@@ -36,7 +36,7 @@
#define MAX_SAVED_CUSTOM_HF_FORMATS 9
GList *hf_formats = NULL;
gint hf_formats_base_num = 0;
static gint hf_formats_base_num = 0;
PrintHF *
print_hf_new (char const *left_side_format,
......
......@@ -177,86 +177,6 @@ range_list_destroy (GSList *ranges)
}
/**
* range_adjacent:
* @a: First range
* @b: Second range
*
* Detects whether a range of similar size is adjacent
* to the other range. Similarity is determined by having
* a shared side of equal length. NB. this will clearly
* give odd results for overlapping regions.
*
* Return value: if they share a side of equal length
**/
gboolean
range_adjacent (GnmRange const *a, GnmRange const *b)
{
g_return_val_if_fail (a != NULL, FALSE);
g_return_val_if_fail (b != NULL, FALSE);
if ((a->start.col == b->start.col) &&
(a->end.col == b->end.col))
return (a->end.row + 1 == b->start.row ||
b->end.row + 1 == a->start.row);
if ((a->start.row == b->start.row) &&
(a->end.row == b->end.row))
return (a->end.col + 1 == b->start.col ||
b->end.col + 1 == a->start.col);
return FALSE;
}
/**
* range_merge:
* @a: GnmRange a.
* @b: GnmRange b.
*
* This routine coalesces two adjacent regions, eg.
* (A1, B1) would return A1:B1 or (A1:B2, C1:D2)) would
* give A1:D2. NB. it is imperative that the regions are
* actualy adjacent or unexpected results will ensue.
*
* Fully commutative.
*
* Return value: the merged range.
**/
GnmRange
range_merge (GnmRange const *a, GnmRange const *b)
{
GnmRange ans;
ans.start.col = 0;
ans.start.row = 0;
ans.end.col = 0;
ans.end.row = 0;
g_return_val_if_fail (a != NULL, ans);
g_return_val_if_fail (b != NULL, ans);
/* Useful perhaps but kills performance */
/* g_return_val_if_fail (range_adjacent (a, b), ans); */
if (a->start.row < b->start.row) {
ans.start.row = a->start.row;
ans.end.row = b->end.row;
} else {
ans.start.row = b->start.row;
ans.end.row = a->end.row;
}
if (a->start.col < b->start.col) {
ans.start.col = a->start.col;
ans.end.col = b->end.col;
} else {
ans.start.col = b->start.col;
ans.end.col = a->end.col;
}
return ans;
}
char const *
range_name (GnmRange const *src)
{
......@@ -784,21 +704,6 @@ range_is_full (GnmRange const *r, gboolean is_cols)
return (r->start.row <= 0 && r->end.row >= SHEET_MAX_ROWS - 1);
}
/**
* range_is_infinite:
* @r: the range.
*
* This determines whether @r completely spans a sheet
* in either dimension ( semi-infinite )
*
* Return value: TRUE if it is infinite, FALSE otherwise.
**/
gboolean
range_is_infinite (GnmRange const *r)
{
return range_is_full (r, TRUE) || range_is_full (r, FALSE);
}
/**
* range_clip_to_finite :
* @range :
......@@ -1027,14 +932,6 @@ gnm_sheet_range_overlap (GnmSheetRange const *a, GnmSheetRange const *b)
return FALSE;
}
GnmSheetRange *
gnm_sheet_range_dup (GnmSheetRange const *src)
{
g_return_val_if_fail (src != NULL, NULL);
return gnm_sheet_range_new (src->sheet, &src->range);
}
char *
global_range_name (Sheet const *sheet, GnmRange const *r)
{
......
......@@ -66,12 +66,9 @@ void range_list_destroy (GSList *ranges);
int range_width (GnmRange const *r);
int range_height (GnmRange const *r);
gboolean range_is_singleton (GnmRange const *r);
gboolean range_is_infinite (GnmRange const *r);
gboolean range_is_full (GnmRange const *r, gboolean is_cols);
void range_clip_to_finite(GnmRange *range, Sheet *sheet);
gboolean range_contained (GnmRange const *a, GnmRange const *b);
gboolean range_adjacent (GnmRange const *a, GnmRange const *b);
GnmRange range_merge (GnmRange const *a, GnmRange const *b);
gboolean range_intersection (GnmRange *r,
GnmRange const *a,
GnmRange const *b);
......@@ -99,7 +96,6 @@ GSList *range_fragment (GnmRange const *a, GnmRange const *b);
void range_fragment_free (GSList *fragments);
GnmSheetRange *gnm_sheet_range_new (Sheet *sheet, GnmRange const *r);
GnmSheetRange *gnm_sheet_range_dup (GnmSheetRange const *src);
void gnm_sheet_range_free (GnmSheetRange *r);
gboolean gnm_sheet_range_from_value (GnmSheetRange *r, GnmValue const *v);
gboolean gnm_sheet_range_overlap (GnmSheetRange const *a, GnmSheetRange const *b);
......
......@@ -2908,14 +2908,6 @@ scg_cursor_extend (SheetControlGUI *scg, int n,
sv_make_cell_visible (sv, visible.col, visible.row, FALSE);
}
GtkWidget *
scg_toplevel (SheetControlGUI *scg)
{
g_return_val_if_fail (IS_SHEET_CONTROL_GUI (scg), NULL);
return GTK_WIDGET (scg->table);
}
void
scg_take_focus (SheetControlGUI *scg)
{
......
......@@ -14,7 +14,6 @@
GType sheet_control_gui_get_type (void);
SheetControlGUI *sheet_control_gui_new (SheetView *sv, WorkbookControlGUI *wbcg);
GtkWidget *scg_toplevel (SheetControlGUI *scg);
void scg_take_focus (SheetControlGUI *scg);
void scg_mode_create_object (SheetControlGUI *scg, SheetObject *so);
......
......@@ -123,13 +123,6 @@ sv_attach_control (SheetView *sv, SheetControl *sc)
sv_init_sc (sv, sc);
}
SheetControl *
sv_get_control (SheetView const *sv, WorkbookControl const *wbc)
{
SHEET_VIEW_FOREACH_CONTROL (sv, sc, if (sc_wbc (sc) == wbc) return sc;);
return NULL;
}
void
sv_detach_control (SheetControl *sc)
{
......
......@@ -61,8 +61,6 @@ GType sheet_view_get_type (void);
SheetView *sheet_view_new (Sheet *sheet, WorkbookView *wbv);
void sv_attach_control (SheetView *sv, SheetControl *sc);
void sv_detach_control (SheetControl *sc);
SheetControl *sv_get_control (SheetView const *sv,
WorkbookControl const *wbc);
void sv_weak_ref (SheetView *sv, SheetView **ptr);
void sv_weak_unref (SheetView **ptr);
void sv_update (SheetView *sv);
......
......@@ -27,7 +27,7 @@ typedef struct {
/* Clause stuff */
void
static void
sort_clause_destroy (GnmSortClause *clause)
{
g_free (clause);
......
......@@ -19,7 +19,6 @@ struct _GnmSortData {
gboolean retain_formats;
};
void sort_clause_destroy (GnmSortClause *clause);
void sort_data_destroy (GnmSortData *data);
void sort_position (GnmSortData *data, int *perm, GOCmdContext *cc);
int *sort_contents (GnmSortData *data, GOCmdContext *cc);
......
......@@ -264,30 +264,6 @@ stf_parse_options_add_line_terminator (StfParseOptions_t *parseoptions, char con
compile_terminators (parseoptions);
}
/**
* stf_parse_options_remove_line_terminator:
*
* This will remove from the line terminators, in both the Fixed width and CSV delimited importers
* this indicates the end of a row.
*
**/
void
stf_parse_options_remove_line_terminator (StfParseOptions_t *parseoptions, char const *terminator)
{
GSList* in_list;
g_return_if_fail (parseoptions != NULL);
in_list = g_slist_find_custom (parseoptions->terminator, terminator, go_str_compare);
if (in_list) {
char *s = in_list->data;
GO_SLIST_REMOVE (parseoptions->terminator, in_list->data);
g_free (s);
compile_terminators (parseoptions);
}
}
/**
* stf_parse_options_clear_line_terminator:
*
......
......@@ -77,8 +77,6 @@ void stf_parse_options_set_type (StfParseOptions_t *parse
void stf_parse_options_clear_line_terminator (StfParseOptions_t *parseoptions);
void stf_parse_options_add_line_terminator (StfParseOptions_t *parseoptions,
char const *terminator);
void stf_parse_options_remove_line_terminator (StfParseOptions_t *parseoptions,
char const *terminator);
void stf_parse_options_set_trim_spaces (StfParseOptions_t *parseoptions,
StfTrimType_t const trim_spaces);
void stf_parse_options_csv_set_separators (StfParseOptions_t *parseoptions,
......
......@@ -58,7 +58,6 @@ static struct {
{ N_("#NAME?"), NULL, NULL },
{ N_("#NUM!"), NULL, NULL },
{ N_("#N/A"), NULL, NULL },
{ N_("#RECALC!"), NULL, NULL },
{ N_("#UNKNOWN!"), NULL, NULL }
};
......@@ -182,12 +181,6 @@ value_new_error_NA (GnmEvalPos const *pos)
return value_new_error_str (pos, standard_errors[GNM_ERROR_NA].locale_name_str);
}
GnmValue *
value_new_error_RECALC (GnmEvalPos const *pos)
{
return value_new_error_str (pos, standard_errors[GNM_ERROR_RECALC].locale_name_str);
}
char const *
value_error_name (GnmStdError err, gboolean translated)
{
......@@ -1150,39 +1143,6 @@ value_array_set (GnmValue *array, int col, int row, GnmValue *v)
array->v_array.vals[col][row] = v;
}
void
value_array_resize (GnmValue *v, int width, int height)
{
int x, y, xcpy, ycpy;
GnmValue *newval;
GnmValue ***tmp;
g_warning ("Totally untested");
g_return_if_fail (v);
g_return_if_fail (v->type == VALUE_ARRAY);
newval = value_new_array (width, height);
xcpy = MIN (width, v->v_array.x);
ycpy = MIN (height, v->v_array.y);
for (x = 0; x < xcpy; x++)
for (y = 0; y < ycpy; y++) {
value_array_set (newval, x, y, v->v_array.vals[x][y]);
v->v_array.vals[x][y] = NULL;
}
tmp = v->v_array.vals;
v->v_array.vals = newval->v_array.vals;
newval->v_array.vals = tmp;
newval->v_array.x = v->v_array.x;
newval->v_array.y = v->v_array.y;
v->v_array.x = width;
v->v_array.y = height;
value_release (newval);
}
static GnmValDiff
compare_bool_bool (GnmValue const *va, GnmValue const *vb)
{
......
......@@ -109,7 +109,6 @@ GnmValue *value_new_error_REF (GnmEvalPos const *pos);
GnmValue *value_new_error_NAME (GnmEvalPos const *pos);
GnmValue *value_new_error_NUM (GnmEvalPos const *pos);
GnmValue *value_new_error_NA (GnmEvalPos const *pos);
GnmValue *value_new_error_RECALC (GnmEvalPos const *pos);
GnmValue *value_new_string (char const *str);
GnmValue *value_new_string_nocopy (char *str);
GnmValue *value_new_string_str (GnmString *str);
......@@ -176,7 +175,6 @@ extern GnmValueErr const value_terminate_err;
#define VALUE_TERMINATE ((GnmValue *)&value_terminate_err)
void value_array_set (GnmValue *array, int col, int row, GnmValue *v);
void value_array_resize (GnmValue *v, int width, int height);
/* FIXME: this stuff below ought to go elsewhere. */
typedef gboolean (*GnmCriteriaFunc) (GnmValue const *x, GnmValue const *y);
......
......@@ -154,21 +154,6 @@ wb_view_sheet_add (WorkbookView *wbv, Sheet *new_sheet)
g_object_unref (new_view);
}
void
wb_view_sheet_remove (WorkbookView *wbv, Sheet *sheet)
{
SheetView *sv;
g_return_if_fail (IS_WORKBOOK_VIEW (wbv));
WORKBOOK_VIEW_FOREACH_CONTROL (wbv, control,
wb_control_sheet_remove (control, sheet););
sv = sheet_get_view (sheet, wbv);
if (sv)
sv_dispose (sv);
}
gboolean
wb_view_is_protected (WorkbookView *wbv, gboolean check_sheet)
{
......
......@@ -60,7 +60,6 @@ Sheet *wb_view_cur_sheet (WorkbookView const *wbv);
SheetView *wb_view_cur_sheet_view (WorkbookView const *wbv);
void wb_view_sheet_focus (WorkbookView *wbv, Sheet *sheet);
void wb_view_sheet_add (WorkbookView *wbv, Sheet *new_sheet);
void wb_view_sheet_remove (WorkbookView *wbv, Sheet *sheet);
gboolean wb_view_is_protected (WorkbookView *wbv, gboolean check_sheet);
/* Manipulation */
......
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