-/* psppire-data-store.c
-
- PSPPIRE --- A Graphical User Interface for PSPP
+/* PSPPIRE - a graphical user interface for PSPP.
Copyright (C) 2006 Free Software Foundation
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <string.h>
return psppire_dict_get_var_cnt (store->dict);
}
+casenumber
+psppire_data_store_get_case_count (PsppireDataStore *store)
+{
+ return psppire_case_file_get_case_count (store->case_file);
+}
+
static gint
-psppire_data_store_get_case_count (const GSheetModel *model)
+psppire_data_store_get_case_count_from_model (const GSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
}
+
+
static void
psppire_data_store_init (PsppireDataStore *data_store)
{
iface->get_font_desc = psppire_data_store_get_font_desc;
iface->get_cell_border = NULL;
iface->get_column_count = psppire_data_store_get_var_count;
- iface->get_row_count = psppire_data_store_get_case_count;
+ iface->get_row_count = psppire_data_store_get_case_count_from_model;
}
static
TRAILING_ROWS + psppire_case_file_get_case_count (ds->case_file))
return 0;
- s = g_strdup_printf (_("%d"), unit);
+ s = g_strdup_printf (_("%d"), unit + FIRST_CASE_NUMBER);
text = pspp_locale_to_utf8 (s, -1, 0);