{
start_elem (w, "container");
write_attr (w, "visibility", "visible");
{
start_elem (w, "container");
write_attr (w, "visibility", "visible");
write_attr (w, "page-break-before", "always");
w->need_page_break = false;
}
write_attr (w, "page-break-before", "always");
w->need_page_break = false;
}
- start_container (w);
-
- start_elem (w, "label");
- write_text (w, (text->type == TEXT_ITEM_TITLE ? "Title"
- : text->type == TEXT_ITEM_PAGE_TITLE ? "Page Title"
- : "Log"));
- end_elem (w);
+ start_container (w, &text->output_item);
start_elem (w, "vtx:text");
write_attr (w, "type", (text->type == TEXT_ITEM_TITLE ? "title"
start_elem (w, "vtx:text");
write_attr (w, "type", (text->type == TEXT_ITEM_TITLE ? "title"
-spv_writer_put_image (struct spv_writer *w, cairo_surface_t *image)
+spv_writer_put_image (struct spv_writer *w, const struct output_item *item,
+ cairo_surface_t *image)
start_elem (w, "object");
write_attr (w, "type", "unknown");
start_elem (w, "object");
write_attr (w, "type", "unknown");
int table_id = ++w->n_tables;
bool initial_depth = w->heading_depth;
if (!initial_depth)
spv_writer_open_file (w);
int table_id = ++w->n_tables;
bool initial_depth = w->heading_depth;
if (!initial_depth)
spv_writer_open_file (w);
- char *title = pivot_value_to_string (table->title, table);
- char *subtype = pivot_value_to_string (table->subtype, table);
-
- start_elem (w, "label");
- write_text (w, title);
- end_elem (w);
+ char *subtype = (item->pt->subtype
+ ? pivot_value_to_string (item->pt->subtype, item->pt)
+ : xstrdup ("unknown"));
write_attr (w, "type", "table"); /* XXX */
write_attr (w, "subType", subtype);
write_attr_format (w, "tableId", "%d", table_id);
free (subtype);
write_attr (w, "type", "table"); /* XXX */
write_attr (w, "subType", subtype);
write_attr_format (w, "tableId", "%d", table_id);
free (subtype);
start_elem (w, "vtb:tableStructure");
start_elem (w, "vtb:dataPath");
start_elem (w, "vtb:tableStructure");
start_elem (w, "vtb:dataPath");
spv_writer_close_file (w, "");
struct buf buf = { NULL, 0, 0 };
spv_writer_close_file (w, "");
struct buf buf = { NULL, 0, 0 };
zip_writer_add_memory (w->zw, data_path, buf.data, buf.len);
free (buf.data);
zip_writer_add_memory (w->zw, data_path, buf.data, buf.len);
free (buf.data);
else if (is_group_close_item (item))
spv_writer_close_heading (w);
else if (is_table_item (item))
else if (is_group_close_item (item))
spv_writer_close_heading (w);
else if (is_table_item (item))
&(struct cell_color) CELL_COLOR_BLACK,
&(struct cell_color) CELL_COLOR_WHITE);
if (cairo_surface_status (surface) == CAIRO_STATUS_SUCCESS)
&(struct cell_color) CELL_COLOR_BLACK,
&(struct cell_color) CELL_COLOR_WHITE);
if (cairo_surface_status (surface) == CAIRO_STATUS_SUCCESS)