Commit 08e4e25a authored by Jean Bréfort's avatar Jean Bréfort Committed by Jean Bréfort

don't delete a valid axis.

2007-06-01  Jean Brefort  <jean.brefort@normalesup.org>

	* ms-chart.c: don't delete a valid axis.


svn path=/branches/gnumeric-1-6/; revision=15581
parent 75b04ea7
2007-06-01 Jean Brefort <jean.brefort@normalesup.org>
* ms-chart.c: don't delete a valid axis.
2006-09-30 Jean Brefort <jean.brefort@normalesup.org>
* ms-chart.c: (end): Don't use auto_shape or auto_dash when plot has
......
......@@ -105,6 +105,7 @@ typedef struct {
GogPlot *plot;
GogStyle *default_plot_style;
GogObject *axis, *xaxis;
guint8 axislineflags;
GogStyle *style;
GogStyle *chartline_style[3];
GogStyle *dropbar_style;
......@@ -576,6 +577,12 @@ BC_R(axislineformat)(XLChartHandler const *handle,
if (s->axis != NULL)
switch (type) {
case 0:
if (s->axislineflags == 8) {
/* axis has no ticks, it is a dummy axis, just delete it */
gog_object_clear_parent (GOG_OBJECT (s->axis));
g_object_unref (s->axis);
s->axis = NULL;
} else {
g_object_set (G_OBJECT (s->axis),
"style", s->style,
NULL);
......@@ -584,6 +591,7 @@ BC_R(axislineformat)(XLChartHandler const *handle,
g_object_set (G_OBJECT (s->axis),
"major-tick-labeled", FALSE,
NULL);
}
break;
case 1: {
GogObject *GridLine = GOG_OBJECT (g_object_new (GOG_GRID_LINE_TYPE,
......@@ -1276,12 +1284,8 @@ BC_R(lineformat)(XLChartHandler const *handle,
else
g_object_unref (s->style);
s->style = NULL;
} else if (s->axis != NULL && flags == 8) {
/* axis has no ticks, it is a dummy axis, just delete it */
gog_object_clear_parent (GOG_OBJECT (s->axis));
g_object_unref (s->axis);
s->axis = NULL;
}
} else if (s->axis != NULL
s->axislineflags = flags;
return FALSE;
}
......
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