[gnumeric] Remove unused function.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Remove unused function.
- Date: Sun, 22 May 2011 19:07:11 +0000 (UTC)
commit 6b6b18be10adef2d8216381947234277dd393fe7
Author: Morten Welinder <terra gnome org>
Date: Sun May 22 15:06:52 2011 -0400
Remove unused function.
ChangeLog | 1 +
plugins/openoffice/openoffice-read.c | 8 +++---
src/expr-name.c | 40 ----------------------------------
src/expr-name.h | 1 -
4 files changed, 5 insertions(+), 45 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 288cd47..6735587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* src/expr-name.c (expr_name_set_is_placeholder): New function.
(expr_name_downgrade_to_placeholder): Simplify using
expr_name_set_is_placeholder.
+ (sheet_names_get_available): Unused. Remove.
* src/workbook.h (WORKBOOK_FOREACH_SHEET): Move from
workbook-priv.h
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 24d8cd8..f4f2692 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -5255,10 +5255,10 @@ oo_db_range_start (GsfXMLIn *xin, xmlChar const **attrs)
/* expression or range with that name. */
if (expr != NULL) {
GnmNamedExpr *nexpr = NULL;
- if (name != NULL
- && (NULL == (nexpr = expr_name_lookup
- (parse_pos_init (&pp, state->pos.wb, NULL, 0, 0), name)) ||
- expr_name_is_placeholder (nexpr))) {
+ if (name != NULL &&
+ (NULL == (nexpr = expr_name_lookup
+ (parse_pos_init (&pp, state->pos.wb, NULL, 0, 0), name)) ||
+ expr_name_is_placeholder (nexpr))) {
GnmExprTop const *texpr = gnm_expr_top_new (expr);
expr_name_add (&pp, name, texpr, NULL, TRUE, NULL);
} else
diff --git a/src/expr-name.c b/src/expr-name.c
index 2b0bb04..6d90f14 100644
--- a/src/expr-name.c
+++ b/src/expr-name.c
@@ -1082,46 +1082,6 @@ expr_name_cmp_by_name (GnmNamedExpr const *a, GnmNamedExpr const *b)
return res;
}
-/******************************************************************************/
-/**
- * sheet_names_get_available :
- * A convenience routine to get the list of names associated with @sheet and its
- * workbook.
- *
- * The caller is responsible for freeing the list.
- * Names in the list do NOT have additional references added.
- */
-static void
-cb_get_names (G_GNUC_UNUSED gpointer key, GnmNamedExpr *nexpr,
- GList **accum)
-{
- if (!nexpr->is_hidden)
- *accum = g_list_prepend (*accum, nexpr);
-}
-
-/**
- * sheet_names_get_available :
- * @sheet :
- *
- * Gets the list of non hidden names available in the context @sheet.
- * Caller is responsible for freeing the list, but not its content.
- **/
-GList *
-sheet_names_get_available (Sheet const *sheet)
-{
- GList *res = NULL;
- g_return_val_if_fail (IS_SHEET (sheet), NULL);
-
- if (sheet->names != NULL)
- g_hash_table_foreach (sheet->names->names,
- (GHFunc) cb_get_names, &res);
- if (sheet->workbook->names != NULL)
- g_hash_table_foreach (sheet->workbook->names->names,
- (GHFunc) cb_get_names, &res);
-
- return res;
-}
-
/**
* sheet_names_check :
* @sheet :
diff --git a/src/expr-name.h b/src/expr-name.h
index 2976fbb..6c36f7d 100644
--- a/src/expr-name.h
+++ b/src/expr-name.h
@@ -58,7 +58,6 @@ gboolean expr_name_in_use (GnmNamedExpr *nexpr);
int expr_name_cmp_by_name (GnmNamedExpr const *a, GnmNamedExpr const *b);
gboolean expr_name_check_for_loop (char const *name, GnmExprTop const *texpr);
-GList *sheet_names_get_available (Sheet const *sheet);
char const *sheet_names_check (Sheet const *sheet, GnmRange const *r);
GOUndo *expr_name_set_expr_undo_new (GnmNamedExpr *ne);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]