[gnumeric] Compilation: prune #if 0 code unlikely to be reused.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Compilation: prune #if 0 code unlikely to be reused.
- Date: Mon, 5 May 2014 16:44:41 +0000 (UTC)
commit a1b1aef50d6d2060a1f204ab83552e55574ba07c
Author: Morten Welinder <terra gnome org>
Date: Mon May 5 12:44:07 2014 -0400
Compilation: prune #if 0 code unlikely to be reused.
src/auto-format.c | 9 ---------
src/complete-sheet.c | 4 ----
src/gnm-pane.c | 18 ------------------
src/preview-grid.c | 6 ------
src/sf-bessel.c | 7 -------
src/stf.c | 5 -----
src/wbc-gtk.c | 6 ------
src/workbook-view.c | 6 ------
src/xml-sax-read.c | 14 ++------------
9 files changed, 2 insertions(+), 73 deletions(-)
---
diff --git a/src/auto-format.c b/src/auto-format.c
index 8eac113..e759e34 100644
--- a/src/auto-format.c
+++ b/src/auto-format.c
@@ -90,15 +90,6 @@ is_date (GnmFuncFlags typ, GOFormat const *explicit)
static GnmFuncFlags
do_af_suggest (GnmExpr const *expr, GnmEvalPos const *epos, GOFormat const **explicit)
{
-#if 0
- {
- GnmParsePos pp;
- parse_pos_init_evalpos (&pp, epos);
- g_printerr ("Suggesting format for [%s]\n",
- gnm_expr_as_string (expr, &pp, NULL));
- }
-#endif
-
switch (GNM_EXPR_GET_OPER (expr)) {
case GNM_EXPR_OP_EQUAL:
case GNM_EXPR_OP_GT:
diff --git a/src/complete-sheet.c b/src/complete-sheet.c
index af8d1ce..125edf6 100644
--- a/src/complete-sheet.c
+++ b/src/complete-sheet.c
@@ -97,10 +97,6 @@ complete_sheet_search_iteration (Complete *complete)
if (!search_strategy_next (cs))
return FALSE;
-#if 0
- g_print ("Checking %s...\n", cell_coord_name (cs->current.col, cs->current.row));
-#endif
-
if (text_matches (cs))
return FALSE;
}
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 89e4ada..8c0f7f0 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -1383,11 +1383,6 @@ gnm_pane_compute_visible_region (GnmPane *pane,
int col, row, width, height;
GtkAllocation ca;
-#if 0
- g_warning ("compute_vis(W)[%d] = %d", pane->index,
- GTK_WIDGET (pane)->allocation.width);
-#endif
-
gtk_widget_get_allocation (GTK_WIDGET (canvas), &ca);
/* When col/row sizes change we need to do a full recompute */
@@ -1522,11 +1517,6 @@ gnm_pane_redraw_range (GnmPane *pane, GnmRange const *r)
tmp.start.row, tmp.end.row+1)
: G_MAXINT64;
-#if 0
- g_printerr ("%s%s:", col_name (min_col), row_name (first_row));
- g_printerr ("%s%s\n", col_name (max_col), row_name (last_row));
-#endif
-
goc_canvas_invalidate (&pane->simple.canvas, (x1-2) / scale, (y1-2) / scale, x2 / scale, y2 / scale);
}
@@ -1581,10 +1571,6 @@ cb_pane_sliding (GnmPane *pane)
GnmPaneSlideInfo info;
GtkAllocation pa;
-#if 0
- g_warning ("slide: %d, %d", pane->sliding_dx, pane->sliding_dy);
-#endif
-
gtk_widget_get_allocation (GTK_WIDGET (pane), &pa);
if (pane->sliding_dx > 0) {
@@ -1906,10 +1892,6 @@ cb_obj_autoscroll (GnmPane *pane, GnmPaneSlideInfo const *info)
dx = pane->first_offset.x - dx;
dy = pane->first_offset.y - dy;
-#if 0
- g_warning ("dx = %g, dy = %g", dx, dy);
-#endif
-
pane->drag.had_motion = TRUE;
gdk_window_get_device_position (window,
gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdk_window_get_display
(window))),
diff --git a/src/preview-grid.c b/src/preview-grid.c
index 51ff661..979cca7 100644
--- a/src/preview-grid.c
+++ b/src/preview-grid.c
@@ -201,12 +201,6 @@ static gboolean
preview_grid_draw_region (GocItem const *item, cairo_t *cr,
double x0, double y0, double x1, double y1)
{
-#if 0
- gint draw_x = expose->area.x;
- gint draw_y = expose->area.y;
- gint width = expose->area.width;
- gint height = expose->area.height;
-#endif
GnmPreviewGrid *pg = GNM_PREVIEW_GRID (item);
/* To ensure that far and near borders get drawn we pretend to draw +-2
diff --git a/src/sf-bessel.c b/src/sf-bessel.c
index 37c803f..a17a95f 100644
--- a/src/sf-bessel.c
+++ b/src/sf-bessel.c
@@ -2331,9 +2331,6 @@ bessel_j_series (gnm_float x, gnm_float v)
gnm_quad_mul (&qa, &qa, &qb);
gnm_quad_div (&qt, &qt, &qa);
t = gnm_quad_value (&qt);
-#if 0
- g_printerr ("%5d: %g\n", k, t);
-#endif
if (t == 0)
break;
gnm_quad_add (&qs, &qs, &qt);
@@ -2349,10 +2346,6 @@ bessel_j_series (gnm_float x, gnm_float v)
gnm_quad_end (state);
-#if 0
- g_printerr ("J_%g(%g) = %g\n", v, x, s);
-#endif
-
return s;
}
diff --git a/src/stf.c b/src/stf.c
index 2af80be..dddbf39 100644
--- a/src/stf.c
+++ b/src/stf.c
@@ -75,11 +75,6 @@ stf_warning (GOIOContext *context, char const *msg)
"%s", msg);
else
g_warning ("%s", msg);
-#if 0
- go_cmd_context_error_import
- (GO_CMD_CONTEXT (context),
- msg);
-#endif
}
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 4dbdae3..5a68c16 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -3441,9 +3441,6 @@ wbc_gtk_init_color_fore (WBCGtk *gtk)
g_signal_connect (G_OBJECT (gtk->fore_color),
"display-custom-dialog",
G_CALLBACK (cb_custom_color_created), gtk);
-#if 0
- gnm_combo_box_set_title (GO_COMBO_BOX (fore_combo), _("Foreground"));
-#endif
gtk_action_group_add_action (gtk->font_actions,
GTK_ACTION (gtk->fore_color));
}
@@ -3488,9 +3485,6 @@ wbc_gtk_init_color_back (WBCGtk *gtk)
"signal::combo-activate", G_CALLBACK (cb_back_color_changed), gtk,
"signal::display-custom-dialog", G_CALLBACK (cb_custom_color_created), gtk,
NULL);
-#if 0
- gnm_combo_box_set_title (GO_COMBO_BOX (back_combo), _("Background"));
-#endif
gtk_action_group_add_action (gtk->actions, GTK_ACTION (gtk->back_color));
}
/****************************************************************************/
diff --git a/src/workbook-view.c b/src/workbook-view.c
index 3dc4de1..fe71f8f 100644
--- a/src/workbook-view.c
+++ b/src/workbook-view.c
@@ -1090,9 +1090,6 @@ wb_view_save_to_uri (WorkbookView *wbv, GOFileSaver const *fs,
go_cmd_context_error_export (GO_CMD_CONTEXT (io_context), msg);
g_free (msg);
} else {
-#if 0
- g_printerr ("Writing %s\n", uri);
-#endif
wbv_save_to_output (wbv, fs, output, io_context);
g_object_unref (output);
}
@@ -1336,9 +1333,6 @@ workbook_view_new_from_uri (char const *uri,
if (input != NULL) {
WorkbookView *res;
-#if 0
- g_printerr ("Reading %s\n", uri);
-#endif
res = workbook_view_new_from_input (input, uri,
optional_fmt, io_context,
optional_enc);
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index 7f2b42f..e6e991d 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -1961,14 +1961,10 @@ xml_not_used_old_array_spec (XMLSaxParseState *state,
char const *content)
{
long rows, cols, row, col;
-
-#if 0
- /* This is the syntax we are trying to parse */
- g_string_append_printf (str, "{%s}(%d,%d)[%d][%d]", expr_text,
- array.rows, array.cols, array.y, array.x);
-#endif
char *end, *expr_end, *ptr;
+ /* This is the syntax we are trying to parse: "{%s}(%d,%d)[%d][%d]" */
+
if (content[0] != '=' || content[1] != '{')
return TRUE;
@@ -2392,12 +2388,6 @@ xml_sax_read_obj (GsfXMLIn *xin, gboolean needs_cleanup,
gboolean b = (tmp_int != 0);
sheet_object_set_print_flag (so, &b);
}
-#if 0
- /* Deprecated in 1.7.7 */
- else if (attr_eq (attrs[i], "ObjectAnchorType")) {
- }
- /* There may be extra attributes that are handled by the objects */
-#endif
}
/* Patch problems introduced in some 1.7.x versions that stored
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]