#include <data/missing-values.h>
#include <data/value-labels.h>
#include <data/data-in.h>
+#include <data/format.h>
static void psppire_data_store_init (PsppireDataStore *data_store);
#define MIN_COLUMNS 10
-
#define TRAILING_ROWS 10
static GObjectClass *parent_class = NULL;
static guint signals [n_SIGNALS];
-inline GType
+GType
psppire_data_store_get_type (void)
{
static GType data_store_type = 0;
return psppire_dict_get_var_cnt (store->dict);
}
-inline casenumber
+casenumber
psppire_data_store_get_case_count (const PsppireDataStore *store)
{
return psppire_case_file_get_case_count (store->case_file);
return psppire_dict_get_value_cnt (store->dict);
}
-inline casenumber
+casenumber
psppire_data_store_get_case_count_wrapper (const GSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
iface->get_row_count = psppire_data_store_get_case_count_wrapper;
}
-static
-gboolean always_true ()
-{
- return TRUE;
-}
-
-
static void
delete_cases_callback (GtkWidget *w,
casenumber first, casenumber n_cases, gpointer data)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
- struct variable *pv = psppire_dict_get_variable (ds->dict, unit);
+ struct variable *v = psppire_dict_get_variable (ds->dict, unit);
- var_set_display_width (pv, width / ds->width_of_m );
+ g_return_if_fail (v);
+
+ var_set_display_width (v, width / ds->width_of_m );
}
iface->get_column_count = geometry_get_column_count;
iface->get_width = geometry_get_width;
iface->set_width = geometry_set_width;
- iface->get_visibility = always_true;
iface->get_sensitivity = geometry_get_sensitivity;
iface->get_justification = geometry_get_justification;
iface->get_button_label = geometry_get_column_button_label;
return (unit < psppire_case_file_get_case_count (ds->case_file));
}
-
static gchar *
geometry_get_row_button_label (const GSheetRow *geom, glong unit)
{
iface->get_height = geometry_get_height;
iface->set_height = 0;
- iface->get_visibility = always_true;
iface->get_sensitivity = geometry_get_row_sensitivity;
iface->top_ypixel = geometry_get_top_ypixel;
iface->pixel_to_row = geometry_pixel_to_row;