Change ag_chart_create_svg() to return the length of the SVG document

This is needed later for SVG export
This commit is contained in:
2014-06-27 16:51:56 +02:00
parent cc7aed38c1
commit f6e3f9e033
3 changed files with 7 additions and 2 deletions

View File

@@ -612,7 +612,7 @@ ag_chart_save_to_file(AgChart *chart, GFile *file, GError **err)
}
gchar *
ag_chart_create_svg(AgChart *chart, GError **err)
ag_chart_create_svg(AgChart *chart, gsize *length, GError **err)
{
xmlDocPtr doc = create_save_doc(chart);
xmlDocPtr xslt_doc;
@@ -851,6 +851,10 @@ ag_chart_create_svg(AgChart *chart, GError **err)
xmlDocDumpFormatMemoryEnc(svg_doc, (xmlChar **)&save_content, &save_length, "UTF-8", 1);
xmlFreeDoc(svg_doc);
if (length != NULL) {
*length = save_length;
}
return save_content;
}