Commit 0c42fedd authored by Morten Welinder's avatar Morten Welinder

Graph: fix critical.

This fixes a critical that affects lots of tests.
parent 02aeb5bc
2015-03-30 Morten Welinder <terra@gnome.org>
* src/sheet-object-graph.c (sheet_object_graph_new): Allow NULL
graph here.
2015-03-30 Jean Brefort <jean.brefort@normalesup.org> 2015-03-30 Jean Brefort <jean.brefort@normalesup.org>
* src/graph.h: add support for absolute anchoring of sheet objects. * src/graph.h: add support for absolute anchoring of sheet objects.
...@@ -7,7 +12,7 @@ ...@@ -7,7 +12,7 @@
* src/sheet-object-cell-comment.c: ditto. * src/sheet-object-cell-comment.c: ditto.
* src/sheet-object-component.c: ditto. * src/sheet-object-component.c: ditto.
* src/sheet-object-graph.c: ditto and make graphs not anymore resize with * src/sheet-object-graph.c: ditto and make graphs not anymore resize with
cells by default. [#684450] cells by default. [#684450]
* src/sheet-object-image.c: make images don't resize with cells by default. * src/sheet-object-image.c: make images don't resize with cells by default.
* src/sheet-object.c : add support for absolute anchoring of sheet objects. * src/sheet-object.c : add support for absolute anchoring of sheet objects.
* src/sheet-object.h: ditto. * src/sheet-object.h: ditto.
......
...@@ -614,7 +614,7 @@ GSF_CLASS_FULL (SheetObjectGraph, sheet_object_graph, ...@@ -614,7 +614,7 @@ GSF_CLASS_FULL (SheetObjectGraph, sheet_object_graph,
/** /**
* sheet_object_graph_new: * sheet_object_graph_new:
* @graph: #GogGraph * @graph: (allow-none): #GogGraph
* *
* Adds a reference to @graph and creates a gnumeric sheet object wrapper * Adds a reference to @graph and creates a gnumeric sheet object wrapper
* Returns: (transfer full): the newly allocated #SheetObject. * Returns: (transfer full): the newly allocated #SheetObject.
...@@ -623,7 +623,9 @@ SheetObject * ...@@ -623,7 +623,9 @@ SheetObject *
sheet_object_graph_new (GogGraph *graph) sheet_object_graph_new (GogGraph *graph)
{ {
SheetObject *sog = g_object_new (GNM_SO_GRAPH_TYPE, NULL); SheetObject *sog = g_object_new (GNM_SO_GRAPH_TYPE, NULL);
GnmGraphDataClosure *data = (GnmGraphDataClosure *) g_object_get_data (G_OBJECT (graph), "data-closure"); GnmGraphDataClosure *data = graph
? (GnmGraphDataClosure *) g_object_get_data (G_OBJECT (graph), "data-closure")
: NULL;
sheet_object_graph_set_gog (sog, graph); sheet_object_graph_set_gog (sog, graph);
if (data != NULL) if (data != NULL)
sog->anchor.mode = data->anchor_mode; sog->anchor.mode = data->anchor_mode;
...@@ -649,7 +651,7 @@ sheet_object_graph_get_gog (SheetObject *sog) ...@@ -649,7 +651,7 @@ sheet_object_graph_get_gog (SheetObject *sog)
/** /**
* sheet_object_graph_set_gog: * sheet_object_graph_set_gog:
* @sog: #SheetObjectGraph * @sog: #SheetObjectGraph
* @graph: #GogGraph * @graph: (allow-none): #GogGraph
* *
* If @graph is non NULL add a reference to it, otherwise create a new graph. * If @graph is non NULL add a reference to it, otherwise create a new graph.
* Assign the graph to its SheetObjectGraph wrapper and initialize the * Assign the graph to its SheetObjectGraph wrapper and initialize the
......
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