start_elem (w, name);
if (h->n)
{
- start_elem (w, "pageParagraph");
+ start_elem (w, "vps:pageParagraph");
for (size_t i = 0; i < h->n; i++)
{
- start_elem (w, "text");
+ start_elem (w, "vtx:text");
write_attr (w, "type", "title");
write_text (w, h->paragraphs[i].markup); /* XXX */
end_elem (w);
static void
write_page_setup (struct spv_writer *w, const struct page_setup *ps)
{
- start_elem (w, "pageSetup");
+ start_elem (w, "vps:pageSetup");
write_attr_format (w, "initial-page-number", "%d", ps->initial_page_number);
write_attr (w, "chart-size",
(ps->chart_size == PAGE_CHART_AS_IS ? "as-is"
write_attr (w, "reference-orientation",
ps->orientation == PAGE_PORTRAIT ? "portrait" : "landscape");
write_attr_format (w, "space-after", "%.1fpt", ps->object_spacing * 72.0);
- write_page_heading (w, &ps->headings[0], "pageHeader");
- write_page_heading (w, &ps->headings[1], "pageFooter");
+ write_page_heading (w, &ps->headings[0], "vps:pageHeader");
+ write_page_heading (w, &ps->headings[1], "vps:pageFooter");
end_elem (w);
}
}
static void
-put_format (struct buf *buf, const struct fmt_spec *f, bool honor_small)
+put_format (struct buf *buf, struct fmt_spec f, bool honor_small)
{
- int type = f->type == FMT_F && honor_small ? 40 : fmt_to_io (f->type);
- put_u32 (buf, (type << 16) | (f->w << 8) | f->d);
+ int type = f.type == FMT_F && honor_small ? 40 : fmt_to_io (f.type);
+ put_u32 (buf, (type << 16) | (f.w << 8) | f.d);
}
static int
{
put_byte (buf, 2);
put_value_mod (buf, value, NULL);
- put_format (buf, &value->numeric.format, value->numeric.honor_small);
+ put_format (buf, value->numeric.format, value->numeric.honor_small);
put_double (buf, value->numeric.x);
put_string (buf, value->numeric.var_name);
put_string (buf, value->numeric.value_label);
{
put_byte (buf, 1);
put_value_mod (buf, value, NULL);
- put_format (buf, &value->numeric.format, value->numeric.honor_small);
+ put_format (buf, value->numeric.format, value->numeric.honor_small);
put_double (buf, value->numeric.x);
}
break;
put_value_mod (buf, value, NULL);
size_t len = strlen (value->string.s);
if (value->string.hex)
- put_format (buf, &(struct fmt_spec) { .type = FMT_AHEX, .w = len * 2 },
+ put_format (buf, (struct fmt_spec) { .type = FMT_AHEX, .w = len * 2 },
false);
else
- put_format (buf, &(struct fmt_spec) { .type = FMT_A, .w = len }, false);
+ put_format (buf, (struct fmt_spec) { .type = FMT_A, .w = len }, false);
put_string (buf, value->string.value_label);
put_string (buf, value->string.var_name);
put_show_values (buf, value->string.show);
put_bool (buf, table->rotate_outer_row_labels);
put_bool (buf, true);
put_u32 (buf, 0x15);
- put_u32 (buf, table->look->width_ranges[H][0]);
- put_u32 (buf, table->look->width_ranges[H][1]);
- put_u32 (buf, table->look->width_ranges[V][0]);
- put_u32 (buf, table->look->width_ranges[V][1]);
+ put_u32 (buf, table->look->col_heading_width_range[0]);
+ put_u32 (buf, table->look->col_heading_width_range[1]);
+ put_u32 (buf, table->look->row_heading_width_range[0]);
+ put_u32 (buf, table->look->row_heading_width_range[1]);
put_u64 (buf, table_id);
/* Titles. */
put_color (buf, &a->font_style.bg[0]);
bool alt
- = (!cell_color_equal (&a->font_style.fg[0], &a->font_style.fg[1])
- || !cell_color_equal (&a->font_style.bg[0], &a->font_style.bg[1]));
+ = (!cell_color_equal (a->font_style.fg[0], a->font_style.fg[1])
+ || !cell_color_equal (a->font_style.bg[0], a->font_style.bg[1]));
put_bool (buf, alt);
if (alt)
{