Implemented ag_chart_save_to_file
This commit is contained in:
parent
ec75d9b4cd
commit
25ffd534e5
@ -641,5 +641,14 @@ create_save_doc(AgChart *chart)
|
|||||||
void
|
void
|
||||||
ag_chart_save_to_file(AgChart *chart, GFile *file, GError **err)
|
ag_chart_save_to_file(AgChart *chart, GFile *file, GError **err)
|
||||||
{
|
{
|
||||||
|
xmlChar *content = NULL;
|
||||||
|
int length;
|
||||||
|
xmlDocPtr save_doc = create_save_doc(chart);
|
||||||
|
|
||||||
|
xmlDocDumpFormatMemoryEnc(save_doc, &content, &length, "UTF-8", 1);
|
||||||
|
|
||||||
|
g_file_replace_contents(file, (const gchar *)content, length, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, err);
|
||||||
|
|
||||||
|
xmlFreeDoc(save_doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user