static gchar * get_row_button_label (const PsppireSheetModel *model, gint row);
static gboolean get_row_sensitivity (const PsppireSheetModel *model, gint row);
+static gboolean get_row_overstrike (const PsppireSheetModel *model, gint row);
static void
iface->get_row_title = get_row_button_label;
iface->get_row_sensitivity = get_row_sensitivity;
+ iface->get_row_overstrike = get_row_overstrike;
}
#endif
}
-
-
static void
variable_changed_callback (GObject *obj, gint var_num, gpointer data)
{
+#if AXIS_TRANSITION
PsppireDataStore *store = PSPPIRE_DATA_STORE (data);
-#if AXIS_TRANSITION
psppire_sheet_column_columns_changed (PSPPIRE_SHEET_COLUMN (store),
var_num, 1);
-
psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (store),
-1, var_num,
-1, var_num);
return TRUE;
}
+
+static gboolean
+get_row_overstrike (const PsppireSheetModel *model, gint row)
+{
+ union value val;
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (model);
+
+ const struct dictionary *dict = ds->dict->dict;
+
+ const struct variable *filter = dict_get_filter (dict);
+
+ if ( row < 0 || row >= datasheet_get_row_cnt (ds->datasheet))
+ return FALSE;
+
+ if ( ! filter)
+ return FALSE;
+
+ g_assert (var_is_numeric (filter));
+
+ if ( ! datasheet_get_value (ds->datasheet, row,
+ var_get_case_index (filter),
+ &val, 0) )
+ return FALSE;
+
+
+ return (val.f == 0.0);
+}