Commit e4178e4f authored by Morten Welinder's avatar Morten Welinder

Graphs: Force update of graphs after load.

This forces the idle handlers to run.
parent 40092ab4
2015-01-19 Morten Welinder <terra@gnome.org>
* src/workbook.c (workbook_update_graphs): New function.
* src/workbook-view.c (workbook_view_new_from_input): Update
graphs.
2015-01-14 Morten Welinder <terra@gnome.org>
* src/xml-sax-read.c (xml_sax_cell_content): When we fail to parse
......
......@@ -324,6 +324,12 @@ xlsx_write_axis (XLSXWriteState *state, GsfXMLOut *xml, GogAxis *axis, GogAxisTy
GogObject *label;
GOFormat *format;
#ifdef DEBUG_AXIS
g_printerr ("Writing axis %s. (discrete = %d)\n",
gog_object_get_name (GOG_OBJECT (axis)),
gog_axis_is_discrete (axis));
#endif
if (gog_axis_is_discrete (axis))
gsf_xml_out_start_element (xml, "c:catAx");
else
......@@ -701,7 +707,7 @@ xlsx_write_one_chart (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *ch
static void
xlsx_write_chart (XLSXWriteState *state, GsfOutput *chart_part, SheetObject *so)
{
GogGraph const *graph;
GogGraph const *graph;
GogObject const *chart;
GsfXMLOut *xml;
......
......@@ -1292,6 +1292,7 @@ workbook_view_new_from_input (GsfInput *input,
workbook_optimize_style (new_wb);
workbook_queue_volatile_recalc (new_wb);
workbook_recalc (new_wb);
workbook_update_graphs (new_wb);
go_doc_set_dirty (GO_DOC (new_wb), FALSE);
if (optional_uri && workbook_get_file_exporter (new_wb))
workbook_set_last_export_uri
......
......@@ -38,6 +38,7 @@
#include "gnm-marshalers.h"
#include "style-color.h"
#include "sheet-style.h"
#include "sheet-object-graph.h"
#include <goffice/goffice.h>
......@@ -110,6 +111,20 @@ workbook_update_history (Workbook *wb, GnmFileSaveAsStyle type)
}
}
void
workbook_update_graphs (Workbook *wb)
{
WORKBOOK_FOREACH_SHEET (wb, sheet, ({
GSList *l, *graphs = sheet_objects_get (sheet, NULL, SHEET_OBJECT_GRAPH_TYPE);
for (l = graphs; l; l = l->next) {
SheetObject *sog = l->data;
gog_graph_force_update (sheet_object_graph_get_gog (sog));
}
g_slist_free (graphs);
}));
}
static void
workbook_dispose (GObject *wb_object)
{
......
......@@ -45,6 +45,8 @@ unsigned workbook_find_command (Workbook *wb,
GnmExprSharer *workbook_share_expressions (Workbook *wb, gboolean freeit);
void workbook_optimize_style (Workbook *wb);
void workbook_update_graphs (Workbook *wb);
/* IO Routines */
gboolean workbook_set_saveinfo (Workbook *wb, GOFileFormatLevel lev,
GOFileSaver *saver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment