[gnumeric] Namespace
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Namespace
- Date: Mon, 2 Mar 2015 19:23:15 +0000 (UTC)
commit 17b569dd6909428e0c6b81a157d7259778e2a67c
Author: Morten Welinder <terra gnome org>
Date: Mon Mar 2 14:22:57 2015 -0500
Namespace
NEWS | 2 +
plugins/excel/ms-excel-read.c | 8 +-
plugins/excel/ms-excel-util.c | 4 +-
plugins/excel/ms-excel-util.h | 4 +-
plugins/excel/ms-excel-write.c | 8 +-
plugins/excel/xlsx-read.c | 16 +-
plugins/excel/xlsx-write.c | 6 +-
plugins/fn-info/functions.c | 2 +-
plugins/openoffice/openoffice-read.c | 42 +++---
plugins/openoffice/openoffice-write.c | 20 ++--
src/commands.c | 30 ++--
src/commands.h | 2 +-
src/dialogs/dialog-printer-setup.c | 110 +++++++-------
src/gnumeric-fwd.h | 2 +-
src/history.c | 2 +-
src/history.h | 2 +-
src/hlink.c | 4 +-
src/hlink.h | 2 +-
src/item-edit.c | 2 +-
src/item-grid.c | 10 +-
src/mstyle.c | 2 +-
src/pattern.c | 6 +-
src/pattern.h | 4 +-
src/preview-grid.c | 2 +-
src/print-cell.c | 10 +-
src/print-cell.h | 2 +-
src/print-info.c | 280 ++++++++++++++++----------------
src/print-info.h | 108 +++++++-------
src/print.c | 28 ++--
src/sheet-object-graph.c | 2 +-
src/sheet.c | 8 +-
src/sheet.h | 2 +-
src/wbc-gtk.c | 4 +-
src/xml-sax-read.c | 30 ++--
src/xml-sax-write.c | 4 +-
35 files changed, 386 insertions(+), 384 deletions(-)
---
diff --git a/NEWS b/NEWS
index 7dee582..5bbe6e5 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,8 @@ Morten:
* Fix spinner properties dialog.
* SheetObjectImage fixes.
* Fix problem reading images from xls.
+ * Namespace fixes
+
--------------------------------------------------------------------------
Gnumeric 1.12.20
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 126c86f..ca278f3 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -832,7 +832,7 @@ ms_sheet_create_obj (MSContainer *container, MSObj *obj)
static void
excel_init_margins (ExcelReadSheet *esheet)
{
- PrintInformation *pi;
+ GnmPrintInformation *pi;
double points;
double short_points;
@@ -4605,7 +4605,7 @@ excel_read_GUTS (BiffQuery *q, ExcelReadSheet *esheet)
static void
excel_read_SETUP (BiffQuery *q, ExcelReadSheet *esheet)
{
- PrintInformation *pi = esheet->sheet->print_info;
+ GnmPrintInformation *pi = esheet->sheet->print_info;
guint16 flags;
gboolean rotate_paper = FALSE;
gboolean portrait_orientation = TRUE;
@@ -6367,7 +6367,7 @@ excel_read_HEADER_FOOTER (GnmXLImporter const *importer,
BiffQuery *q, ExcelReadSheet *esheet,
gboolean is_header)
{
- PrintInformation *pi = esheet->sheet->print_info;
+ GnmPrintInformation *pi = esheet->sheet->print_info;
if (q->length) {
char *str;
@@ -6446,7 +6446,7 @@ static void
excel_read_MARGIN (BiffQuery *q, ExcelReadSheet *esheet)
{
double m;
- PrintInformation *pi = esheet->sheet->print_info;
+ GnmPrintInformation *pi = esheet->sheet->print_info;
XL_CHECK_CONDITION (q->length >= 8);
m = GO_IN_TO_PT (gsf_le_get_double (q->data));
diff --git a/plugins/excel/ms-excel-util.c b/plugins/excel/ms-excel-util.c
index 661d950..f48aeb9 100644
--- a/plugins/excel/ms-excel-util.c
+++ b/plugins/excel/ms-excel-util.c
@@ -735,7 +735,7 @@ xls_header_footer_export1 (GString *res, const char *s, const char *section)
char *
-xls_header_footer_export (const PrintHF *hf)
+xls_header_footer_export (const GnmPrintHF *hf)
{
GString *res = g_string_new (NULL);
@@ -747,7 +747,7 @@ xls_header_footer_export (const PrintHF *hf)
}
void
-xls_header_footer_import (PrintHF *hf, const char *txt)
+xls_header_footer_import (GnmPrintHF *hf, const char *txt)
{
char section = 'L';
GString *accum;
diff --git a/plugins/excel/ms-excel-util.h b/plugins/excel/ms-excel-util.h
index fc7bc1f..8d512af 100644
--- a/plugins/excel/ms-excel-util.h
+++ b/plugins/excel/ms-excel-util.h
@@ -102,8 +102,8 @@ unsigned xls_paper_size (GtkPaperSize *ps, gboolean rotated);
/*****************************************************************************/
-char *xls_header_footer_export (const PrintHF *hf);
-void xls_header_footer_import (PrintHF *hf, const char *txt);
+char *xls_header_footer_export (const GnmPrintHF *hf);
+void xls_header_footer_import (GnmPrintHF *hf, const char *txt);
/*****************************************************************************/
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index c652a03..7daf59b 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -166,7 +166,7 @@ gnm_color_to_bgr (GnmColor const *c)
static int
map_pattern_to_xl (int i)
{
- static int const map_to_excel[GNUMERIC_SHEET_PATTERNS + 1] = {
+ static int const map_to_excel[GNM_PATTERNS_MAX + 1] = {
0,
1, 3, 2, 4, 17, 18,
5, 6, 8, 7, 9, 10,
@@ -536,7 +536,7 @@ points_to_inches (double pts)
void
excel_write_SETUP (BiffPut *bp, ExcelWriteSheet *esheet)
{
- PrintInformation *pi = NULL;
+ GnmPrintInformation *pi = NULL;
double header = 0., footer = 0.;
guint8 *data = ms_biff_put_len_next (bp, BIFF_SETUP, 34);
guint16 flags = 0;
@@ -5108,7 +5108,7 @@ excel_write_PAGE_BREAK (BiffPut *bp, GnmPageBreaks const *breaks)
}
static void
-excel_write_HEADER_FOOTER (BiffPut *bp, PrintHF const *hf, int id)
+excel_write_HEADER_FOOTER (BiffPut *bp, GnmPrintHF const *hf, int id)
{
char *s = xls_header_footer_export (hf);
@@ -5127,7 +5127,7 @@ static void
write_sheet_head (BiffPut *bp, ExcelWriteSheet *esheet)
{
guint8 *data;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
Sheet const *sheet = esheet->gnum_sheet;
Workbook const *wb = sheet->workbook;
double left;
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 2a68361..de2854b 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -1714,11 +1714,11 @@ static void
xlsx_sheet_page_setup (G_GNUC_UNUSED GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
- PrintInformation *pi = state->sheet->print_info;
+ GnmPrintInformation *pi = state->sheet->print_info;
gboolean tmp;
if (pi->page_setup == NULL)
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (attr_bool (xin, attrs, "fitToPage", &tmp))
@@ -1766,7 +1766,7 @@ xlsx_paper_size (gdouble width, gdouble height, GtkUnit unit, int code)
}
static gboolean
-xlsx_set_paper_from_code (PrintInformation *pi, int code)
+xlsx_set_paper_from_code (GnmPrintInformation *pi, int code)
{
XLSXPaperDefs paper[] =
{{ 0 , 0 , 0 , GTK_UNIT_MM , NULL },
@@ -1915,7 +1915,7 @@ static void
xlsx_CT_PageSetup (GsfXMLIn *xin, xmlChar const **attrs)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
- PrintInformation *pi = state->sheet->print_info;
+ GnmPrintInformation *pi = state->sheet->print_info;
int orient, paper_code = 0, scale, tmp_int;
gboolean orient_set = FALSE, first_page_number = TRUE, tmp_bool;
gnm_float width = 0., height = 0.;
@@ -1945,7 +1945,7 @@ xlsx_CT_PageSetup (GsfXMLIn *xin, xmlChar const **attrs)
};
if (pi->page_setup == NULL)
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (attr_enum (xin, attrs, "orientation", orientation_types, &orient))
@@ -1995,7 +1995,7 @@ xlsx_CT_PageMargins (GsfXMLIn *xin, xmlChar const **attrs)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
gnm_float margin;
- PrintInformation *pi = state->sheet->print_info;
+ GnmPrintInformation *pi = state->sheet->print_info;
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (attr_float (xin, attrs, "left", &margin))
@@ -2017,7 +2017,7 @@ static void
xlsx_CT_oddheader_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
- PrintInformation *pi = state->sheet->print_info;
+ GnmPrintInformation *pi = state->sheet->print_info;
xls_header_footer_import (pi->header, xin->content->str);
}
@@ -2025,7 +2025,7 @@ static void
xlsx_CT_oddfooter_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
- PrintInformation *pi = state->sheet->print_info;
+ GnmPrintInformation *pi = state->sheet->print_info;
xls_header_footer_import (pi->footer, xin->content->str);
}
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 3295eee..ca89c2c 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -2514,7 +2514,7 @@ xlsx_find_paper_code (GtkPaperSize *psize)
static void
xlsx_write_print_info_hf (XLSXWriteState *state, GsfXMLOut *xml,
- const PrintHF *hf, const char *hftext)
+ const GnmPrintHF *hf, const char *hftext)
{
char *s = xls_header_footer_export (hf);
@@ -2528,7 +2528,7 @@ xlsx_write_print_info_hf (XLSXWriteState *state, GsfXMLOut *xml,
static void
xlsx_write_print_info (XLSXWriteState *state, GsfXMLOut *xml)
{
- PrintInformation *pi = state->sheet->print_info;
+ GnmPrintInformation *pi = state->sheet->print_info;
double h_margin, f_margin;
double left;
double right;
@@ -2742,7 +2742,7 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *wb_part, Sheet *sheet)
char const *chart_drawing_rel_id = NULL;
char const *legacy_drawing_rel_id = NULL;
GnmStyle **col_styles;
- PrintInformation *pi = NULL;
+ GnmPrintInformation *pi = NULL;
GHashTable *zorder;
int z;
diff --git a/plugins/fn-info/functions.c b/plugins/fn-info/functions.c
index c8d6993..80c0990 100644
--- a/plugins/fn-info/functions.c
+++ b/plugins/fn-info/functions.c
@@ -1838,7 +1838,7 @@ gnumeric_get_link (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
sheet = (a->sheet == NULL) ? ei->pos->sheet : a->sheet;
gnm_cellpos_init_cellref (&pos, a, &(ei->pos->eval), sheet);
- link = sheet_hlink_find (sheet, &pos);
+ link = gnm_sheet_hlink_find (sheet, &pos);
if (link)
return value_new_string (gnm_hlink_get_target (link));
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 8f16b5a..96621ea 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -467,8 +467,8 @@ struct _OOParseState {
GnmPageBreaks *h, *v;
} page_breaks;
- PrintInformation *cur_pi;
- PrintHF *cur_hf;
+ GnmPrintInformation *cur_pi;
+ GnmPrintHF *cur_hf;
char **cur_hf_format;
int rep_rows_from;
int rep_rows_to;
@@ -2365,7 +2365,7 @@ odf_pi_parse_format (GsfXMLIn *xin, char **fmt)
}
static void
-odf_pi_parse_hf (GsfXMLIn *xin, PrintHF *hf)
+odf_pi_parse_hf (GsfXMLIn *xin, GnmPrintHF *hf)
{
odf_pi_parse_format (xin, &hf->left_format);
odf_pi_parse_format (xin, &hf->middle_format);
@@ -2373,7 +2373,7 @@ odf_pi_parse_hf (GsfXMLIn *xin, PrintHF *hf)
}
static void
-odf_pi_parse_expressions (GsfXMLIn *xin, PrintInformation *pi)
+odf_pi_parse_expressions (GsfXMLIn *xin, GnmPrintInformation *pi)
{
odf_pi_parse_hf (xin, pi->header);
odf_pi_parse_hf (xin, pi->footer);
@@ -2410,13 +2410,13 @@ oo_table_start (GsfXMLIn *xin, xmlChar const **attrs)
if (style_name != NULL) {
OOSheetStyle const *style = g_hash_table_lookup (state->styles.sheet, style_name);
if (style) {
- PrintInformation *pi = NULL;
+ GnmPrintInformation *pi = NULL;
if (style->master_page_name)
pi = g_hash_table_lookup (state->styles.master_pages,
style->master_page_name);
if (pi != NULL) {
- print_info_free (state->pos.sheet->print_info);
- state->pos.sheet->print_info = print_info_dup (pi);
+ gnm_print_info_free (state->pos.sheet->print_info);
+ state->pos.sheet->print_info = gnm_print_info_dup (pi);
odf_pi_parse_expressions (xin, state->pos.sheet->print_info);
}
g_object_set (state->pos.sheet,
@@ -5733,7 +5733,7 @@ odf_header_properties (GsfXMLIn *xin, xmlChar const **attrs)
if (state->print.cur_pi == NULL)
return;
- gps = print_info_get_page_setup (state->print.cur_pi);
+ gps = gnm_print_info_get_page_setup (state->print.cur_pi);
page_margin = gtk_page_setup_get_top_margin (gps, GTK_UNIT_POINTS);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
@@ -5757,7 +5757,7 @@ odf_footer_properties (GsfXMLIn *xin, xmlChar const **attrs)
if (state->print.cur_pi == NULL)
return;
- gps = print_info_get_page_setup (state->print.cur_pi);
+ gps = gnm_print_info_get_page_setup (state->print.cur_pi);
page_margin = gtk_page_setup_get_bottom_margin (gps, GTK_UNIT_POINTS);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
@@ -5803,7 +5803,7 @@ odf_page_layout_properties (GsfXMLIn *xin, xmlChar const **attrs)
if (state->print.cur_pi == NULL)
return;
- gps = print_info_get_page_setup (state->print.cur_pi);
+ gps = gnm_print_info_get_page_setup (state->print.cur_pi);
gtk_page_setup_set_orientation (gps, GTK_PAGE_ORIENTATION_PORTRAIT);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
@@ -5901,7 +5901,7 @@ odf_page_layout (GsfXMLIn *xin, xmlChar const **attrs)
oo_warning (xin, _("Missing page layout identifier"));
name = "Missing page layout identifier";
}
- state->print.cur_pi = print_information_new (TRUE);
+ state->print.cur_pi = gnm_print_information_new (TRUE);
g_hash_table_insert (state->styles.page_layouts, g_strdup (name),
state->print.cur_pi);
}
@@ -5937,7 +5937,7 @@ odf_master_page (GsfXMLIn *xin, xmlChar const **attrs)
OOParseState *state = (OOParseState *)xin->user_state;
char const *name = NULL;
char const *pl_name = NULL;
- PrintInformation *pi = NULL;
+ GnmPrintInformation *pi = NULL;
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_STYLE, "name"))
@@ -5951,19 +5951,19 @@ odf_master_page (GsfXMLIn *xin, xmlChar const **attrs)
if (pi == NULL) {
if (state->ver != OOO_VER_1) /* For OOO_VER_1 this may be acceptable */
oo_warning (xin, _("Master page style without page layout encountered!"));
- state->print.cur_pi = print_information_new (TRUE);
+ state->print.cur_pi = gnm_print_information_new (TRUE);
} else
- state->print.cur_pi = print_info_dup (pi);
+ state->print.cur_pi = gnm_print_info_dup (pi);
if (name == NULL) {
oo_warning (xin, _("Master page style without name encountered!"));
name = "Master page style without name encountered!";
}
- print_hf_free (state->print.cur_pi->header);
- print_hf_free (state->print.cur_pi->footer);
- state->print.cur_pi->header = print_hf_new (NULL, NULL, NULL);
- state->print.cur_pi->footer = print_hf_new (NULL, NULL, NULL);
+ gnm_print_hf_free (state->print.cur_pi->header);
+ gnm_print_hf_free (state->print.cur_pi->footer);
+ state->print.cur_pi->header = gnm_print_hf_new (NULL, NULL, NULL);
+ state->print.cur_pi->footer = gnm_print_hf_new (NULL, NULL, NULL);
g_hash_table_insert (state->styles.master_pages, g_strdup (name), state->print.cur_pi);
}
@@ -6005,7 +6005,7 @@ odf_header_footer (GsfXMLIn *xin, xmlChar const **attrs)
if (state->print.cur_pi == NULL)
return;
- gps = print_info_get_page_setup (state->print.cur_pi);
+ gps = gnm_print_info_get_page_setup (state->print.cur_pi);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (oo_attr_bool (xin, attrs, OO_NS_STYLE, "display",
@@ -13354,10 +13354,10 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
(GDestroyNotify) odf_oo_cell_style_unref);
state.styles.master_pages = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
- (GDestroyNotify) print_info_free);
+ (GDestroyNotify) gnm_print_info_free);
state.styles.page_layouts = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
- (GDestroyNotify) print_info_free);
+ (GDestroyNotify) gnm_print_info_free);
state.formats = g_hash_table_new_full (g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) go_format_unref);
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index b4ba335..9e3e1cb 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -299,7 +299,7 @@ table_master_page_style_name (GnmOOExport *state, Sheet const *sheet)
}
static char *
-page_layout_name (GnmOOExport *state, PrintInformation *pi)
+page_layout_name (GnmOOExport *state, GnmPrintInformation *pi)
{
return oo_item_name (state, OO_ITEM_PAGE_LAYOUT, pi);
}
@@ -5250,7 +5250,7 @@ odf_master_styles_to_xl_styles (GnmOOExport *state)
Sheet const *sheet = workbook_sheet_by_index (state->wb, i);
if (sheet->print_info->page_setup == NULL)
- print_info_load_defaults (sheet->print_info);
+ gnm_print_info_load_defaults (sheet->print_info);
if (sheet->print_info->header != NULL) {
odf_hf_region_to_xl_styles
@@ -5320,12 +5320,12 @@ odf_write_hf_region (GnmOOExport *state, char const *format, char const *id)
}
static void
-odf_write_hf (GnmOOExport *state, PrintInformation *pi, char const *id, gboolean header)
+odf_write_hf (GnmOOExport *state, GnmPrintInformation *pi, char const *id, gboolean header)
{
- PrintHF *hf = header ? pi->header : pi->footer;
+ GnmPrintHF *hf = header ? pi->header : pi->footer;
double page_margin;
double hf_height;
- GtkPageSetup *gps = print_info_get_page_setup (pi);
+ GtkPageSetup *gps = gnm_print_info_get_page_setup (pi);
if (hf == NULL)
return;
@@ -5458,12 +5458,12 @@ odf_write_office_styles (GnmOOExport *state)
}
static void
-odf_write_hf_style (GnmOOExport *state, PrintInformation *pi, char const *id, gboolean header)
+odf_write_hf_style (GnmOOExport *state, GnmPrintInformation *pi, char const *id, gboolean header)
{
- PrintHF *hf = header ? pi->header : pi->footer;
+ GnmPrintHF *hf = header ? pi->header : pi->footer;
double page_margin;
double hf_height;
- GtkPageSetup *gps = print_info_get_page_setup (pi);
+ GtkPageSetup *gps = gnm_print_info_get_page_setup (pi);
if (hf == NULL)
return;
@@ -5493,7 +5493,7 @@ odf_write_hf_style (GnmOOExport *state, PrintInformation *pi, char const *id, gb
static void
-odf_write_page_layout (GnmOOExport *state, PrintInformation *pi,
+odf_write_page_layout (GnmOOExport *state, GnmPrintInformation *pi,
Sheet const *sheet)
{
static char const *centre_type [] = {
@@ -5504,7 +5504,7 @@ odf_write_page_layout (GnmOOExport *state, PrintInformation *pi,
NULL };
char *name = page_layout_name (state, pi);
- GtkPageSetup *gps = print_info_get_page_setup (pi);
+ GtkPageSetup *gps = gnm_print_info_get_page_setup (pi);
int i;
GtkPageOrientation orient = gtk_page_setup_get_orientation (gps);
gboolean landscape = !(orient == GTK_PAGE_ORIENTATION_PORTRAIT ||
diff --git a/src/commands.c b/src/commands.c
index d0d756f..d0f4ea1 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -5744,7 +5744,7 @@ typedef struct {
GnmCommand cmd;
GSList *old_pi;
- PrintInformation *new_pi;
+ GnmPrintInformation *new_pi;
} CmdPrintSetup;
MAKE_GNM_COMMAND (CmdPrintSetup, cmd_print_setup, NULL)
@@ -5768,9 +5768,9 @@ cmd_print_setup_undo (GnmCommand *cmd, WorkbookControl *wbc)
g_return_val_if_fail (me->old_pi != NULL, TRUE);
if (me->cmd.sheet) {
- PrintInformation *pi = me->old_pi->data;
- print_info_free (me->cmd.sheet->print_info);
- me->cmd.sheet->print_info = print_info_dup (pi);
+ GnmPrintInformation *pi = me->old_pi->data;
+ gnm_print_info_free (me->cmd.sheet->print_info);
+ me->cmd.sheet->print_info = gnm_print_info_dup (pi);
if (me->cmd.sheet->sheet_type == GNM_SHEET_OBJECT)
update_sheet_graph_cb (me->cmd.sheet);
} else {
@@ -5780,13 +5780,13 @@ cmd_print_setup_undo (GnmCommand *cmd, WorkbookControl *wbc)
g_return_val_if_fail (g_slist_length (infos) == n, TRUE);
for (i = 0 ; i < n ; i++) {
- PrintInformation *pi = infos->data;
+ GnmPrintInformation *pi = infos->data;
Sheet *sheet = workbook_sheet_by_index (book, i);
g_return_val_if_fail (infos != NULL, TRUE);
- print_info_free (sheet->print_info);
- sheet->print_info = print_info_dup (pi);
+ gnm_print_info_free (sheet->print_info);
+ sheet->print_info = gnm_print_info_dup (pi);
if (sheet->sheet_type == GNM_SHEET_OBJECT)
update_sheet_graph_cb (sheet);
infos = infos->next;
@@ -5807,8 +5807,8 @@ cmd_print_setup_redo (GnmCommand *cmd, WorkbookControl *wbc)
if (save_pis)
me->old_pi = g_slist_append (me->old_pi, me->cmd.sheet->print_info);
else
- print_info_free (me->cmd.sheet->print_info);
- me->cmd.sheet->print_info = print_info_dup (me->new_pi);
+ gnm_print_info_free (me->cmd.sheet->print_info);
+ me->cmd.sheet->print_info = gnm_print_info_dup (me->new_pi);
if (me->cmd.sheet->sheet_type == GNM_SHEET_OBJECT)
update_sheet_graph_cb (me->cmd.sheet);
} else {
@@ -5820,8 +5820,8 @@ cmd_print_setup_redo (GnmCommand *cmd, WorkbookControl *wbc)
if (save_pis)
me->old_pi = g_slist_prepend (me->old_pi, sheet->print_info);
else
- print_info_free (sheet->print_info);
- sheet->print_info = print_info_dup (me->new_pi);
+ gnm_print_info_free (sheet->print_info);
+ sheet->print_info = gnm_print_info_dup (me->new_pi);
if (sheet->sheet_type == GNM_SHEET_OBJECT)
update_sheet_graph_cb (sheet);
}
@@ -5838,15 +5838,15 @@ cmd_print_setup_finalize (GObject *cmd)
GSList *list = me->old_pi;
if (me->new_pi)
- print_info_free (me->new_pi);
+ gnm_print_info_free (me->new_pi);
for (; list; list = list->next)
- print_info_free ((PrintInformation *) list->data);
+ gnm_print_info_free ((GnmPrintInformation *) list->data);
g_slist_free (me->old_pi);
gnm_command_finalize (cmd);
}
gboolean
-cmd_print_setup (WorkbookControl *wbc, Sheet *sheet, PrintInformation const *pi)
+cmd_print_setup (WorkbookControl *wbc, Sheet *sheet, GnmPrintInformation const *pi)
{
CmdPrintSetup *me;
@@ -5860,7 +5860,7 @@ cmd_print_setup (WorkbookControl *wbc, Sheet *sheet, PrintInformation const *pi)
else
me->cmd.cmd_descriptor = g_strdup (_("Page Setup For All Sheets"));
me->old_pi = NULL;
- me->new_pi = print_info_dup (pi);
+ me->new_pi = gnm_print_info_dup (pi);
return gnm_command_push_undo (wbc, G_OBJECT (me));
}
diff --git a/src/commands.h b/src/commands.h
index d5c3569..e51ef62 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -133,7 +133,7 @@ gboolean cmd_merge_data (WorkbookControl *wbc, Sheet *sheet,
GnmValue *merge_zone, GSList *merge_fields, GSList *merge_data);
gboolean cmd_change_meta_data (WorkbookControl *wbc, GSList *changes, GSList *removed);
-gboolean cmd_print_setup (WorkbookControl *wbc, Sheet *sheet, PrintInformation const *pi);
+gboolean cmd_print_setup (WorkbookControl *wbc, Sheet *sheet, GnmPrintInformation const *pi);
gboolean cmd_define_name (WorkbookControl *wbc, char const *name,
GnmParsePos const *pp,
GnmExprTop const *texpr,
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index dc72652..210fe4c 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -109,7 +109,7 @@ struct _PrinterSetupState {
WBCGtk *wbcg;
Sheet *sheet;
GtkBuilder *gui;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
GtkWidget *dialog;
GtkWidget *sheet_selector;
@@ -145,8 +145,8 @@ struct _PrinterSetupState {
GnmExprEntry *left_entry;
/* The header and footer data. */
- PrintHF *header;
- PrintHF *footer;
+ GnmPrintHF *header;
+ GnmPrintHF *footer;
/* The header and footer customize dialogs. */
GtkWidget *customize_header;
@@ -184,7 +184,7 @@ struct _HFCustomizeState {
GtkWidget *dialog;
GtkBuilder *gui;
PrinterSetupState *printer_setup_state;
- PrintHF **hf;
+ GnmPrintHF **hf;
gboolean is_header;
GtkTextBuffer *left_buffer;
GtkTextBuffer *middle_buffer;
@@ -871,13 +871,13 @@ static void
display_hf_preview (PrinterSetupState *state, gboolean header)
{
gchar *text = NULL;
- PrintHF *sample = NULL;
- HFRenderInfo *hfi;
+ GnmPrintHF *sample = NULL;
+ GnmPrintHFRenderInfo *hfi;
HFPreviewInfo *pi;
g_return_if_fail (state != NULL);
- hfi = hf_render_info_new ();
+ hfi = gnm_print_hf_render_info_new ();
hfi->page = 1;
hfi->pages = 99;
@@ -891,19 +891,19 @@ display_hf_preview (PrinterSetupState *state, gboolean header)
sample = state->footer;
}
- text = hf_format_render (sample->left_format, hfi, HF_RENDER_PRINT);
+ text = gnm_print_hf_format_render (sample->left_format, hfi, HF_RENDER_PRINT);
goc_item_set (pi->left, "text", text ? text : "", NULL);
g_free (text);
- text = hf_format_render (sample->middle_format, hfi, HF_RENDER_PRINT);
+ text = gnm_print_hf_format_render (sample->middle_format, hfi, HF_RENDER_PRINT);
goc_item_set (pi->middle, "text", text ? text : "", NULL);
g_free (text);
- text = hf_format_render (sample->right_format, hfi, HF_RENDER_PRINT);
+ text = gnm_print_hf_format_render (sample->right_format, hfi, HF_RENDER_PRINT);
goc_item_set (pi->right, "text", text ? text : "", NULL);
g_free (text);
- hf_render_info_destroy (hfi);
+ gnm_print_hf_render_info_destroy (hfi);
}
static void
@@ -921,15 +921,15 @@ do_footer_customize (PrinterSetupState *state)
static void
header_changed (GtkComboBox *menu, PrinterSetupState *state)
{
- GList *selection = g_list_nth (hf_formats,
+ GList *selection = g_list_nth (gnm_print_hf_formats,
gtk_combo_box_get_active (menu));
- PrintHF *format = (selection)? selection->data: NULL;
+ GnmPrintHF *format = (selection)? selection->data: NULL;
if (format == NULL) {
do_header_customize (state);
} else {
- print_hf_free (state->header);
- state->header = print_hf_copy (format);
+ gnm_print_hf_free (state->header);
+ state->header = gnm_print_hf_copy (format);
}
display_hf_preview (state, TRUE);
@@ -938,15 +938,15 @@ header_changed (GtkComboBox *menu, PrinterSetupState *state)
static void
footer_changed (GtkComboBox *menu, PrinterSetupState *state)
{
- GList *selection = g_list_nth (hf_formats,
+ GList *selection = g_list_nth (gnm_print_hf_formats,
gtk_combo_box_get_active (menu));
- PrintHF *format = (selection)? selection->data: NULL;
+ GnmPrintHF *format = (selection)? selection->data: NULL;
if (format == NULL) {
do_footer_customize (state);
} else {
- print_hf_free (state->footer);
- state->footer = print_hf_copy (format);
+ gnm_print_hf_free (state->footer);
+ state->footer = gnm_print_hf_copy (format);
}
display_hf_preview (state, FALSE);
@@ -977,15 +977,15 @@ create_hf_name (char const *left, char const *middle, char const *right)
}
static void
-append_hf_item (GtkListStore *store, PrintHF *format, HFRenderInfo *hfi)
+append_hf_item (GtkListStore *store, GnmPrintHF *format, GnmPrintHFRenderInfo *hfi)
{
GtkTreeIter iter;
char *left, *middle, *right;
char *res;
- left = hf_format_render (format->left_format, hfi, HF_RENDER_PRINT);
- middle = hf_format_render (format->middle_format, hfi, HF_RENDER_PRINT);
- right = hf_format_render (format->right_format, hfi, HF_RENDER_PRINT);
+ left = gnm_print_hf_format_render (format->left_format, hfi, HF_RENDER_PRINT);
+ middle = gnm_print_hf_format_render (format->middle_format, hfi, HF_RENDER_PRINT);
+ right = gnm_print_hf_format_render (format->right_format, hfi, HF_RENDER_PRINT);
res = create_hf_name (left, middle, right);
@@ -1009,12 +1009,12 @@ static void
fill_hf (PrinterSetupState *state, GtkComboBox *om, GCallback callback, gboolean header)
{
GList *l;
- HFRenderInfo *hfi;
+ GnmPrintHFRenderInfo *hfi;
GtkListStore *store;
- PrintHF *select = header ? state->header : state->footer;
+ GnmPrintHF *select = header ? state->header : state->footer;
int i, idx = -1;
- hfi = hf_render_info_new ();
+ hfi = gnm_print_hf_render_info_new ();
hfi->page = 1;
hfi->pages = 99;
@@ -1022,10 +1022,10 @@ fill_hf (PrinterSetupState *state, GtkComboBox *om, GCallback callback, gboolean
gtk_combo_box_set_model (om, GTK_TREE_MODEL (store));
g_object_unref (store);
- for (i = 0, l = hf_formats; l; l = l->next, i++) {
- PrintHF *format = l->data;
+ for (i = 0, l = gnm_print_hf_formats; l; l = l->next, i++) {
+ GnmPrintHF *format = l->data;
- if (print_hf_same (format, select))
+ if (gnm_print_hf_same (format, select))
idx = i;
append_hf_item (store, format, hfi);
@@ -1037,7 +1037,7 @@ fill_hf (PrinterSetupState *state, GtkComboBox *om, GCallback callback, gboolean
gtk_combo_box_set_active (om, idx);
g_signal_connect (G_OBJECT (om), "changed", callback, state);
- hf_render_info_destroy (hfi);
+ gnm_print_hf_render_info_destroy (hfi);
}
static void
@@ -1052,9 +1052,9 @@ do_setup_hf_menus (PrinterSetupState *state)
footer = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "option-menu-footer"));
if (state->header)
- print_hf_register (state->header);
+ gnm_print_hf_register (state->header);
if (state->footer)
- print_hf_register (state->footer);
+ gnm_print_hf_register (state->footer);
if (state->header)
fill_hf (state, header, G_CALLBACK (header_changed), TRUE);
@@ -1396,14 +1396,14 @@ hf_customize_apply (HFCustomizeState *hf_state)
middle_format = text_get (hf_state, hf_state->middle_buffer);
right_format = text_get (hf_state, hf_state->right_buffer);
- print_hf_free (*(hf_state->hf));
- *(hf_state->hf) = print_hf_new (left_format, middle_format, right_format);
+ gnm_print_hf_free (*(hf_state->hf));
+ *(hf_state->hf) = gnm_print_hf_new (left_format, middle_format, right_format);
g_free (left_format);
g_free (middle_format);
g_free (right_format);
- print_hf_register (*(hf_state->hf));
+ gnm_print_hf_register (*(hf_state->hf));
do_setup_hf_menus (hf_state->printer_setup_state);
display_hf_preview (hf_state->printer_setup_state, hf_state->is_header);
@@ -2106,10 +2106,10 @@ do_setup_hf (PrinterSetupState *state)
"text", 0,
NULL);
- state->header = print_hf_copy (state->pi->header ? state->pi->header :
- hf_formats->data);
- state->footer = print_hf_copy (state->pi->footer ? state->pi->footer :
- hf_formats->data);
+ state->header = gnm_print_hf_copy (state->pi->header ? state->pi->header :
+ gnm_print_hf_formats->data);
+ state->footer = gnm_print_hf_copy (state->pi->footer ? state->pi->footer :
+ gnm_print_hf_formats->data);
do_setup_hf_menus (state);
@@ -2368,7 +2368,7 @@ do_update_margin (UnitInfo *margin, double value, GtkUnit unit)
static void
do_update_page (PrinterSetupState *state)
{
- PrintInformation *pi = state->pi;
+ GnmPrintInformation *pi = state->pi;
GtkBuilder *gui;
double top, bottom;
double left, right;
@@ -2563,7 +2563,7 @@ scaling_fit_to_changed (GtkToggleButton *toggle, PrinterSetupState *state)
static void
do_setup_scale (PrinterSetupState *state)
{
- PrintInformation *pi = state->pi;
+ GnmPrintInformation *pi = state->pi;
GtkWidget *scale_percent_spin, *scale_width_spin, *scale_height_spin;
GtkBuilder *gui;
@@ -2642,7 +2642,7 @@ print_setup_get_sheet (PrinterSetupState *state)
static void
cb_do_print_preview (PrinterSetupState *state)
{
- PrintInformation *old_pi;
+ GnmPrintInformation *old_pi;
double width, height;
GogGraph *graph = NULL;
@@ -2683,7 +2683,7 @@ cb_do_print_ok (PrinterSetupState *state)
GTK_TOGGLE_BUTTON (
go_gtk_builder_get_widget (state->gui,
"is_default_check")))) {
- print_info_save (state->pi);
+ gnm_print_info_save (state->pi);
}
cmd_print_setup (GNM_WBC (state->wbcg),
print_setup_get_sheet (state), state->pi);
@@ -2711,9 +2711,9 @@ cb_do_print_destroy (PrinterSetupState *state)
g_object_unref (state->gui);
- print_hf_free (state->header);
- print_hf_free (state->footer);
- print_info_free (state->pi);
+ gnm_print_hf_free (state->header);
+ gnm_print_hf_free (state->footer);
+ gnm_print_info_free (state->pi);
g_free (state->pi_header);
g_free (state->pi_footer);
g_object_unref (state->unit_model);
@@ -2814,7 +2814,7 @@ printer_setup_state_new (WBCGtk *wbcg, Sheet *sheet)
state->wbcg = wbcg;
state->sheet = sheet;
state->gui = gui;
- state->pi = print_info_dup (sheet->print_info);
+ state->pi = gnm_print_info_dup (sheet->print_info);
state->display_unit = state->pi->desired_display.top;
state->customize_header = NULL;
state->customize_footer = NULL;
@@ -2900,7 +2900,7 @@ static void
do_fetch_margins (PrinterSetupState *state)
{
double header, footer, top, bottom, left, right;
- GtkPageSetup *ps = print_info_get_page_setup (state->pi);
+ GtkPageSetup *ps = gnm_print_info_get_page_setup (state->pi);
double factor = get_conversion_factor (state->display_unit);
header = state->margins.header.value;
@@ -2925,17 +2925,17 @@ do_fetch_margins (PrinterSetupState *state)
static void
do_fetch_hf (PrinterSetupState *state)
{
- print_hf_free (state->pi->header);
- print_hf_free (state->pi->footer);
+ gnm_print_hf_free (state->pi->header);
+ gnm_print_hf_free (state->pi->footer);
- state->pi->header = print_hf_copy (state->header);
- state->pi->footer = print_hf_copy (state->footer);
+ state->pi->header = gnm_print_hf_copy (state->header);
+ state->pi->footer = gnm_print_hf_copy (state->footer);
}
static void
do_fetch_page_info (PrinterSetupState *state)
{
- PrintInformation *pi = state->pi;
+ GnmPrintInformation *pi = state->pi;
GtkTreeIter iter;
pi->print_grid_lines = gtk_toggle_button_get_active
@@ -2985,7 +2985,7 @@ dialog_printer_setup_done_cb (GtkPageSetup *page_setup,
{
if (page_setup) {
PrinterSetupState *state = data;
- print_info_set_page_setup (state->pi,
+ gnm_print_info_set_page_setup (state->pi,
gtk_page_setup_copy (page_setup));
do_update_page (state);
}
@@ -2994,7 +2994,7 @@ dialog_printer_setup_done_cb (GtkPageSetup *page_setup,
static void
dialog_gtk_printer_setup_cb (PrinterSetupState *state)
{
- GtkPageSetup *page_setup = print_info_get_page_setup (state->pi);
+ GtkPageSetup *page_setup = gnm_print_info_get_page_setup (state->pi);
gtk_print_run_page_setup_dialog_async
(GTK_WINDOW (state->dialog),
diff --git a/src/gnumeric-fwd.h b/src/gnumeric-fwd.h
index 03144cf..bba2876 100644
--- a/src/gnumeric-fwd.h
+++ b/src/gnumeric-fwd.h
@@ -82,7 +82,7 @@ typedef struct _GnmValueErr GnmValueErr;
typedef struct _GnmValueFloat GnmValueFloat;
typedef struct _GnmValueRange GnmValueRange;
typedef struct _GnmValueStr GnmValueStr;
-typedef struct _PrintInformation PrintInformation;
+typedef struct GnmPrintInformation_ GnmPrintInformation;
typedef struct _Sheet Sheet;
typedef struct _SheetControl SheetControl;
typedef struct _SheetControlGUI SheetControlGUI;
diff --git a/src/history.c b/src/history.c
index 934f7bf..e3d85bd 100644
--- a/src/history.c
+++ b/src/history.c
@@ -17,7 +17,7 @@
* with any .gnumeric extension stripped off.
*/
gchar *
-history_item_label (gchar const *uri, int accel_number)
+gnm_history_item_label (gchar const *uri, int accel_number)
{
GString *res = g_string_new (NULL);
char *basename, *tmp;
diff --git a/src/history.h b/src/history.h
index 62c6a6a..8b584e6 100644
--- a/src/history.h
+++ b/src/history.h
@@ -6,7 +6,7 @@
G_BEGIN_DECLS
-char *history_item_label (char const *uri, int accel_number);
+char *gnm_history_item_label (char const *uri, int accel_number);
G_END_DECLS
diff --git a/src/hlink.c b/src/hlink.c
index b308c93..d2f5236 100644
--- a/src/hlink.c
+++ b/src/hlink.c
@@ -65,14 +65,14 @@ gnm_hlink_activate (GnmHLink *lnk, WBCGtk *wbcg)
}
/**
- * sheet_hlink_find:
+ * gnm_sheet_hlink_find:
* @sheet: #Sheet
* @pos: #GcmCellPos
*
* Returns: (transfer none): the found #GnmHLink.
**/
GnmHLink *
-sheet_hlink_find (Sheet const *sheet, GnmCellPos const *pos)
+gnm_sheet_hlink_find (Sheet const *sheet, GnmCellPos const *pos)
{
GnmStyle const *style = sheet_style_get (sheet, pos->col, pos->row);
return gnm_style_get_hlink (style);
diff --git a/src/hlink.h b/src/hlink.h
index 658a4a2..3a6368f 100644
--- a/src/hlink.h
+++ b/src/hlink.h
@@ -16,7 +16,7 @@ G_BEGIN_DECLS
#define GNM_HLINK_URL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNM_HLINK_URL_TYPE, GnmHLinkURL))
#define GNM_IS_HLINK_URL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNM_HLINK_URL_TYPE))
-GnmHLink *sheet_hlink_find (Sheet const *sheet, GnmCellPos const *pos);
+GnmHLink *gnm_sheet_hlink_find (Sheet const *sheet, GnmCellPos const *pos);
GType gnm_hlink_get_type (void);
gboolean gnm_hlink_activate (GnmHLink *lnk, WBCGtk *wbcg);
diff --git a/src/item-edit.c b/src/item-edit.c
index 89fa326..ba31d56 100644
--- a/src/item-edit.c
+++ b/src/item-edit.c
@@ -152,7 +152,7 @@ item_edit_draw (GocItem const *item, cairo_t *cr)
/* avoid a weak/strong cursor to extend outside the item,
a better fix would be to have enough room for cursors */
cairo_clip (cr);
- if (gnumeric_background_set (ie->style, cr, FALSE, NULL)) {
+ if (gnm_pattern_background_set (ie->style, cr, FALSE, NULL)) {
cairo_rectangle (cr, x0, y0, x1 - x0, y1 - y0);
cairo_fill (cr);
} else {
diff --git a/src/item-grid.c b/src/item-grid.c
index 4c8cb81..9afe91f 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -175,7 +175,7 @@ cb_cursor_motion (GnmItemGrid *ig)
pos.row = gnm_pane_find_row (pane, ig->last_y, NULL);
old_link = ig->cur_link;
- ig->cur_link = sheet_hlink_find (sheet, &pos);
+ ig->cur_link = gnm_sheet_hlink_find (sheet, &pos);
cursor = (ig->cur_link != NULL) ? ig->cursor_link : ig->cursor_cross;
if (pane->mouse_cursor != cursor) {
gnm_pane_mouse_cursor_set (pane, cursor);
@@ -320,7 +320,7 @@ item_grid_draw_merged_range (cairo_t *cr, GnmItemGrid *ig,
}
/* Check for background THEN selection */
- if (gnumeric_background_set (style, cr, is_selected, ctxt) ||
+ if (gnm_pattern_background_set (style, cr, is_selected, ctxt) ||
is_selected) {
/* Remember X excludes the far pixels */
if (dir > 0)
@@ -384,7 +384,7 @@ item_grid_draw_background (cairo_t *cr, GnmItemGrid *ig,
(sv->edit_pos.col != col || sv->edit_pos.row != row) &&
sv_is_pos_selected (sv, col, row);
gboolean const has_back =
- gnumeric_background_set (style, cr, is_selected, ctxt);
+ gnm_pattern_background_set (style, cr, is_selected, ctxt);
#if DEBUG_SELECTION_PAINT
if (is_selected) {
@@ -1078,7 +1078,7 @@ cb_cursor_come_to_rest (GnmItemGrid *ig)
pos.col = gnm_pane_find_col (pane, x, NULL);
pos.row = gnm_pane_find_row (pane, y, NULL);
- link = sheet_hlink_find (sheet, &pos);
+ link = gnm_sheet_hlink_find (sheet, &pos);
if (link != NULL && (tiptext = gnm_hlink_get_tip (link)) != NULL) {
g_return_val_if_fail (link == ig->cur_link, FALSE);
@@ -1187,7 +1187,7 @@ item_grid_button_released (GocItem *item, int button, G_GNUC_UNUSED double x_, G
if (pos != NULL) {
GnmHLink *link;
/* check for hyper links */
- link = sheet_hlink_find (sheet, pos);
+ link = gnm_sheet_hlink_find (sheet, pos);
if (link != NULL)
gnm_hlink_activate (link, scg_wbcg (scg));
}
diff --git a/src/mstyle.c b/src/mstyle.c
index ad8c7e0..9f8e06b 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -1335,7 +1335,7 @@ gnm_style_set_pattern (GnmStyle *style, int pattern)
{
g_return_if_fail (style != NULL);
g_return_if_fail (pattern >= 0);
- g_return_if_fail (pattern < GNUMERIC_SHEET_PATTERNS);
+ g_return_if_fail (pattern < GNM_PATTERNS_MAX);
elem_changed (style, MSTYLE_PATTERN);
elem_set (style, MSTYLE_PATTERN);
diff --git a/src/pattern.c b/src/pattern.c
index 2779ec9..14aefd5 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -44,7 +44,7 @@ static const GOPatternType patterns[] = {
};
/**
- * gnumeric_background_set:
+ * gnm_pattern_background_set:
* @mstyle:
* @cr:
* @is_selected:
@@ -56,7 +56,7 @@ static const GOPatternType patterns[] = {
*/
gboolean
-gnumeric_background_set (GnmStyle const *mstyle, cairo_t *cr,
+gnm_pattern_background_set (GnmStyle const *mstyle, cairo_t *cr,
gboolean const is_selected, GtkStyleContext *ctxt)
{
int pattern;
@@ -68,7 +68,7 @@ gnumeric_background_set (GnmStyle const *mstyle, cairo_t *cr,
* Draw a stipple too if the pattern is > 1
*/
pattern = gnm_style_get_pattern (mstyle);
- if (pattern > 0 && pattern < GNUMERIC_SHEET_PATTERNS) {
+ if (pattern > 0 && pattern < GNM_PATTERNS_MAX) {
GOPattern gopat;
cairo_pattern_t *crpat;
gopat.pattern = patterns[pattern];
diff --git a/src/pattern.h b/src/pattern.h
index 7641606..e53d4c6 100644
--- a/src/pattern.h
+++ b/src/pattern.h
@@ -6,9 +6,9 @@
G_BEGIN_DECLS
-#define GNUMERIC_SHEET_PATTERNS 25
+#define GNM_PATTERNS_MAX 25
-gboolean gnumeric_background_set (GnmStyle const *mstyle,
+gboolean gnm_pattern_background_set (GnmStyle const *mstyle,
cairo_t *cr,
gboolean const is_selected,
GtkStyleContext *ctxt);
diff --git a/src/preview-grid.c b/src/preview-grid.c
index 979cca7..d8d5a4d 100644
--- a/src/preview-grid.c
+++ b/src/preview-grid.c
@@ -174,7 +174,7 @@ static void
preview_grid_draw_background (cairo_t *cr, GnmPreviewGrid const *pg, GnmStyle const *mstyle,
int col, int row, int x, int y, int w, int h)
{
- if (gnumeric_background_set (mstyle, cr, FALSE, NULL)) {
+ if (gnm_pattern_background_set (mstyle, cr, FALSE, NULL)) {
cairo_rectangle (cr, x, y, w+1, h+1);
cairo_fill (cr);
}
diff --git a/src/print-cell.c b/src/print-cell.c
index 4f3fa76..4207af4 100644
--- a/src/print-cell.c
+++ b/src/print-cell.c
@@ -58,7 +58,7 @@ print_cell_gtk (GnmCell const *cell,
cairo_t *context,
double x1, double y1,
double width, double height, double h_center,
- PrintInformation const *pinfo)
+ GnmPrintInformation const *pinfo)
{
GnmRenderedValue *rv, *rv100 = NULL;
GOColor fore_color;
@@ -192,7 +192,7 @@ print_cell_background_gtk (cairo_t *context,
G_GNUC_UNUSED int col, G_GNUC_UNUSED int row,
double x, double y, double w, double h)
{
- if (gnumeric_background_set (style, context, FALSE, NULL))
+ if (gnm_pattern_background_set (style, context, FALSE, NULL))
/* Remember api excludes the far pixels */
print_rectangle_gtk (context, x, y, w+0.2, h+0.2);
gnm_style_border_print_diag_gtk (style, context, x, y, x+w, y+h);
@@ -211,7 +211,7 @@ print_merged_range_gtk (cairo_t *context,
Sheet const *sheet,
double start_x, double start_y,
GnmRange const *view, GnmRange const *range,
- PrintInformation const *pinfo)
+ GnmPrintInformation const *pinfo)
{
double l, r, t, b;
int last;
@@ -248,7 +248,7 @@ print_merged_range_gtk (cairo_t *context,
style = g_ptr_array_index (style->cond_styles, res);
}
- if (gnumeric_background_set (style, context, FALSE, NULL))
+ if (gnm_pattern_background_set (style, context, FALSE, NULL))
print_rectangle_gtk (context, l, t, r-l+0.2, b-t+0.2);
if (range->start.col < view->start.col)
@@ -291,7 +291,7 @@ void
gnm_gtk_print_cell_range (cairo_t *context,
Sheet const *sheet, GnmRange *range,
double base_x, double base_y,
- PrintInformation const *pinfo)
+ GnmPrintInformation const *pinfo)
{
ColRowInfo const *ri = NULL, *next_ri = NULL;
int const dir = sheet->text_is_rtl ? -1 : 1;
diff --git a/src/print-cell.h b/src/print-cell.h
index 7cd3d08..f1acc06 100644
--- a/src/print-cell.h
+++ b/src/print-cell.h
@@ -12,7 +12,7 @@ G_BEGIN_DECLS
void gnm_gtk_print_cell_range (cairo_t *context,
Sheet const *sheet, GnmRange *range,
double base_x, double base_y,
- PrintInformation const *pinfo);
+ GnmPrintInformation const *pinfo);
G_END_DECLS
diff --git a/src/print-info.c b/src/print-info.c
index 4913d6f..92ed71e 100644
--- a/src/print-info.c
+++ b/src/print-info.c
@@ -41,7 +41,7 @@
#define MAX_SAVED_CUSTOM_HF_FORMATS 9
-GList *hf_formats = NULL;
+GList *gnm_print_hf_formats = NULL;
static gint hf_formats_base_num = 0;
GType
@@ -86,12 +86,12 @@ gnm_print_errors_get_type (void)
}
-PrintHF *
-print_hf_new (char const *left_side_format,
+GnmPrintHF *
+gnm_print_hf_new (char const *left_side_format,
char const *middle_format,
char const *right_side_format)
{
- PrintHF *hf = g_new0 (PrintHF, 1);
+ GnmPrintHF *hf = g_new0 (GnmPrintHF, 1);
hf->left_format = g_strdup (left_side_format ?
left_side_format : "");
hf->middle_format = g_strdup (middle_format ?
@@ -102,7 +102,7 @@ print_hf_new (char const *left_side_format,
}
gboolean
-print_hf_same (PrintHF const *a, PrintHF const *b)
+gnm_print_hf_same (GnmPrintHF const *a, GnmPrintHF const *b)
{
if (a->left_format != b->left_format) {
if (a->left_format == NULL ||
@@ -126,31 +126,31 @@ print_hf_same (PrintHF const *a, PrintHF const *b)
return TRUE;
}
-PrintHF *
-print_hf_register (PrintHF *hf)
+GnmPrintHF *
+gnm_print_hf_register (GnmPrintHF *hf)
{
GList *l;
- PrintHF *newi;
+ GnmPrintHF *newi;
g_return_val_if_fail (hf != NULL, NULL);
- for (l = hf_formats; l; l = l->next)
- if (print_hf_same (hf, l->data))
+ for (l = gnm_print_hf_formats; l; l = l->next)
+ if (gnm_print_hf_same (hf, l->data))
return l->data;
- newi = print_hf_copy (hf);
- hf_formats = g_list_append (hf_formats, newi);
+ newi = gnm_print_hf_copy (hf);
+ gnm_print_hf_formats = g_list_append (gnm_print_hf_formats, newi);
return newi;
}
-PrintHF *
-print_hf_copy (PrintHF const *source)
+GnmPrintHF *
+gnm_print_hf_copy (GnmPrintHF const *source)
{
- PrintHF *res;
+ GnmPrintHF *res;
- res = g_new0 (PrintHF, 1);
+ res = g_new0 (GnmPrintHF, 1);
res->left_format = g_strdup (source->left_format);
res->middle_format = g_strdup (source->middle_format);
res->right_format = g_strdup (source->right_format);
@@ -159,7 +159,7 @@ print_hf_copy (PrintHF const *source)
}
void
-print_hf_free (PrintHF *print_hf)
+gnm_print_hf_free (GnmPrintHF *print_hf)
{
if (print_hf == NULL)
return;
@@ -171,20 +171,20 @@ print_hf_free (PrintHF *print_hf)
}
GType
-print_hf_get_type (void)
+gnm_print_hf_get_type (void)
{
static GType t = 0;
if (t == 0) {
- t = g_boxed_type_register_static ("PrintHF",
- (GBoxedCopyFunc)print_hf_copy,
- (GBoxedFreeFunc)print_hf_free);
+ t = g_boxed_type_register_static ("GnmPrintHF",
+ (GBoxedCopyFunc)gnm_print_hf_copy,
+ (GBoxedFreeFunc)gnm_print_hf_free);
}
return t;
}
void
-print_info_free (PrintInformation *pi)
+gnm_print_info_free (GnmPrintInformation *pi)
{
g_return_if_fail (pi != NULL);
@@ -195,8 +195,8 @@ print_info_free (PrintInformation *pi)
g_free (pi->repeat_top);
g_free (pi->repeat_left);
- print_hf_free (pi->header);
- print_hf_free (pi->footer);
+ gnm_print_hf_free (pi->header);
+ gnm_print_hf_free (pi->footer);
g_free (pi->printtofile_uri);
if (pi->page_setup)
@@ -206,14 +206,14 @@ print_info_free (PrintInformation *pi)
}
GType
-print_information_get_type (void)
+gnm_print_information_get_type (void)
{
static GType t = 0;
if (t == 0) {
- t = g_boxed_type_register_static ("PrintInformation",
- (GBoxedCopyFunc)print_info_dup,
- (GBoxedFreeFunc)print_info_free);
+ t = g_boxed_type_register_static ("GnmPrintInformation",
+ (GBoxedCopyFunc)gnm_print_info_dup,
+ (GBoxedFreeFunc)gnm_print_info_free);
}
return t;
}
@@ -242,9 +242,9 @@ load_formats (void)
int i;
for (i = 0; predefined_formats [i].left_format; i++) {
- PrintHF *format;
+ GnmPrintHF *format;
- format = print_hf_new (
+ format = gnm_print_hf_new (
predefined_formats [i].left_format[0]?
_(predefined_formats [i].left_format):"",
predefined_formats [i].middle_format[0]?
@@ -252,7 +252,7 @@ load_formats (void)
predefined_formats [i].right_format[0]?
_(predefined_formats [i].right_format):"");
- hf_formats = g_list_prepend (hf_formats, format);
+ gnm_print_hf_formats = g_list_prepend (gnm_print_hf_formats, format);
hf_formats_base_num++;
}
}
@@ -269,14 +269,14 @@ load_formats (void)
while (left != NULL && middle != NULL && right != NULL)
{
- PrintHF *format;
+ GnmPrintHF *format;
- format = print_hf_new
+ format = gnm_print_hf_new
(left->data ? left->data : "",
middle->data ? middle->data : "",
right->data ? right->data : "");
- hf_formats = g_list_prepend (hf_formats, format);
+ gnm_print_hf_formats = g_list_prepend (gnm_print_hf_formats, format);
left = left->next;
middle = middle->next;
@@ -284,11 +284,11 @@ load_formats (void)
}
}
- hf_formats = g_list_reverse (hf_formats);
+ gnm_print_hf_formats = g_list_reverse (gnm_print_hf_formats);
}
/**
- * print_info_load_defaults:
+ * gnm_print_info_load_defaults:
*
*
* NOTE: This reads from a globally stored configuration. If a
@@ -296,8 +296,8 @@ load_formats (void)
* override these global defaults.
*/
-PrintInformation *
-print_info_load_defaults (PrintInformation *res)
+GnmPrintInformation *
+gnm_print_info_load_defaults (GnmPrintInformation *res)
{
GSList *list;
GtkPrintSettings *settings;
@@ -334,17 +334,17 @@ print_info_load_defaults (PrintInformation *res)
list = gnm_conf_get_printsetup_header ();
res->header = list ?
- print_hf_new (g_slist_nth_data (list, 0),
+ gnm_print_hf_new (g_slist_nth_data (list, 0),
g_slist_nth_data (list, 1),
g_slist_nth_data (list, 2)) :
- print_hf_new ("", _("&[TAB]"), "");
+ gnm_print_hf_new ("", _("&[TAB]"), "");
list = gnm_conf_get_printsetup_footer ();
res->footer = list ?
- print_hf_new (g_slist_nth_data (list, 0),
+ gnm_print_hf_new (g_slist_nth_data (list, 0),
g_slist_nth_data (list, 1),
g_slist_nth_data (list, 2)) :
- print_hf_new ("", _("Page &[PAGE]"), "");
+ gnm_print_hf_new ("", _("Page &[PAGE]"), "");
settings = gnm_conf_get_print_settings ();
print_info_set_from_settings (res, settings);
@@ -354,15 +354,15 @@ print_info_load_defaults (PrintInformation *res)
}
/**
- * print_information_new:
+ * gnm_print_information_new:
*
- * Returns a newly allocated PrintInformation buffer
+ * Returns a newly allocated GnmPrintInformation buffer
*
*/
-PrintInformation *
-print_information_new (gboolean load_defaults)
+GnmPrintInformation *
+gnm_print_information_new (gboolean load_defaults)
{
- PrintInformation *res = g_new0 (PrintInformation, 1);
+ GnmPrintInformation *res = g_new0 (GnmPrintInformation, 1);
res->print_as_draft = FALSE;
res->comment_placement = GNM_PRINT_COMMENTS_IN_PLACE;
@@ -380,7 +380,7 @@ print_information_new (gboolean load_defaults)
res->print_range = GNM_PRINT_ACTIVE_SHEET;
if (load_defaults)
- return print_info_load_defaults (res);
+ return gnm_print_info_load_defaults (res);
else
return res;
}
@@ -399,12 +399,12 @@ save_formats (void)
GSList *right = NULL;
int start;
- start = g_list_length (hf_formats) - MAX_SAVED_CUSTOM_HF_FORMATS;
+ start = g_list_length (gnm_print_hf_formats) - MAX_SAVED_CUSTOM_HF_FORMATS;
if (start > base)
base = start;
- for (l = hf_formats; l; l = l->next) {
- PrintHF *hf = l->data;
+ for (l = gnm_print_hf_formats; l; l = l->next) {
+ GnmPrintHF *hf = l->data;
if (base-- > 0)
continue;
@@ -429,12 +429,12 @@ save_formats (void)
static void
destroy_formats (void)
{
- g_list_free_full (hf_formats, (GDestroyNotify)print_hf_free);
- hf_formats = NULL;
+ g_list_free_full (gnm_print_hf_formats, (GDestroyNotify)gnm_print_hf_free);
+ gnm_print_hf_formats = NULL;
}
static GSList *
-make_triple (const PrintHF *hf)
+make_triple (const GnmPrintHF *hf)
{
GSList *l = NULL;
@@ -446,7 +446,7 @@ make_triple (const PrintHF *hf)
}
void
-print_info_save (PrintInformation *pi)
+gnm_print_info_save (GnmPrintInformation *pi)
{
GSList *l;
@@ -519,7 +519,7 @@ unit_to_unit_name (GtkUnit unit)
static void
-render_cell (GString *target, HFRenderInfo *info, char const *args)
+render_cell (GString *target, GnmPrintHFRenderInfo *info, char const *args)
{
gboolean use_repeating = FALSE;
@@ -565,7 +565,7 @@ render_cell (GString *target, HFRenderInfo *info, char const *args)
}
static void
-render_tab (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
+render_tab (GString *target, GnmPrintHFRenderInfo *info, G_GNUC_UNUSED char const *args)
{
if (info->sheet)
g_string_append (target, info->sheet->name_unquoted);
@@ -574,19 +574,19 @@ render_tab (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
}
static void
-render_page (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
+render_page (GString *target, GnmPrintHFRenderInfo *info, G_GNUC_UNUSED char const *args)
{
g_string_append_printf (target, "%d", info->page);
}
static void
-render_pages (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
+render_pages (GString *target, GnmPrintHFRenderInfo *info, G_GNUC_UNUSED char const *args)
{
g_string_append_printf (target, "%d", info->pages);
}
static void
-render_timestamp_with_format (GString *target, char const *number_format, HFRenderInfo *info)
+render_timestamp_with_format (GString *target, char const *number_format, GnmPrintHFRenderInfo *info)
{
GOFormat *format;
@@ -598,7 +598,7 @@ render_timestamp_with_format (GString *target, char const *number_format, HFRend
}
static void
-render_date (GString *target, HFRenderInfo *info, char const *args)
+render_date (GString *target, GnmPrintHFRenderInfo *info, char const *args)
{
char const *date_format;
@@ -611,7 +611,7 @@ render_date (GString *target, HFRenderInfo *info, char const *args)
}
static void
-render_time (GString *target, HFRenderInfo *info, char const *args)
+render_time (GString *target, GnmPrintHFRenderInfo *info, char const *args)
{
char const *time_format;
@@ -623,7 +623,7 @@ render_time (GString *target, HFRenderInfo *info, char const *args)
}
static void
-render_file (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
+render_file (GString *target, GnmPrintHFRenderInfo *info, G_GNUC_UNUSED char const *args)
{
if (info->sheet != NULL && info->sheet->workbook != NULL) {
char *name = go_basename_from_uri (
@@ -635,7 +635,7 @@ render_file (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args
}
static void
-render_path (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
+render_path (GString *target, GnmPrintHFRenderInfo *info, G_GNUC_UNUSED char const *args)
{
if (info->sheet != NULL && info->sheet->workbook != NULL) {
char *path = go_dirname_from_uri (
@@ -647,7 +647,7 @@ render_path (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args
}
static void
-render_title (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *args)
+render_title (GString *target, GnmPrintHFRenderInfo *info, G_GNUC_UNUSED char const *args)
{
if (info->sheet != NULL && info->sheet->workbook != NULL) {
GsfDocProp *prop;
@@ -664,7 +664,7 @@ render_title (GString *target, HFRenderInfo *info, G_GNUC_UNUSED char const *arg
static struct {
char const *name;
- void (*render)(GString *target, HFRenderInfo *info, char const *args);
+ void (*render)(GString *target, GnmPrintHFRenderInfo *info, char const *args);
char *name_trans;
} render_ops [] = {
{ N_("TAB"), render_tab , NULL},
@@ -684,8 +684,8 @@ static struct {
*/
static void
render_opcode (GString *target, char /* non-const */ *opcode,
- HFRenderInfo *info,
- G_GNUC_UNUSED HFRenderType render_type)
+ GnmPrintHFRenderInfo *info,
+ G_GNUC_UNUSED GnmPrintHFRenderType render_type)
{
char *args;
char *opcode_trans;
@@ -740,7 +740,7 @@ render_opcode (GString *target, char /* non-const */ *opcode,
#endif
char *
-hf_format_render (char const *format, HFRenderInfo *info, HFRenderType render_type)
+gnm_print_hf_format_render (char const *format, GnmPrintHFRenderInfo *info, GnmPrintHFRenderType render_type)
{
GString *result;
char const *p;
@@ -771,12 +771,12 @@ hf_format_render (char const *format, HFRenderInfo *info, HFRenderType render_ty
return g_string_free (result, FALSE);
}
-HFRenderInfo *
-hf_render_info_new (void)
+GnmPrintHFRenderInfo *
+gnm_print_hf_render_info_new (void)
{
- HFRenderInfo *hfi;
+ GnmPrintHFRenderInfo *hfi;
- hfi = g_new0 (HFRenderInfo, 1);
+ hfi = g_new0 (GnmPrintHFRenderInfo, 1);
hfi->date_conv = go_date_conv_from_str ("Lotus:1900");
hfi->date_time = value_new_float
(go_date_timet_to_serial_raw (time (NULL), hfi->date_conv));
@@ -789,7 +789,7 @@ hf_render_info_new (void)
}
void
-hf_render_info_destroy (HFRenderInfo *hfi)
+gnm_print_hf_render_info_destroy (GnmPrintHFRenderInfo *hfi)
{
g_return_if_fail (hfi != NULL);
@@ -797,13 +797,13 @@ hf_render_info_destroy (HFRenderInfo *hfi)
g_free (hfi);
}
-static HFRenderInfo *
-hf_render_info_copy (HFRenderInfo *hfi)
+static GnmPrintHFRenderInfo *
+hf_render_info_copy (GnmPrintHFRenderInfo *hfi)
{
- HFRenderInfo *res;
+ GnmPrintHFRenderInfo *res;
g_return_val_if_fail (hfi != NULL, NULL);
- res = g_new (HFRenderInfo, 1);
+ res = g_new (GnmPrintHFRenderInfo, 1);
res->sheet = hfi->sheet;
res->page = hfi->page;
res->pages = hfi->pages;
@@ -815,14 +815,14 @@ hf_render_info_copy (HFRenderInfo *hfi)
}
GType
-hf_render_info_get_type (void)
+gnm_print_hf_render_info_get_type (void)
{
static GType t = 0;
if (t == 0) {
- t = g_boxed_type_register_static ("HFRenderInfo",
+ t = g_boxed_type_register_static ("GnmPrintHFRenderInfo",
(GBoxedCopyFunc)hf_render_info_copy,
- (GBoxedFreeFunc)hf_render_info_destroy);
+ (GBoxedFreeFunc)gnm_print_hf_render_info_destroy);
}
return t;
}
@@ -1001,12 +1001,12 @@ print_shutdown (void)
#define COPY(field) dst->field = src->field
-PrintInformation *
-print_info_dup (PrintInformation const *src)
+GnmPrintInformation *
+gnm_print_info_dup (GnmPrintInformation const *src)
{
- PrintInformation *dst = print_information_new (TRUE);
+ GnmPrintInformation *dst = gnm_print_information_new (TRUE);
- print_info_load_defaults ((PrintInformation *)src);
+ gnm_print_info_load_defaults ((GnmPrintInformation *)src);
COPY(scaling);
COPY(edge_to_below_header);
@@ -1037,11 +1037,11 @@ print_info_dup (PrintInformation const *src)
gnm_page_breaks_free (dst->page_breaks.v);
dst->page_breaks.v = gnm_page_breaks_dup (src->page_breaks.v);
- print_hf_free (dst->header);
- dst->header = print_hf_copy (src->header);
+ gnm_print_hf_free (dst->header);
+ dst->header = gnm_print_hf_copy (src->header);
- print_hf_free (dst->footer);
- dst->footer = print_hf_copy (src->footer);
+ gnm_print_hf_free (dst->footer);
+ dst->footer = gnm_print_hf_copy (src->footer);
COPY(start_page);
COPY(n_copies);
@@ -1059,14 +1059,14 @@ print_info_dup (PrintInformation const *src)
#undef COPY
void
-print_info_get_margins (PrintInformation *pi,
+print_info_get_margins (GnmPrintInformation *pi,
double *top, double *bottom,
double *left, double *right,
double *edge_to_below_header,
double *edge_to_above_footer)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
if (NULL != top)
@@ -1084,60 +1084,60 @@ print_info_get_margins (PrintInformation *pi,
}
void
-print_info_set_margin_header (PrintInformation *pi, double header)
+print_info_set_margin_header (GnmPrintInformation *pi, double header)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
gtk_page_setup_set_top_margin (pi->page_setup, header, GTK_UNIT_POINTS);
}
void
-print_info_set_margin_footer (PrintInformation *pi, double footer)
+print_info_set_margin_footer (GnmPrintInformation *pi, double footer)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
gtk_page_setup_set_bottom_margin (pi->page_setup, footer, GTK_UNIT_POINTS);
}
void
-print_info_set_margin_left (PrintInformation *pi, double left)
+print_info_set_margin_left (GnmPrintInformation *pi, double left)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
gtk_page_setup_set_left_margin (pi->page_setup, left, GTK_UNIT_POINTS);
}
void
-print_info_set_margin_right (PrintInformation *pi, double right)
+print_info_set_margin_right (GnmPrintInformation *pi, double right)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
gtk_page_setup_set_right_margin (pi->page_setup, right, GTK_UNIT_POINTS);
}
void
-print_info_set_edge_to_above_footer (PrintInformation *pi, double e_f)
+print_info_set_edge_to_above_footer (GnmPrintInformation *pi, double e_f)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
pi->edge_to_above_footer = e_f;
}
void
-print_info_set_edge_to_below_header (PrintInformation *pi, double e_h)
+print_info_set_edge_to_below_header (GnmPrintInformation *pi, double e_h)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
pi->edge_to_below_header = e_h;
@@ -1145,11 +1145,11 @@ print_info_set_edge_to_below_header (PrintInformation *pi, double e_h)
void
-print_info_set_margins (PrintInformation *pi,
+print_info_set_margins (GnmPrintInformation *pi,
double header, double footer, double left, double right)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_if_fail (pi->page_setup != NULL);
if (header >= 0)
@@ -1265,11 +1265,11 @@ page_setup_set_paper (GtkPageSetup *page_setup, char const *paper)
}
gboolean
-print_info_set_paper (PrintInformation *pi, char const *paper)
+print_info_set_paper (GnmPrintInformation *pi, char const *paper)
{
g_return_val_if_fail (pi != NULL, TRUE);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return page_setup_set_paper (pi->page_setup, paper);
}
@@ -1303,31 +1303,31 @@ page_setup_get_paper (GtkPageSetup *page_setup)
}
char *
-print_info_get_paper (PrintInformation *pi)
+print_info_get_paper (GnmPrintInformation *pi)
{
g_return_val_if_fail (pi != NULL, g_strdup (GTK_PAPER_NAME_A4));
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return page_setup_get_paper (pi->page_setup);
}
GtkPaperSize *
-print_info_get_paper_size (PrintInformation *pi)
+print_info_get_paper_size (GnmPrintInformation *pi)
{
g_return_val_if_fail (pi != NULL, NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return gtk_page_setup_get_paper_size (pi->page_setup);
}
char const*
-print_info_get_paper_display_name (PrintInformation *pi)
+print_info_get_paper_display_name (GnmPrintInformation *pi)
{
GtkPaperSize* paper;
g_return_val_if_fail (pi != NULL, "ERROR: No printinformation specified");
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_val_if_fail (pi->page_setup != NULL, "ERROR: No pagesetup loaded");
paper = gtk_page_setup_get_paper_size (pi->page_setup);
@@ -1335,41 +1335,41 @@ print_info_get_paper_display_name (PrintInformation *pi)
}
double
-print_info_get_paper_width (PrintInformation *pi, GtkUnit unit)
+print_info_get_paper_width (GnmPrintInformation *pi, GtkUnit unit)
{
g_return_val_if_fail (pi != NULL, 0.);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return gtk_page_setup_get_paper_width (pi->page_setup, unit);
}
double
-print_info_get_paper_height (PrintInformation *pi, GtkUnit unit)
+print_info_get_paper_height (GnmPrintInformation *pi, GtkUnit unit)
{
g_return_val_if_fail (pi != NULL, 0);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return gtk_page_setup_get_paper_height (pi->page_setup, unit);
}
/**
- * print_info_get_page_setup:
- * @pi: #PrintInformation
+ * gnm_print_info_get_page_setup:
+ * @pi: #GnmPrintInformation
*
* Returns: (transfer none): the page setup.
**/
GtkPageSetup*
-print_info_get_page_setup (PrintInformation *pi)
+gnm_print_info_get_page_setup (GnmPrintInformation *pi)
{
g_return_val_if_fail (pi != NULL, NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return pi->page_setup;
}
/**
- * print_info_set_page_setup :
- * @pi: #PrintInformation
+ * gnm_print_info_set_page_setup :
+ * @pi: #GnmPrintInformation
* @page_setup: #GtkPageSetup
*
* Absorb a ref to @page_setup.
@@ -1382,11 +1382,11 @@ print_info_get_page_setup (PrintInformation *pi)
* 2) Why not copy the page_setup in here and make the arg const ?
**/
void
-print_info_set_page_setup (PrintInformation *pi, GtkPageSetup *page_setup)
+gnm_print_info_set_page_setup (GnmPrintInformation *pi, GtkPageSetup *page_setup)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
if (pi->page_setup) {
double header, footer, left, right;
@@ -1400,12 +1400,12 @@ print_info_set_page_setup (PrintInformation *pi, GtkPageSetup *page_setup)
}
GtkPageOrientation
-print_info_get_paper_orientation (PrintInformation *pi)
+print_info_get_paper_orientation (GnmPrintInformation *pi)
{
GtkPageOrientation orientation;
g_return_val_if_fail (pi != NULL, GTK_PAGE_ORIENTATION_PORTRAIT);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
g_return_val_if_fail (pi->page_setup != NULL, GTK_PAGE_ORIENTATION_PORTRAIT);
orientation = gtk_page_setup_get_orientation (pi->page_setup);
@@ -1413,24 +1413,24 @@ print_info_get_paper_orientation (PrintInformation *pi)
}
void
-print_info_set_paper_orientation (PrintInformation *pi,
+print_info_set_paper_orientation (GnmPrintInformation *pi,
GtkPageOrientation orientation)
{
g_return_if_fail (pi != NULL);
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
gtk_page_setup_set_orientation (pi->page_setup, orientation);
}
/**
* print_info_set_breaks :
- * @pi: #PrintInformation
+ * @pi: #GnmPrintInformation
* @breaks: #GnmPageBreaks
*
* NOTE : Takes ownership of @breaks. DO NOT FREE after calling.
**/
void
-print_info_set_breaks (PrintInformation *pi,
+print_info_set_breaks (GnmPrintInformation *pi,
GnmPageBreaks *breaks)
{
GnmPageBreaks **target;
@@ -1447,7 +1447,7 @@ print_info_set_breaks (PrintInformation *pi,
}
gboolean
-print_info_has_manual_breaks (PrintInformation *pi)
+print_info_has_manual_breaks (GnmPrintInformation *pi)
{
if (gnm_page_breaks_get_next_manual_break (pi->page_breaks.v, 0) > -1)
return TRUE;
@@ -1714,7 +1714,7 @@ gnm_page_breaks_clean (GnmPageBreaks *breaks)
}
void
-print_info_set_printtofile_uri (PrintInformation *pi,
+print_info_set_printtofile_uri (GnmPrintInformation *pi,
gchar const *uri)
{
g_free (pi->printtofile_uri);
@@ -1722,7 +1722,7 @@ print_info_set_printtofile_uri (PrintInformation *pi,
}
void
-print_info_set_printtofile_from_settings (PrintInformation *pi,
+print_info_set_printtofile_from_settings (GnmPrintInformation *pi,
GtkPrintSettings* settings,
gchar const *default_uri)
{
@@ -1736,7 +1736,7 @@ print_info_set_printtofile_from_settings (PrintInformation *pi,
}
void
-print_info_set_from_settings (PrintInformation *pi,
+print_info_set_from_settings (GnmPrintInformation *pi,
GtkPrintSettings* settings)
{
pi->print_range = gtk_print_settings_get_int_with_default
@@ -1746,14 +1746,14 @@ print_info_set_from_settings (PrintInformation *pi,
}
PrintRange
-print_info_get_printrange (PrintInformation *pi)
+print_info_get_printrange (GnmPrintInformation *pi)
{
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return pi->print_range;
}
void
-print_info_set_printrange (PrintInformation *pi, PrintRange pr)
+print_info_set_printrange (GnmPrintInformation *pi, PrintRange pr)
{
if (pr >= GNM_PRINT_ACTIVE_SHEET
&& pr <= GNM_PRINT_SHEET_SELECTION_IGNORE_PRINTAREA)
@@ -1764,9 +1764,9 @@ print_info_set_printrange (PrintInformation *pi, PrintRange pr)
char const *
-print_info_get_printtofile_uri (PrintInformation *pi)
+print_info_get_printtofile_uri (GnmPrintInformation *pi)
{
- print_info_load_defaults (pi);
+ gnm_print_info_load_defaults (pi);
return pi->printtofile_uri;
}
diff --git a/src/print-info.h b/src/print-info.h
index 351fada..d97a44e 100644
--- a/src/print-info.h
+++ b/src/print-info.h
@@ -17,14 +17,14 @@ GType gnm_print_errors_get_type (void);
typedef struct {
GtkUnit top, bottom, left, right, header, footer;
-} DesiredDisplay;
+} GnmPrintDesiredDisplay;
/* Header/Footer definition */
typedef struct {
char *left_format;
char *middle_format;
char *right_format;
-} PrintHF;
+} GnmPrintHF;
typedef enum {
GNM_PRINT_COMMENTS_NONE,
@@ -57,9 +57,9 @@ typedef struct {
GArray *details; /* ordered array of GnmPageBreak */
} GnmPageBreaks;
-struct _PrintInformation {
- struct _PrintInfoScaling {
- enum _PrintScaleType {
+struct GnmPrintInformation_ {
+ struct GnmPrintInfoScaling_ {
+ enum GnmPrintScaleType_ {
PRINT_SCALE_PERCENTAGE,
PRINT_SCALE_FIT_PAGES
} type;
@@ -81,7 +81,7 @@ struct _PrintInformation {
} scaling;
double edge_to_below_header;
double edge_to_above_footer;
- DesiredDisplay desired_display;
+ GnmPrintDesiredDisplay desired_display;
char *repeat_top, *repeat_left;
unsigned int print_across_then_down;
unsigned int center_vertically:1;
@@ -102,7 +102,7 @@ struct _PrintInformation {
GnmPageBreaks *h, /* between rows */
*v; /* between columns */
} page_breaks;
- PrintHF *header, *footer;
+ GnmPrintHF *header, *footer;
int start_page; /* < 0 implies auto */
int n_copies;
@@ -116,7 +116,7 @@ struct _PrintInformation {
typedef enum {
HF_RENDER_PRINT
-} HFRenderType;
+} GnmPrintHFRenderType;
typedef struct {
Sheet const *sheet;
@@ -126,34 +126,34 @@ typedef struct {
GODateConventions const *date_conv;
GnmRange page_area;
GnmCellPos top_repeating;
-} HFRenderInfo;
+} GnmPrintHFRenderInfo;
-GType print_information_get_type (void);
-PrintInformation *print_information_new (gboolean load_defaults);
-PrintInformation *print_info_load_defaults (PrintInformation *pi);
-PrintInformation *print_info_dup (PrintInformation const *pi);
-void print_info_free (PrintInformation *pi);
-void print_info_save (PrintInformation *pi);
+GType gnm_print_information_get_type (void);
+GnmPrintInformation *gnm_print_information_new (gboolean load_defaults);
+GnmPrintInformation *gnm_print_info_load_defaults (GnmPrintInformation *pi);
+GnmPrintInformation *gnm_print_info_dup (GnmPrintInformation const *pi);
+void gnm_print_info_free (GnmPrintInformation *pi);
+void gnm_print_info_save (GnmPrintInformation *pi);
-GtkPageSetup *print_info_get_page_setup (PrintInformation *pi); /* Does not return a ref! */
-void print_info_set_page_setup (PrintInformation *pi, GtkPageSetup *page_setup);
+GtkPageSetup *gnm_print_info_get_page_setup (GnmPrintInformation *pi); /* Does not return a ref! */
+void gnm_print_info_set_page_setup (GnmPrintInformation *pi, GtkPageSetup *page_setup);
-GType print_hf_get_type (void);
-PrintHF *print_hf_new (char const *left,
+GType gnm_print_hf_get_type (void);
+GnmPrintHF *gnm_print_hf_new (char const *left,
char const *middle,
char const *right);
-void print_hf_free (PrintHF *print_hf);
-PrintHF *print_hf_copy (PrintHF const *source);
-PrintHF *print_hf_register (PrintHF *hf);
-gboolean print_hf_same (PrintHF const *a, PrintHF const *b);
+void gnm_print_hf_free (GnmPrintHF *print_hf);
+GnmPrintHF *gnm_print_hf_copy (GnmPrintHF const *source);
+GnmPrintHF *gnm_print_hf_register (GnmPrintHF *hf);
+gboolean gnm_print_hf_same (GnmPrintHF const *a, GnmPrintHF const *b);
-char *hf_format_render (char const *format,
- HFRenderInfo *info,
- HFRenderType render_type);
+char *gnm_print_hf_format_render (char const *format,
+ GnmPrintHFRenderInfo *info,
+ GnmPrintHFRenderType render_type);
-GType hf_render_info_get_type (void);
-HFRenderInfo *hf_render_info_new (void);
-void hf_render_info_destroy (HFRenderInfo *hfi);
+GType gnm_print_hf_render_info_get_type (void);
+GnmPrintHFRenderInfo *gnm_print_hf_render_info_new (void);
+void gnm_print_hf_render_info_destroy (GnmPrintHFRenderInfo *hfi);
GtkUnit unit_name_to_unit (char const *name);
@@ -164,48 +164,48 @@ void print_shutdown (void);
gboolean page_setup_set_paper (GtkPageSetup *page_setup, char const *paper);
char *page_setup_get_paper (GtkPageSetup *page_setup); /* caller frees result */
-gboolean print_info_set_paper (PrintInformation *pi, char const *paper);
-char *print_info_get_paper (PrintInformation *pi); /* caller frees result */
-GtkPaperSize *print_info_get_paper_size (PrintInformation *pi);
+gboolean print_info_set_paper (GnmPrintInformation *pi, char const *paper);
+char *print_info_get_paper (GnmPrintInformation *pi); /* caller frees result */
+GtkPaperSize *print_info_get_paper_size (GnmPrintInformation *pi);
-void print_info_set_paper_orientation (PrintInformation *pi,
+void print_info_set_paper_orientation (GnmPrintInformation *pi,
GtkPageOrientation orientation);
-char const *print_info_get_paper_display_name (PrintInformation *pi);
+char const *print_info_get_paper_display_name (GnmPrintInformation *pi);
-double print_info_get_paper_width (PrintInformation *pi, GtkUnit unit);
-double print_info_get_paper_height (PrintInformation *pi, GtkUnit unit);
-GtkPageOrientation print_info_get_paper_orientation (PrintInformation *pi);
-void print_info_get_margins (PrintInformation *pi,
+double print_info_get_paper_width (GnmPrintInformation *pi, GtkUnit unit);
+double print_info_get_paper_height (GnmPrintInformation *pi, GtkUnit unit);
+GtkPageOrientation print_info_get_paper_orientation (GnmPrintInformation *pi);
+void print_info_get_margins (GnmPrintInformation *pi,
double *top, double *bottom,
double *left, double *right,
double *edge_to_below_header,
double *edge_to_above_footer);
-void print_info_set_margins (PrintInformation *pi,
+void print_info_set_margins (GnmPrintInformation *pi,
double header, double footer, double left, double right);
-void print_info_set_margin_header (PrintInformation *pi, double header);
-void print_info_set_margin_footer (PrintInformation *pi, double footer);
-void print_info_set_margin_left (PrintInformation *pi, double left);
-void print_info_set_margin_right (PrintInformation *pi, double right);
-void print_info_set_edge_to_above_footer (PrintInformation *pi,
+void print_info_set_margin_header (GnmPrintInformation *pi, double header);
+void print_info_set_margin_footer (GnmPrintInformation *pi, double footer);
+void print_info_set_margin_left (GnmPrintInformation *pi, double left);
+void print_info_set_margin_right (GnmPrintInformation *pi, double right);
+void print_info_set_edge_to_above_footer (GnmPrintInformation *pi,
double e_f);
-void print_info_set_edge_to_below_header (PrintInformation *pi,
+void print_info_set_edge_to_below_header (GnmPrintInformation *pi,
double e_h);
-void print_info_set_printtofile_uri (PrintInformation *pi,
+void print_info_set_printtofile_uri (GnmPrintInformation *pi,
gchar const *uri);
void print_info_set_printtofile_from_settings
- (PrintInformation *pi,
+ (GnmPrintInformation *pi,
GtkPrintSettings *settings,
gchar const *default_uri);
void print_info_set_from_settings
- (PrintInformation *pi,
+ (GnmPrintInformation *pi,
GtkPrintSettings *settings);
-char const *print_info_get_printtofile_uri (PrintInformation *pi);
-PrintRange print_info_get_printrange (PrintInformation *pi);
-void print_info_set_printrange (PrintInformation *pi, PrintRange pr);
+char const *print_info_get_printtofile_uri (GnmPrintInformation *pi);
+PrintRange print_info_get_printrange (GnmPrintInformation *pi);
+void print_info_set_printrange (GnmPrintInformation *pi, PrintRange pr);
-void print_info_set_breaks (PrintInformation *pi, GnmPageBreaks *breaks);
+void print_info_set_breaks (GnmPrintInformation *pi, GnmPageBreaks *breaks);
-gboolean print_info_has_manual_breaks (PrintInformation *pi);
+gboolean print_info_has_manual_breaks (GnmPrintInformation *pi);
GType gnm_page_breaks_get_type (void);
GnmPageBreaks *gnm_page_breaks_new (gboolean is_vert);
@@ -228,7 +228,7 @@ gboolean print_load_repeat_range (char const *str, GnmRange *r, Sheet co
/* Formats known */
-extern GList *hf_formats;
+extern GList *gnm_print_hf_formats;
G_END_DECLS
diff --git a/src/print.c b/src/print.c
index 3bca23c..baf8160 100644
--- a/src/print.c
+++ b/src/print.c
@@ -75,7 +75,7 @@ typedef struct {
guint to, from;
gboolean ignore_pb;
guint last_pagination;
- HFRenderInfo *hfi;
+ GnmPrintHFRenderInfo *hfi;
GtkWidget *progress;
gboolean cancel;
gboolean preview;
@@ -149,7 +149,7 @@ static PrintingInstance *
printing_instance_new (void)
{
PrintingInstance * pi = g_new0 (PrintingInstance,1);
- pi->hfi = hf_render_info_new ();
+ pi->hfi = gnm_print_hf_render_info_new ();
pi->cancel = FALSE;
pi->hfi->pages = -1;
@@ -170,7 +170,7 @@ static void
printing_instance_delete (PrintingInstance *pi)
{
g_list_free_full (pi->gnmSheets, sheet_print_info_free);
- hf_render_info_destroy (pi->hfi);
+ gnm_print_hf_render_info_destroy (pi->hfi);
if (pi->progress) {
gtk_widget_destroy (pi->progress);
}
@@ -258,7 +258,7 @@ print_page_cells (G_GNUC_UNUSED GtkPrintContext *context,
{
gnm_gtk_print_cell_range (cr, sheet, range,
base_x, base_y,
- (PrintInformation const *) sheet->print_info);
+ (GnmPrintInformation const *) sheet->print_info);
gnm_print_sheet_objects (cr, sheet, range, base_x, base_y);
}
@@ -412,7 +412,7 @@ print_hf_element (GtkPrintContext *context, cairo_t *cr,
G_GNUC_UNUSED Sheet const *sheet,
char const *format,
PangoAlignment side, gdouble width, gboolean align_bottom,
- HFRenderInfo *hfi)
+ GnmPrintHFRenderInfo *hfi)
{
PangoLayout *layout;
@@ -422,7 +422,7 @@ print_hf_element (GtkPrintContext *context, cairo_t *cr,
if (format == NULL)
return;
- text = hf_format_render (format, hfi, HF_RENDER_PRINT);
+ text = gnm_print_hf_format_render (format, hfi, HF_RENDER_PRINT);
if (text == NULL)
return;
@@ -457,7 +457,7 @@ print_hf_element (GtkPrintContext *context, cairo_t *cr,
*/
static void
print_hf_line (GtkPrintContext *context, cairo_t *cr, Sheet const *sheet,
- PrintHF const *hf, gboolean align_bottom, gdouble width, HFRenderInfo *hfi)
+ GnmPrintHF const *hf, gboolean align_bottom, gdouble width, GnmPrintHFRenderInfo *hfi)
{
print_hf_element (context, cr, sheet, hf->left_format, PANGO_ALIGN_LEFT, width, align_bottom, hfi);
print_hf_element (context, cr, sheet, hf->middle_format, PANGO_ALIGN_CENTER, width, align_bottom,
hfi);
@@ -483,7 +483,7 @@ print_page (G_GNUC_UNUSED GtkPrintOperation *operation,
SheetPageRange *gsr)
{
Sheet *sheet = gsr->sheet;
- PrintInformation *pinfo = sheet->print_info;
+ GnmPrintInformation *pinfo = sheet->print_info;
gdouble print_height, print_width;
gdouble main_height, main_width;
gdouble header, footer, left, right;
@@ -946,7 +946,7 @@ compute_sheet_pages (GtkPrintContext *context,
SheetPrintInfo *spi)
{
Sheet *sheet = spi->sheet;
- PrintInformation *pinfo = sheet->print_info;
+ GnmPrintInformation *pinfo = sheet->print_info;
GnmRange r;
GnmRange const *selection_range;
GnmRange print_area;
@@ -1166,7 +1166,7 @@ print_job_info_get (Sheet *sheet, PrintRange range, gboolean const preview)
/*
* Setup render info
*/
- pj->render_info = hf_render_info_new ();
+ pj->render_info = gnm_print_hf_render_info_new ();
pj->render_info->sheet = sheet;
pj->render_info->page = 1;
@@ -1177,7 +1177,7 @@ static void
print_job_info_destroy (PrintJobInfo *pj)
{
g_object_unref (pj->gp_config);
- hf_render_info_destroy (pj->render_info);
+ gnm_print_hf_render_info_destroy (pj->render_info);
if (pj->decoration_layout)
g_object_unref (pj->decoration_layout);
if (pj->print_context)
@@ -1375,7 +1375,7 @@ gnm_request_page_setup_cb (GtkPrintOperation *operation,
gtk_print_settings_set_use_color (settings, !sheet->print_info->print_black_and_white);
if (sheet->print_info->page_setup == NULL)
- print_info_load_defaults (sheet->print_info);
+ gnm_print_info_load_defaults (sheet->print_info);
if (sheet->print_info->page_setup != NULL)
cp_gtk_page_setup (sheet->print_info->page_setup, setup);
}
@@ -1815,7 +1815,7 @@ gnm_print_sheet (WorkbookControl *wbc, Sheet *sheet,
gtk_print_operation_set_print_settings (print, settings);
g_object_unref (settings);
- page_setup = print_info_get_page_setup (sheet->print_info);
+ page_setup = gnm_print_info_get_page_setup (sheet->print_info);
if (page_setup)
gtk_print_operation_set_default_page_setup (print, page_setup);
@@ -2013,7 +2013,7 @@ gnm_print_so (WorkbookControl *wbc, GPtrArray *sos,
gtk_print_operation_set_print_settings (print, settings);
g_object_unref (settings);
- page_setup = print_info_get_page_setup (sheet->print_info);
+ page_setup = gnm_print_info_get_page_setup (sheet->print_info);
if (page_setup)
gtk_print_operation_set_default_page_setup (print, page_setup);
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index 6c18932..58e9517 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -162,7 +162,7 @@ cb_graph_size_changed (GocItem *item, GtkAllocation *allocation)
GogRenderer *rend;
GogGraph *graph;
SheetObject *so = sheet_object_view_get_so (GNM_SO_VIEW (item->parent));
- PrintInformation *pi = so->sheet->print_info;
+ GnmPrintInformation *pi = so->sheet->print_info;
double top, bottom, left, right, edge_to_below_header, edge_to_above_footer, w, h, x = 0., y = 0.;
w = print_info_get_paper_width (pi, GTK_UNIT_POINTS);
h = print_info_get_paper_height (pi, GTK_UNIT_POINTS);
diff --git a/src/sheet.c b/src/sheet.c
index ec16b3b..ba5f9cc 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -805,7 +805,7 @@ gnm_sheet_init (Sheet *sheet)
sheet->rows.info = g_ptr_array_new ();
sheet_row_set_default_size_pts (sheet, 12.75);
- sheet->print_info = print_information_new (FALSE);
+ sheet->print_info = gnm_print_information_new (FALSE);
sheet->filters = NULL;
sheet->scenarios = NULL;
@@ -4584,7 +4584,7 @@ sheet_destroy (Sheet *sheet)
g_warning ("Unexpected left over views");
if (sheet->print_info) {
- print_info_free (sheet->print_info);
+ gnm_print_info_free (sheet->print_info);
sheet->print_info = NULL;
}
@@ -6005,8 +6005,8 @@ sheet_dup (Sheet const *src)
"tab-background", src->tab_color,
NULL);
- print_info_free (dst->print_info);
- dst->print_info = print_info_dup (src->print_info);
+ gnm_print_info_free (dst->print_info);
+ dst->print_info = gnm_print_info_dup (src->print_info);
sheet_dup_styles (src, dst);
sheet_dup_merged_regions (src, dst);
diff --git a/src/sheet.h b/src/sheet.h
index edbb6c4..6c08d42 100644
--- a/src/sheet.h
+++ b/src/sheet.h
@@ -105,7 +105,7 @@ struct _Sheet {
GSList *list_merged;
GHashTable *hash_merged;
SheetPrivate *priv;
- PrintInformation *print_info;
+ GnmPrintInformation *print_info;
GnmColor *tab_color;
GnmColor *tab_text_color;
GnmSheetType sheet_type;
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index b8a4a7e..e86e7b9 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -1547,7 +1547,7 @@ wbcg_menu_state_update (WorkbookControl *wbc, int flags)
if (MS_PAGE_BREAKS & flags) {
gint col = sv->edit_pos.col;
gint row = sv->edit_pos.row;
- PrintInformation *pi = sheet->print_info;
+ GnmPrintInformation *pi = sheet->print_info;
char const* new_label = NULL;
char const *new_tip = NULL;
@@ -4856,7 +4856,7 @@ wbc_gtk_reload_recent_file_menu (WBCGtk const *wbcg)
GtkAction *action;
char const *uri = ptr->data;
char *name = g_strdup_printf ("FileHistoryEntry%d", i);
- char *label = history_item_label (uri, i);
+ char *label = gnm_history_item_label (uri, i);
char *filename = go_filename_from_uri (uri);
char *filename_utf8 = filename ? g_filename_to_utf8 (filename, -1, NULL, NULL, NULL) : NULL;
char *tooltip = g_strdup_printf (_("Open %s"), filename_utf8 ? filename_utf8 : uri);
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index f71d0b6..0f57056 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -881,7 +881,7 @@ xml_sax_print_margins (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
double points = -1.;
xml_sax_must_have_sheet (state);
@@ -977,7 +977,7 @@ xml_sax_print_scale (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
double percentage;
int cols, rows;
@@ -1001,7 +1001,7 @@ static void
xml_sax_print_vcenter (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1017,7 +1017,7 @@ static void
xml_sax_print_hcenter (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1033,7 +1033,7 @@ static void
xml_sax_print_grid (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1049,7 +1049,7 @@ static void
xml_sax_print_do_not_print (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1065,7 +1065,7 @@ static void
xml_sax_print_print_range (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1084,7 +1084,7 @@ static void
xml_sax_monochrome (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1100,7 +1100,7 @@ static void
xml_sax_print_titles (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -1116,7 +1116,7 @@ static void
xml_sax_repeat_top (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
xml_sax_must_have_sheet (state);
@@ -1134,7 +1134,7 @@ static void
xml_sax_repeat_left (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
xml_sax_must_have_sheet (state);
@@ -1152,8 +1152,8 @@ static void
xml_sax_print_hf (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
- PrintHF *hf;
+ GnmPrintInformation *pi;
+ GnmPrintHF *hf;
xml_sax_must_have_sheet (state);
@@ -1192,7 +1192,7 @@ static void
xml_sax_even_if_only_styles (GsfXMLIn *xin, xmlChar const **attrs)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
int val;
xml_sax_must_have_sheet (state);
@@ -2840,7 +2840,7 @@ static void
xml_sax_orientation (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
- PrintInformation *pi;
+ GnmPrintInformation *pi;
GtkPageOrientation orient = GTK_PAGE_ORIENTATION_PORTRAIT;
xml_sax_must_have_sheet (state);
diff --git a/src/xml-sax-write.c b/src/xml-sax-write.c
index a578b54..580e9e2 100644
--- a/src/xml-sax-write.c
+++ b/src/xml-sax-write.c
@@ -289,7 +289,7 @@ xml_write_print_repeat_range (GnmOutputXML *state,
static void
xml_write_print_hf (GnmOutputXML *state, char const *name,
- PrintHF const *hf)
+ GnmPrintHF const *hf)
{
gsf_xml_out_start_element (state->output, name);
gsf_xml_out_add_cstr (state->output, "Left", hf->left_format);
@@ -326,7 +326,7 @@ xml_write_breaks (GnmOutputXML *state, GnmPageBreaks *breaks)
}
static void
-xml_write_print_info (GnmOutputXML *state, PrintInformation *pi)
+xml_write_print_info (GnmOutputXML *state, GnmPrintInformation *pi)
{
char *paper_name;
char const *uri;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]