gnumeric r17312 - in trunk: . plugins/excel src src/dialogs src/tools



Author: jbrefort
Date: Fri Apr 10 15:04:58 2009
New Revision: 17312
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17312&view=rev

Log:
2009-04-10  Jean Brefort  <jean brefort normalesup org>

	* src/gnm-so-filled.c: fixed after GogStyle -> GOStyle rename.
	* src/gnm-so-line.c: ditto.
	* src/gnm-so-polygon.c: ditto.
	* dialog-about.c: fixed after GogStyle -> GOStyle rename.
	* dialog-so-styled.c: ditto
	* dialogs.h: ditto
	* analysis-kaplan-meier.c: fixed after GogStyle -> GOStyle rename.
	* ms-chart.c: fixed after GogStyle -> GOStyle rename.
	* ms-excel-read.c: ditto.
	* ms-excel-write.c: ditto.
	* xlsx-read.c: ditto.



Modified:
   trunk/ChangeLog
   trunk/plugins/excel/ChangeLog
   trunk/plugins/excel/ms-chart.c
   trunk/plugins/excel/ms-excel-read.c
   trunk/plugins/excel/ms-excel-write.c
   trunk/plugins/excel/xlsx-read.c
   trunk/src/dialogs/ChangeLog
   trunk/src/dialogs/dialog-about.c
   trunk/src/dialogs/dialog-so-styled.c
   trunk/src/dialogs/dialogs.h
   trunk/src/gnm-so-filled.c
   trunk/src/gnm-so-line.c
   trunk/src/gnm-so-polygon.c
   trunk/src/tools/ChangeLog
   trunk/src/tools/analysis-kaplan-meier.c

Modified: trunk/plugins/excel/ms-chart.c
==============================================================================
--- trunk/plugins/excel/ms-chart.c	(original)
+++ trunk/plugins/excel/ms-chart.c	Fri Apr 10 15:04:58 2009
@@ -38,7 +38,6 @@
 #include <goffice/graph/gog-series-impl.h>
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-plot-engine.h>
 #include <goffice/graph/gog-renderer.h>
 #include <goffice/graph/gog-error-bar.h>
@@ -51,6 +50,8 @@
 #include <goffice/utils/go-pattern.h>
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-glib-extras.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 #include <gsf/gsf-utils.h>
 #include <math.h>
@@ -90,7 +91,7 @@
 	GogMSDimType extra_dim;
 	int chart_group;
 	gboolean  has_legend;
-	GogStyle *style;
+	GOStyle *style;
 	GHashTable *singletons;
 	GOLineInterpolation interpolation;
 } XLChartSeries;
@@ -108,12 +109,12 @@
 	GogChart	*chart;
 	GogObject	*legend;
 	GogPlot		*plot;
-	GogStyle	*default_plot_style;
+	GOStyle		*default_plot_style;
 	GogObject	*axis, *xaxis;
 	guint8		axislineflags;
-	GogStyle	*style;
-	GogStyle	*chartline_style[3];
-	GogStyle	*dropbar_style;
+	GOStyle		*style;
+	GOStyle		*chartline_style[3];
+	GOStyle		*dropbar_style;
 
 	int		 style_element;
 	int		 cur_role;
@@ -150,7 +151,7 @@
 #define BC_R(n)	BC(read_ ## n)
 
 static gboolean
-check_style (GogStyle *style, char const *object)
+check_style (GOStyle *style, char const *object)
 {
 	if (style == NULL) {
 		g_warning ("File is most likely corrupted.\n"
@@ -201,7 +202,7 @@
 BC_R(get_style) (XLChartReadState *s)
 {
 	if (s->style == NULL)
-		s->style = gog_style_new ();
+		s->style = go_style_new ();
 }
 
 static int
@@ -487,7 +488,7 @@
 #endif
 	BC_R(get_style) (s);
 	if (pattern > 0) {
-		s->style->fill.type = GOG_FILL_STYLE_PATTERN;
+		s->style->fill.type = GO_STYLE_FILL_PATTERN;
 		s->style->fill.auto_back = auto_format;
 		s->style->fill.invert_if_negative = invert_if_negative;
 		s->style->fill.pattern.pattern = pattern - 1;
@@ -499,14 +500,14 @@
 			s->style->fill.pattern.back = tmp;
 		}
 	} else if (auto_format) {
-		s->style->fill.type = GOG_FILL_STYLE_PATTERN;
+		s->style->fill.type = GO_STYLE_FILL_PATTERN;
 		s->style->fill.auto_back = TRUE;
 		s->style->fill.invert_if_negative = invert_if_negative;
 		s->style->fill.pattern.pattern = 0;
 		s->style->fill.pattern.fore =
 		s->style->fill.pattern.back = 0;
 	} else {
-		s->style->fill.type = GOG_FILL_STYLE_NONE;
+		s->style->fill.type = GO_STYLE_FILL_NONE;
 		s->style->fill.auto_type = FALSE;
 	}
 
@@ -671,7 +672,7 @@
 							NULL));
 			gog_object_add_by_name (GOG_OBJECT (s->axis), "MajorGrid", GridLine);
 			if (check_style (s->style, "axis major grid"))
-				gog_styled_object_set_style (GOG_STYLED_OBJECT (GridLine), s->style);
+				go_styled_object_set_style (GO_STYLED_OBJECT (GridLine), s->style);
 			break;
 		}
 		case 2: {
@@ -679,7 +680,7 @@
 							NULL));
 			gog_object_add_by_name (GOG_OBJECT (s->axis), "MinorGrid", GridLine);
 			if (check_style (s->style, "axis minor grid"))
-				gog_styled_object_set_style (GOG_STYLED_OBJECT (GridLine), s->style);
+				go_styled_object_set_style (GO_STYLED_OBJECT (GridLine), s->style);
 			break;
 		}
 		case 3: {
@@ -1052,7 +1053,7 @@
 	gfont = excel_font_get_gofont (font);
 	go_font_ref (gfont);
 	BC_R(get_style) (s);
-	gog_style_set_font (s->style, gfont);
+	go_style_set_font (s->style, gfont);
 	d (2, g_printerr ("apply font %s;", go_font_as_str (gfont)););
 	return FALSE;
 }
@@ -1130,7 +1131,7 @@
 		return FALSE;
 	}
 
-	s->style->fill.type = GOG_FILL_STYLE_GRADIENT;
+	s->style->fill.type = GO_STYLE_FILL_GRADIENT;
 	s->style->fill.auto_type = FALSE;
 	s->style->fill.auto_fore = FALSE;
 	s->style->fill.auto_back = FALSE;
@@ -1157,7 +1158,7 @@
 		case 0x0100 : brightness = 0. + frac/512.; break;
 		case 0x0200 : brightness = 1. - frac/512.; break;
 		}
-		gog_style_set_fill_brightness (s->style, (1. - brightness) * 100.);
+		go_style_set_fill_brightness (s->style, (1. - brightness) * 100.);
 		d (1, g_printerr ("%x : frac = %u, flag = 0x%hx ::: %f",
 			       fill_back_color, frac, fill_back_color & 0xff00, brightness););
 	}
@@ -1463,7 +1464,7 @@
 		s->style->marker.auto_outline_color =
 			s->style->marker.auto_fill_color = auto_marker;
 
-	gog_style_set_marker (s->style, marker);
+	go_style_set_marker (s->style, marker);
 
 	return FALSE;
 }
@@ -1539,7 +1540,7 @@
 		 g_printerr ("ERROR : TEXT is linked to undocumented object\n");
 	}});
 	if (NULL != label && NULL != s->style)
-		gog_styled_object_set_style (GOG_STYLED_OBJECT (label), s->style);
+		go_styled_object_set_style (GO_STYLED_OBJECT (label), s->style);
 	return FALSE;
 }
 
@@ -2419,7 +2420,7 @@
 }
 
 static void
-cb_store_singletons (gpointer indx, GogStyle *style, GogObject *series)
+cb_store_singletons (gpointer indx, GOStyle *style, GogObject *series)
 {
 	GogObject *singleton = gog_object_add_by_name (series, "Point", NULL);
 	if (singleton != NULL) {
@@ -2454,7 +2455,7 @@
 	GogObjectRole const *role;
 	GSList *children_a, *children_b, *ptr;
 	GogObject *obj;
-	GogStyle *style;
+	GOStyle *style;
 	role = gog_object_find_role_by_name (a, name);
 	g_return_if_fail (role);
 	children_a = gog_object_get_children (a, role);
@@ -2462,11 +2463,11 @@
 	ptr = children_a;
 	while (ptr) {
 		obj = GOG_OBJECT (ptr->data);
-		style = gog_style_dup (
-			gog_styled_object_get_style (GOG_STYLED_OBJECT (obj)));
+		style = go_style_dup (
+			go_styled_object_get_style (GO_STYLED_OBJECT (obj)));
 		gog_object_clear_parent (obj);
 		gog_object_add_by_role (b, role, obj);
-		gog_styled_object_set_style (GOG_STYLED_OBJECT (obj), style);
+		go_styled_object_set_style (GO_STYLED_OBJECT (obj), style);
 		g_object_unref (style);
 		ptr = ptr->next;
 	}
@@ -2474,11 +2475,11 @@
 	ptr = children_b;
 	while (ptr) {
 		obj = GOG_OBJECT (ptr->data);
-		style = gog_style_dup (
-			gog_styled_object_get_style (GOG_STYLED_OBJECT (obj)));
+		style = go_style_dup (
+			go_styled_object_get_style (GO_STYLED_OBJECT (obj)));
 		gog_object_clear_parent (obj);
 		gog_object_add_by_role (a, role, obj);
-		gog_styled_object_set_style (GOG_STYLED_OBJECT (obj), style);
+		go_styled_object_set_style (GO_STYLED_OBJECT (obj), style);
 		g_object_unref (style);
 		ptr = ptr->next;
 	}
@@ -2554,7 +2555,7 @@
 		unsigned i, j;
 		XLChartSeries *eseries;
 		GogSeries     *series;
-		GogStyle      *style;
+		GOStyle      *style;
 		gboolean	   plot_has_lines = FALSE, plot_has_marks = FALSE;
 
 		/* check series now and create 3d plot if necessary */
@@ -2798,7 +2799,7 @@
 
 		if (s->default_plot_style != NULL) {
 			char const *type = G_OBJECT_TYPE_NAME (s->plot);
-			GogStyle const *style = s->default_plot_style;
+			GOStyle const *style = s->default_plot_style;
 
 			if (type != NULL && style->marker.mark != NULL &&
 			    (!strcmp (type, "GogXYPlot") ||
@@ -2967,7 +2968,7 @@
 			if (horizontal) {
 				GogAxis	*x = gog_plot_get_axis (s->plot, GOG_AXIS_X);
 				GogAxis	*y = gog_plot_get_axis (s->plot, GOG_AXIS_Y);
-				GogStyle *x_style, *y_style;
+				GOStyle *x_style, *y_style;
 				int i;
 				for (i = 0 ; i < GOG_AXIS_ELEM_MAX_ENTRY ; i++)
 					xl_axis_swap_elem (x, y, i);
@@ -3276,7 +3277,7 @@
 		gog_object_add_by_name (GOG_OBJECT (parent->series),
 			"Trend line", GOG_OBJECT (rc));
 		if (series->style)
-			gog_styled_object_set_style (GOG_STYLED_OBJECT (rc), series->style);
+			go_styled_object_set_style (GO_STYLED_OBJECT (rc), series->style);
 	}
 }
 
@@ -3332,7 +3333,7 @@
 			error_bar->width = 0;
 		if (check_style (series->style, "error bar")) {
 			g_object_unref (error_bar->style);
-			error_bar->style = gog_style_dup (series->style);
+			error_bar->style = go_style_dup (series->style);
 		}
 		switch (series->err_src) {
 		case 1: {
@@ -3515,10 +3516,10 @@
 		state.chart = GOG_CHART (gog_object_add_by_name (GOG_OBJECT (state.graph), "Chart", NULL));
 
 		if (NULL != full_page) {
-			GogStyle *style = gog_style_new ();
+			GOStyle *style = go_style_new ();
 			style->outline.width = 0;
 			style->outline.dash_type = GO_LINE_NONE;
-			style->fill.type = GOG_FILL_STYLE_NONE;
+			style->fill.type = GO_STYLE_FILL_NONE;
 			g_object_set (G_OBJECT (state.graph), "style", style, NULL);
 			g_object_set (G_OBJECT (state.chart), "style", style, NULL);
 			g_object_unref (style);
@@ -3830,7 +3831,7 @@
 	gboolean has_dropbar;
 	gboolean has_hilow;
 	gboolean is_stock;
-	GogStyle *dp_style, *hl_style;
+	GOStyle *dp_style, *hl_style;
 	guint16 dp_width;
 	GogAxis *primary_axis[GOG_AXIS_TYPES];
 } XLChartWriteState;
@@ -3882,7 +3883,7 @@
 }
 
 static void
-chart_write_AREAFORMAT (XLChartWriteState *s, GogStyle const *style, gboolean disable_auto)
+chart_write_AREAFORMAT (XLChartWriteState *s, GOStyle const *style, gboolean disable_auto)
 {
 	guint8 *data = ms_biff_put_len_next (s->bp, BIFF_CHART_areaformat,
 		(s->bp->version >= MS_BIFF_V8) ? 16: 12);
@@ -3893,14 +3894,14 @@
 		switch (style->fill.type) {
 		default :
 			g_warning ("invalid fill type, saving as none");
-		case GOG_FILL_STYLE_IMAGE:
+		case GO_STYLE_FILL_IMAGE:
 #warning export images
-		case GOG_FILL_STYLE_NONE:
+		case GO_STYLE_FILL_NONE:
 			pat = 0;
 			fore = RGBA_WHITE;
 			back = RGBA_WHITE;
 			break;
-		case GOG_FILL_STYLE_PATTERN: {
+		case GO_STYLE_FILL_PATTERN: {
 			pat = style->fill.pattern.pattern + 1;
 			if (pat == 1) {
 				back = style->fill.pattern.fore;
@@ -3911,7 +3912,7 @@
 			}
 			break;
 		}
-		case GOG_FILL_STYLE_GRADIENT:
+		case GO_STYLE_FILL_GRADIENT:
 			pat = 1;
 			fore = back = style->fill.pattern.fore;
 #warning export gradients
@@ -3940,7 +3941,7 @@
 }
 
 static void
-chart_write_LINEFORMAT (XLChartWriteState *s, GogStyleLine const *lstyle,
+chart_write_LINEFORMAT (XLChartWriteState *s, GOStyleLine const *lstyle,
 			gboolean draw_ticks, gboolean clear_lines_for_null)
 {
 	guint8 *data = ms_biff_put_len_next (s->bp, BIFF_CHART_lineformat,
@@ -3997,7 +3998,7 @@
 }
 
 static void
-chart_write_MARKERFORMAT (XLChartWriteState *s, GogStyle const *style,
+chart_write_MARKERFORMAT (XLChartWriteState *s, GOStyle const *style,
 			  gboolean clear_marks_for_null)
 {
 	guint8 *data = ms_biff_put_len_next (s->bp, BIFF_CHART_markerformat,
@@ -4230,7 +4231,7 @@
 }
 
 static void
-chart_write_text (XLChartWriteState *s, GOData const *src, GogStyledObject const *obj, int purpose)
+chart_write_text (XLChartWriteState *s, GOData const *src, GOStyledObject const *obj, int purpose)
 {
 	static guint8 const default_text[] = {
 		2,		/* halign = center */
@@ -4253,7 +4254,7 @@
 	guint8 *data;
 	guint16 color_index = 0x4d;
 	unsigned const len = (s->bp->version >= MS_BIFF_V8) ? 32: 26;
-	GogStyle *style = (obj)? gog_styled_object_get_style (GOG_STYLED_OBJECT (obj)): NULL;
+	GOStyle *style = (obj)? go_styled_object_get_style (GO_STYLED_OBJECT (obj)): NULL;
 
 	/* TEXT */
 	data = ms_biff_put_len_next (s->bp, BIFF_CHART_text, len);
@@ -4323,22 +4324,22 @@
 }
 
 static gboolean
-style_is_completely_auto (GogStyle const *style)
+style_is_completely_auto (GOStyle const *style)
 {
-	if ((style->interesting_fields & GOG_STYLE_OUTLINE) &&
+	if ((style->interesting_fields & GO_STYLE_OUTLINE) &&
 	    (!style->outline.auto_color || !style->outline.auto_dash ||
 		(style->outline.width != 0.)))
 		return FALSE;
-	if ((style->interesting_fields & GOG_STYLE_FILL)) {
-		if (style->fill.type != GOG_FILL_STYLE_PATTERN ||
+	if ((style->interesting_fields & GO_STYLE_FILL)) {
+		if (style->fill.type != GO_STYLE_FILL_PATTERN ||
 		    !style->fill.auto_back)
 			return FALSE;
 	}
-	if ((style->interesting_fields & GOG_STYLE_LINE) &&
+	if ((style->interesting_fields & GO_STYLE_LINE) &&
 	    (!style->line.auto_color || !style->line.auto_dash ||
 		(style->line.width != 0.)))
 		return FALSE;
-	if ((style->interesting_fields & GOG_STYLE_MARKER)) {
+	if ((style->interesting_fields & GO_STYLE_MARKER)) {
 		if (!style->marker.auto_shape ||
 		    !style->marker.auto_outline_color ||
 		    !style->marker.auto_fill_color)
@@ -4348,7 +4349,7 @@
 }
 
 static void
-chart_write_style (XLChartWriteState *s, GogStyle const *style,
+chart_write_style (XLChartWriteState *s, GOStyle const *style,
 		   guint16 indx, unsigned n, unsigned v, float separation,
 		   GOLineInterpolation interpolation)
 {
@@ -4356,7 +4357,7 @@
 	chart_write_BEGIN (s);
 	ms_biff_put_2byte (s->bp, BIFF_CHART_3dbarshape, 0); /* box */
 	if (!style_is_completely_auto (style) || interpolation == GO_LINE_INTERPOLATION_SPLINE) {
-		if ((style->interesting_fields & GOG_STYLE_LINE)) {
+		if ((style->interesting_fields & GO_STYLE_LINE)) {
 			chart_write_LINEFORMAT (s, &style->line, FALSE, FALSE);
 			chart_write_SERFMT (s, interpolation);
 		} else
@@ -4745,7 +4746,7 @@
 chart_write_frame (XLChartWriteState *s, GogObject const *frame,
 		   gboolean calc_size, gboolean disable_auto)
 {
-	GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (frame));
+	GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (frame));
 	guint8 *data = ms_biff_put_len_next (s->bp, BIFF_CHART_frame, 4);
 	GSF_LE_SET_GUINT16 (data + 0, 0); /* 0 == std/no border, 4 == shadow */
 	GSF_LE_SET_GUINT16 (data + 2, (0x2 | (calc_size ? 1 : 0)));
@@ -4862,7 +4863,7 @@
 		ms_biff_put_commit (s->bp);
 	}
 	if (axis != NULL) {
-		GogStyle *style = GOG_STYLED_OBJECT (axis)->style;
+		GOStyle *style = GOG_STYLED_OBJECT (axis)->style;
 		int font;
 		data = ms_biff_put_len_next (s->bp, BIFF_CHART_tick,
 			(s->bp->version >= MS_BIFF_V8) ? 30 : 26);
@@ -4935,7 +4936,7 @@
 						FALSE, FALSE);
 		}
 	} else {
-		GogStyleLine line_style;
+		GOStyleLine line_style;
 		line_style.width = 0.;
 		line_style.dash_type = GO_LINE_NONE;
 		line_style.auto_dash = FALSE;
@@ -5112,7 +5113,7 @@
 }
 
 static void
-chart_write_CHARTLINE (XLChartWriteState *s, guint16 type, GogStyle *style)
+chart_write_CHARTLINE (XLChartWriteState *s, guint16 type, GOStyle *style)
 {
 	guint8 *data = ms_biff_put_len_next (s->bp, BIFF_CHART_chartline, 2);
 	GSF_LE_SET_GUINT16 (data + 0, type);
@@ -5350,7 +5351,7 @@
 				GOData *text = gog_dataset_get_dim (GOG_DATASET (label), 0);
 				if (text != NULL) {
 					chart_write_text (s, text,
-						GOG_STYLED_OBJECT (label), 3);
+						GO_STYLED_OBJECT (label), 3);
 				}
 			}
 		}
@@ -5360,7 +5361,7 @@
 				GOData *text = gog_dataset_get_dim (GOG_DATASET (label), 0);
 				if (text != NULL) {
 					chart_write_text (s, text,
-						GOG_STYLED_OBJECT (label), 2);
+						GO_STYLED_OBJECT (label), 2);
 				}
 			}
 		}
@@ -5543,7 +5544,7 @@
 			/* drop bars concern the first and last series in an xl line plot so
 			we must create a new plot and take only one series */
 			GogSeries *orig, *first, *last;
-			GogStyle *style;
+			GOStyle *style;
 			if (state.has_dropbar) {
 				g_free (axis_set);
 				continue;
@@ -5566,8 +5567,8 @@
 					state.is_stock = TRUE;
 			}
 			orig = GOG_SERIES (gog_plot_get_series (cur_plot)->data);
-			state.dp_style = gog_style_dup (
-					gog_styled_object_get_style (GOG_STYLED_OBJECT (orig)));
+			state.dp_style = go_style_dup (
+					go_styled_object_get_style (GO_STYLED_OBJECT (orig)));
 			g_object_get (cur_plot, "gap_percentage", &state.dp_width, NULL);
 			first = gog_plot_new_series (state.line_plot);
 			gog_series_set_dim (first, -1,
@@ -5580,7 +5581,7 @@
 					go_data_dup (gog_dataset_get_dim (GOG_DATASET (orig), 1)),
 			&error);
 			if (!state.is_stock) {
-				style = gog_styled_object_get_style (GOG_STYLED_OBJECT (first));
+				style = go_styled_object_get_style (GO_STYLED_OBJECT (first));
 				/* FIXME: change this code when series lines are available ! */
 				style->line.auto_dash = FALSE;
 				style->line.auto_color = FALSE;
@@ -5600,7 +5601,7 @@
 					go_data_dup (gog_dataset_get_dim (GOG_DATASET (orig), 2)),
 					&error);
 			if (!state.is_stock) {
-				style = gog_styled_object_get_style (GOG_STYLED_OBJECT (first));
+				style = go_styled_object_get_style (GO_STYLED_OBJECT (first));
 				/* FIXME: change this code when series lines are available ! */
 				style->line.auto_dash = FALSE;
 				style->line.auto_color = FALSE;
@@ -5620,7 +5621,7 @@
 		} else if (0 == strcmp (G_OBJECT_TYPE_NAME (cur_plot), "GogMinMaxPlot")) {
 			/* same comment as for dropbars */
 			GogSeries *orig, *high, *low;
-			GogStyle *style;
+			GOStyle *style;
 			if (state.has_hilow) {
 				g_free (axis_set);
 				continue;
@@ -5642,8 +5643,8 @@
 					state.is_stock = TRUE;
 			}
 			orig = GOG_SERIES (gog_plot_get_series (cur_plot)->data);
-			state.hl_style = gog_style_dup (
-					gog_styled_object_get_style (GOG_STYLED_OBJECT (orig)));
+			state.hl_style = go_style_dup (
+					go_styled_object_get_style (GO_STYLED_OBJECT (orig)));
 			high = gog_plot_new_series (state.line_plot);
 			gog_series_set_dim (high, -1,
 					go_data_dup (gog_dataset_get_dim (GOG_DATASET (orig), -1)),
@@ -5655,7 +5656,7 @@
 					go_data_dup (gog_dataset_get_dim (GOG_DATASET (orig), 1)),
 			&error);
 			if (!state.is_stock) {
-				style = gog_styled_object_get_style (GOG_STYLED_OBJECT (high));
+				style = go_styled_object_get_style (GO_STYLED_OBJECT (high));
 				/* FIXME: change this code when series lines are available ! */
 				style->line.auto_dash = FALSE;
 				style->line.auto_color = FALSE;
@@ -5675,7 +5676,7 @@
 					go_data_dup (gog_dataset_get_dim (GOG_DATASET (orig), 2)),
 					&error);
 			if (!state.is_stock) {
-				style = gog_styled_object_get_style (GOG_STYLED_OBJECT (low));
+				style = go_styled_object_get_style (GO_STYLED_OBJECT (low));
 				/* FIXME: change this code when series lines are available ! */
 				style->line.auto_dash = FALSE;
 				style->line.auto_color = FALSE;
@@ -5702,8 +5703,8 @@
 					gog_series_set_dim (new, 1,
 							go_data_dup (gog_dataset_get_dim (GOG_DATASET (orig), 1)),
 							&error);
-					gog_styled_object_set_style (GOG_STYLED_OBJECT (new),
-							gog_styled_object_get_style (GOG_STYLED_OBJECT (orig)));
+					go_styled_object_set_style (GO_STYLED_OBJECT (new),
+							go_styled_object_get_style (GO_STYLED_OBJECT (orig)));
 				}
 				cur_plot = NULL;
 			}
@@ -5900,7 +5901,7 @@
 		GOData *text = gog_dataset_get_dim (GOG_DATASET (label), 0);
 		if (text != NULL) {
 			chart_write_text (&state, text,
-				GOG_STYLED_OBJECT (label), 1);
+				GO_STYLED_OBJECT (label), 1);
 		}
 	}
 

Modified: trunk/plugins/excel/ms-excel-read.c
==============================================================================
--- trunk/plugins/excel/ms-excel-read.c	(original)
+++ trunk/plugins/excel/ms-excel-read.c	Fri Apr 10 15:04:58 2009
@@ -75,7 +75,7 @@
 #include <goffice/utils/go-locale.h>
 #include <goffice/utils/go-units.h>
 #include <goffice/utils/go-glib-extras.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 
 #include <gsf/gsf-input.h>
 #include <gsf/gsf-utils.h>
@@ -468,7 +468,7 @@
 	GODrawingAnchorDir direction;
 	SheetObjectAnchor anchor;
 	SheetObject *so;
-	GogStyle *style;
+	GOStyle *style;
 
 	if (obj == NULL)
 		return TRUE;
@@ -520,7 +520,7 @@
 
 	case 0x01: /* Line */
 	case 0x04: /* Arc */
-		style = gog_style_new ();
+		style = go_style_new ();
 		style->line.color = ms_sheet_map_color (esheet, obj,
 			MS_OBJ_ATTR_OUTLINE_COLOR, RGBA_BLACK);
 		style->line.width = ms_obj_attr_get_uint (obj->attrs,
@@ -541,7 +541,7 @@
 	case 0x03: /* oval */
 	case 0x06: /* TextBox */
 	case 0x0E: /* Label */
-		style = gog_style_new ();
+		style = go_style_new ();
 		style->outline.color = ms_sheet_map_color (esheet, obj,
 			MS_OBJ_ATTR_OUTLINE_COLOR, RGBA_BLACK);
 		style->outline.width = ms_obj_attr_get_uint (obj->attrs,
@@ -553,7 +553,7 @@
 		style->fill.pattern.fore = ms_sheet_map_color (esheet, obj,
 			MS_OBJ_ATTR_FILL_BACKGROUND, RGBA_BLACK);
 		style->fill.type = ms_obj_attr_bag_lookup (obj->attrs, MS_OBJ_ATTR_UNFILLED)
-			? GOG_FILL_STYLE_NONE : GOG_FILL_STYLE_PATTERN;
+			? GO_STYLE_FILL_NONE : GO_STYLE_FILL_PATTERN;
 
 		g_object_set (G_OBJECT (so), "style", style, NULL);
 		g_object_unref (style);

Modified: trunk/plugins/excel/ms-excel-write.c
==============================================================================
--- trunk/plugins/excel/ms-excel-write.c	(original)
+++ trunk/plugins/excel/ms-excel-write.c	Fri Apr 10 15:04:58 2009
@@ -67,12 +67,12 @@
 #include <goffice/graph/goffice-graph.h>
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-axis.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-marker.h>
 #include <goffice/utils/go-units.h>
 #include <goffice/utils/go-glib-extras.h>
+#include <goffice/utils/go-style.h>
 #include <gsf/gsf-utils.h>
 #include <gsf/gsf-output.h>
 #include <gsf/gsf-outfile.h>
@@ -5769,30 +5769,30 @@
 	GSList *ptr = obj->children;
 
 	if (GOG_IS_STYLED_OBJECT (obj)) {
-		GogStyle const *style = GOG_STYLED_OBJECT (obj)->style;
-		if (style->interesting_fields & GOG_STYLE_OUTLINE)
+		GOStyle const *style = GOG_STYLED_OBJECT (obj)->style;
+		if (style->interesting_fields & GO_STYLE_OUTLINE)
 			put_color_go_color (ewb, style->outline.color);
-		else if (style->interesting_fields & GOG_STYLE_LINE)
+		else if (style->interesting_fields & GO_STYLE_LINE)
 			put_color_go_color (ewb, style->line.color);
-		if (style->interesting_fields & GOG_STYLE_FILL)
+		if (style->interesting_fields & GO_STYLE_FILL)
 			switch (style->fill.type) {
 			default :
-			case GOG_FILL_STYLE_NONE :
-			case GOG_FILL_STYLE_IMAGE :
+			case GO_STYLE_FILL_NONE :
+			case GO_STYLE_FILL_IMAGE :
 				break;
-			case GOG_FILL_STYLE_PATTERN :
+			case GO_STYLE_FILL_PATTERN :
 				put_color_go_color (ewb, style->fill.pattern.fore);
 				put_color_go_color (ewb, style->fill.pattern.back);
 				break;
-			case GOG_FILL_STYLE_GRADIENT :
+			case GO_STYLE_FILL_GRADIENT :
 				put_color_go_color (ewb, style->fill.pattern.fore);
 			}
-		if (style->interesting_fields & GOG_STYLE_MARKER) {
+		if (style->interesting_fields & GO_STYLE_MARKER) {
 			put_color_go_color (ewb, go_marker_get_outline_color (style->marker.mark));
 			put_color_go_color (ewb, go_marker_get_fill_color (style->marker.mark));
 		}
 
-		if (style->interesting_fields & GOG_STYLE_FONT)
+		if (style->interesting_fields & GO_STYLE_FONT)
 			excel_font_from_go_font (ewb, style->font.font);
 	}
 	if (GOG_IS_AXIS (obj)) {

Modified: trunk/plugins/excel/xlsx-read.c
==============================================================================
--- trunk/plugins/excel/xlsx-read.c	(original)
+++ trunk/plugins/excel/xlsx-read.c	Fri Apr 10 15:04:58 2009
@@ -56,13 +56,14 @@
 #include <goffice/utils/datetime.h>
 #include <goffice/utils/go-units.h>
 #include <goffice/utils/go-marker.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 #include <goffice/data/go-data-simple.h>
 
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-chart.h>
 #include <goffice/graph/gog-plot.h>
 #include <goffice/graph/gog-series.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-data-set.h>
 
 #include <gsf/gsf-libxml.h>
@@ -181,7 +182,7 @@
 	int		  dim_type;
 	GogObject	 *series_pt;
 	gboolean	  series_pt_has_index;
-	GogStyle	 *cur_style;
+	GOStyle	 *cur_style;
 	GOColor		  gocolor;
 	GOMarker	 *marker;
 	GOMarkerShape	  marker_symbol;
@@ -1360,8 +1361,8 @@
 	    GOG_IS_STYLED_OBJECT (state->cur_obj) &&
 	    NULL == state->marker) {
 		g_return_if_fail (state->cur_style == NULL);
-		state->cur_style = gog_style_dup (
-			gog_styled_object_get_style (GOG_STYLED_OBJECT (state->cur_obj)));
+		state->cur_style = go_style_dup (
+			go_styled_object_get_style (GO_STYLED_OBJECT (state->cur_obj)));
 	}
 }
 static void
@@ -1370,7 +1371,7 @@
 	XLSXReadState	*state = (XLSXReadState *)xin->user_state;
 
 	if (NULL != state->cur_style) {
-		gog_styled_object_set_style (GOG_STYLED_OBJECT (state->cur_obj),
+		go_styled_object_set_style (GO_STYLED_OBJECT (state->cur_obj),
 			state->cur_style);
 		g_object_unref (state->cur_style);
 		state->cur_style = NULL;
@@ -1380,14 +1381,14 @@
 xlsx_style_line_start (GsfXMLIn *xin, xmlChar const **attrs)
 {
 	XLSXReadState	*state = (XLSXReadState *)xin->user_state;
-	state->sp_type |= GOG_STYLE_LINE;
+	state->sp_type |= GO_STYLE_LINE;
 }
 
 static void
 xlsx_style_line_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 {
 	XLSXReadState	*state = (XLSXReadState *)xin->user_state;
-	state->sp_type &= ~GOG_STYLE_LINE;
+	state->sp_type &= ~GO_STYLE_LINE;
 }
 
 static void
@@ -1397,8 +1398,8 @@
 	if (NULL != state->marker)
 		;
 	else if (NULL != state->cur_style) {
-		if (!(state->sp_type & GOG_STYLE_LINE)) {
-			state->cur_style->fill.type = GOG_FILL_STYLE_NONE;
+		if (!(state->sp_type & GO_STYLE_LINE)) {
+			state->cur_style->fill.type = GO_STYLE_FILL_NONE;
 			state->cur_style->fill.auto_type = FALSE;
 		}
 	}
@@ -1410,8 +1411,8 @@
 	if (NULL != state->marker)
 		;
 	else if (NULL != state->cur_style) {
-		if (!(state->sp_type & GOG_STYLE_LINE)) {
-			state->cur_style->fill.type = GOG_FILL_STYLE_PATTERN;
+		if (!(state->sp_type & GO_STYLE_LINE)) {
+			state->cur_style->fill.type = GO_STYLE_FILL_PATTERN;
 			state->cur_style->fill.auto_type = FALSE;
 		}
 	}
@@ -1484,7 +1485,7 @@
 	if (NULL != state->marker)
 		go_marker_set_fill_color (state->marker, state->gocolor);
 	else if (NULL != state->cur_style) {
-		if (state->sp_type & GOG_STYLE_LINE) {
+		if (state->sp_type & GO_STYLE_LINE) {
 			state->cur_style->line.color = state->gocolor;
 			state->cur_style->line.auto_color = FALSE;
 		} else {
@@ -1522,7 +1523,7 @@
 	if (NULL != state->marker)
 		; /* what goes here ?*/
 	else if (NULL != state->cur_style) {
-		if (state->sp_type & GOG_STYLE_LINE) {
+		if (state->sp_type & GO_STYLE_LINE) {
 			state->cur_style->line.auto_dash = FALSE;
 			state->cur_style->line.dash_type = dash;
 			state->cur_style->outline.auto_dash = FALSE;
@@ -1568,13 +1569,13 @@
 {
 	XLSXReadState *state = (XLSXReadState *)xin->user_state;
 	if (NULL != state->cur_obj && GOG_IS_STYLED_OBJECT (state->cur_obj)) {
-		GogStyle *style = gog_styled_object_get_style (
-			GOG_STYLED_OBJECT (state->cur_obj));
+		GOStyle *style = go_styled_object_get_style (
+			GO_STYLED_OBJECT (state->cur_obj));
 		if (state->marker_symbol != GO_MARKER_MAX) {
 			style->marker.auto_shape = FALSE;
 			go_marker_set_shape (state->marker, state->marker_symbol);
 		}
-		gog_style_set_marker (style, state->marker);
+		go_style_set_marker (style, state->marker);
 		state->marker = NULL;
 	}
 }

Modified: trunk/src/dialogs/dialog-about.c
==============================================================================
--- trunk/src/dialogs/dialog-about.c	(original)
+++ trunk/src/dialogs/dialog-about.c	Fri Apr 10 15:04:58 2009
@@ -29,7 +29,6 @@
 #include <goffice/cut-n-paste/foocanvas/foo-canvas.h>
 #include <goffice/graph/gog-object.h>
 #include <goffice/graph/gog-styled-object.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/graph/gog-graph.h>
 #include <goffice/graph/gog-chart.h>
 #include <goffice/graph/gog-plot.h>
@@ -38,6 +37,7 @@
 #include <goffice/graph/gog-control-foocanvas.h>
 #include <goffice/data/go-data-simple.h>
 #include <goffice/utils/go-color.h>
+#include <goffice/utils/go-style.h>
 #include <gtk/gtk.h>
 
 #define ABOUT_KEY          "about-dialog"
@@ -186,7 +186,7 @@
 	GtkWidget *canvas;
 	FooCanvasItem *ctrl;
 	GogObject *graph;
-	GogStyle  *contributor_style;
+	GOStyle   *contributor_style;
 	GOData *contribs_data, *individual_data, *contributor_name;
 
 	guint	 timer;
@@ -276,15 +276,15 @@
 
 	state->graph = g_object_new (GOG_TYPE_GRAPH, NULL);
 	gog_graph_set_size (GOG_GRAPH (state->graph), 4 * 72.0, 4 * 72.0);
-	GOG_STYLED_OBJECT (state->graph)->style->fill.type = GOG_FILL_STYLE_GRADIENT;
+	GOG_STYLED_OBJECT (state->graph)->style->fill.type = GO_STYLE_FILL_GRADIENT;
 	GOG_STYLED_OBJECT (state->graph)->style->fill.pattern.back = 0xFFFF99FF;
 	GOG_STYLED_OBJECT (state->graph)->style->fill.gradient.dir = GO_GRADIENT_W_TO_E_MIRRORED;
 	GOG_STYLED_OBJECT (state->graph)->style->outline.width = 0; /* hairline */
 	GOG_STYLED_OBJECT (state->graph)->style->outline.color = RGBA_BLACK;
-	gog_style_set_fill_brightness (
+	go_style_set_fill_brightness (
 		GOG_STYLED_OBJECT (state->graph)->style, 70.);
 #if 0
-	gog_style_set_fill_image_filename (GOG_STYLED_OBJECT (state->graph)->style,
+	go_style_set_fill_image_filename (GOG_STYLED_OBJECT (state->graph)->style,
 		g_build_filename (gnm_icon_dir (), "gnumeric-about.png", NULL));
 #endif
 
@@ -292,7 +292,7 @@
 	chart = gog_object_add_by_name (state->graph, "Chart", NULL);
 	GOG_STYLED_OBJECT (chart)->style->outline.dash_type = GO_LINE_NONE;
 	GOG_STYLED_OBJECT (chart)->style->outline.auto_dash = FALSE;
-	GOG_STYLED_OBJECT (chart)->style->fill.type = GOG_FILL_STYLE_NONE;
+	GOG_STYLED_OBJECT (chart)->style->fill.type = GO_STYLE_FILL_NONE;
 	plot = gog_plot_new_by_name ("GogBarColPlot");
 	if (!plot) {
 		/* This can happen if plugins are not available.  */
@@ -314,9 +314,9 @@
 	gog_series_set_dim (series, 1, state->individual_data, NULL);
 	GOG_STYLED_OBJECT (series)->style->outline.dash_type = GO_LINE_NONE;
 	GOG_STYLED_OBJECT (series)->style->outline.auto_dash = FALSE;
-	GOG_STYLED_OBJECT (series)->style->fill.type = GOG_FILL_STYLE_GRADIENT;
+	GOG_STYLED_OBJECT (series)->style->fill.type = GO_STYLE_FILL_GRADIENT;
 	GOG_STYLED_OBJECT (series)->style->fill.gradient.dir = GO_GRADIENT_N_TO_S_MIRRORED;
-	gog_style_set_fill_brightness (
+	go_style_set_fill_brightness (
 		GOG_STYLED_OBJECT (series)->style, 70.);
 
 	/* hide the X-axis */
@@ -330,7 +330,7 @@
 	GOG_STYLED_OBJECT (tmp)->style->line.auto_dash = FALSE;
 	tmp = gog_object_get_child_by_role (chart,
 		gog_object_find_role_by_name (chart, "Y-Axis"));
-	gog_style_set_font_desc (GOG_STYLED_OBJECT (tmp)->style,
+	go_style_set_font_desc (GOG_STYLED_OBJECT (tmp)->style,
 		pango_font_description_from_string ("Sans 10"));
 
 	tmp = gog_object_add_by_name (chart, "Title", NULL);
@@ -339,14 +339,14 @@
 	state->contributor_name = go_data_scalar_str_new ("", FALSE);
 	gog_dataset_set_dim (GOG_DATASET (tmp), 0, state->contributor_name, NULL);
 	state->contributor_style = GOG_STYLED_OBJECT (tmp)->style;
-	gog_style_set_font_desc (GOG_STYLED_OBJECT (tmp)->style,
+	go_style_set_font_desc (GOG_STYLED_OBJECT (tmp)->style,
 		pango_font_description_from_string ("Sans Bold 10"));
 
 	/* A pie of the cumulative contributions */
 	chart = gog_object_add_by_name (state->graph, "Chart", NULL);
 	GOG_STYLED_OBJECT (chart)->style->outline.dash_type = GO_LINE_NONE;
 	GOG_STYLED_OBJECT (chart)->style->outline.auto_dash = FALSE;
-	GOG_STYLED_OBJECT (chart)->style->fill.type = GOG_FILL_STYLE_NONE;
+	GOG_STYLED_OBJECT (chart)->style->fill.type = GO_STYLE_FILL_NONE;
 	gog_chart_set_position  (GOG_CHART (chart), 1, 0, 1, 1);
 	plot = gog_plot_new_by_name ("GogPiePlot");
 	if (!plot) {
@@ -362,9 +362,9 @@
 	gog_series_set_dim (series, 1, state->contribs_data, NULL);
 	GOG_STYLED_OBJECT (series)->style->outline.dash_type = GO_LINE_NONE;
 	GOG_STYLED_OBJECT (series)->style->outline.auto_dash = FALSE;
-	GOG_STYLED_OBJECT (series)->style->fill.type = GOG_FILL_STYLE_GRADIENT;
+	GOG_STYLED_OBJECT (series)->style->fill.type = GO_STYLE_FILL_GRADIENT;
 	GOG_STYLED_OBJECT (series)->style->fill.gradient.dir = GO_GRADIENT_NW_TO_SE;
-	gog_style_set_fill_brightness (
+	go_style_set_fill_brightness (
 		GOG_STYLED_OBJECT (series)->style, 70.);
 
 	tmp = gog_object_add_by_name (state->graph, "Title", NULL);
@@ -376,7 +376,7 @@
 			"Copyright \xc2\xa9 2001-2007 Jody Goldberg\n"
 			"Copyright \xc2\xa9 1998-2000 Miguel de Icaza", FALSE),
 		NULL);
-	gog_style_set_font_desc (GOG_STYLED_OBJECT (tmp)->style,
+	go_style_set_font_desc (GOG_STYLED_OBJECT (tmp)->style,
 		pango_font_description_from_string ("Sans Bold 12"));
 
 	state->canvas = foo_canvas_new ();

Modified: trunk/src/dialogs/dialog-so-styled.c
==============================================================================
--- trunk/src/dialogs/dialog-so-styled.c	(original)
+++ trunk/src/dialogs/dialog-so-styled.c	Fri Apr 10 15:04:58 2009
@@ -1,7 +1,7 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
 /*
- * dialog-so-styled.c: Pref dialog for objects with a GogStyle 'style' property
+ * dialog-so-styled.c: Pref dialog for objects with a GOStyle 'style' property
  *
  * Copyright (C) 2004 Jody Goldberg (jody gnome org)
  *
@@ -31,13 +31,13 @@
 #include "commands.h"
 #include "sheet-object.h"
 #include <goffice/app/go-cmd-context.h>
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 #include <gtk/gtk.h>
 
 typedef struct {
 	GObject			*so;
 	WBCGtk	*wbcg;
-	GogStyle		*orig_style;
+	GOStyle		*orig_style;
 } DialogSOStyled;
 
 #define GNM_SO_STYLED_KEY "gnm-so-styled-key"
@@ -69,7 +69,7 @@
 
 void
 dialog_so_styled (WBCGtk *wbcg,
-		  GObject *so, GogStyle *orig, GogStyle *default_style,
+		  GObject *so, GOStyle *orig, GOStyle *default_style,
 		  char const *title)
 {
 	DialogSOStyled *state;
@@ -82,7 +82,7 @@
 	state = g_new0 (DialogSOStyled, 1);
 	state->so    = G_OBJECT (so);
 	state->wbcg  = wbcg;
-	state->orig_style = gog_style_dup (orig);
+	state->orig_style = go_style_dup (orig);
 	dialog = gtk_dialog_new_with_buttons (title,
 		wbcg_toplevel (state->wbcg),
 		GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -98,7 +98,7 @@
 		NULL);
 
 	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
-		gog_style_get_editor (orig, default_style,
+		go_style_get_editor (orig, default_style,
 			GO_CMD_CONTEXT (wbcg), G_OBJECT (so)),
 		TRUE, TRUE, TRUE);
 	g_object_unref (default_style);

Modified: trunk/src/dialogs/dialogs.h
==============================================================================
--- trunk/src/dialogs/dialogs.h	(original)
+++ trunk/src/dialogs/dialogs.h	Fri Apr 10 15:04:58 2009
@@ -3,7 +3,7 @@
 
 #include "gui-gnumeric.h"
 #include "consolidate.h"
-#include <goffice/graph/gog-style.h>
+#include <goffice/utils/go-style.h>
 
 typedef enum {
 	FD_CURRENT = -1,
@@ -106,7 +106,7 @@
 
 void	dialog_new_view (WBCGtk *wbcg);
 void	dialog_so_styled (WBCGtk *wbcg, GObject *so,
-			  GogStyle *orig, GogStyle *default_style,
+			  GOStyle *orig, GOStyle *default_style,
 			  char const *title);
 void	dialog_so_list	 (WBCGtk *wbcg, GObject *so);
 

Modified: trunk/src/gnm-so-filled.c
==============================================================================
--- trunk/src/gnm-so-filled.c	(original)
+++ trunk/src/gnm-so-filled.c	Fri Apr 10 15:04:58 2009
@@ -27,9 +27,9 @@
 #include "xml-io.h"
 
 #include <goffice/utils/go-libxml-extras.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
 #include <string.h>
@@ -49,7 +49,7 @@
 typedef struct {
 	SheetObject base;
 
-	GogStyle  *style;
+	GOStyle  *style;
 	gboolean   is_oval;
 
 	char *text;
@@ -139,15 +139,15 @@
 	SOF_PROP_MARKUP
 };
 
-static GogStyle *
+static GOStyle *
 sof_default_style (void)
 {
-	GogStyle *res = gog_style_new ();
-	res->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	GOStyle *res = go_style_new ();
+	res->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	res->outline.width = 0; /* hairline */
 	res->outline.color = RGBA_BLACK;
 	res->outline.dash_type = GO_LINE_SOLID; /* anything but 0 */
-	res->fill.type = GOG_FILL_STYLE_PATTERN;
+	res->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&res->fill.pattern, RGBA_WHITE);
 	return res;
 }
@@ -176,7 +176,7 @@
 static void
 cb_gnm_so_filled_style_changed (FooCanvasItem *background, GnmSOFilled const *sof)
 {
-	GogStyle const *style = sof->style;
+	GOStyle const *style = sof->style;
 	GdkColor outline_buf, *outline_gdk = NULL;
 	GdkColor fill_buf, *fill_gdk = NULL;
 
@@ -185,7 +185,7 @@
 	    style->outline.dash_type != GO_LINE_NONE)
 		outline_gdk = go_color_to_gdk (style->outline.color, &outline_buf);
 
-	if (style->fill.type != GOG_FILL_STYLE_NONE)
+	if (style->fill.type != GO_STYLE_FILL_NONE)
 		fill_gdk = go_color_to_gdk (style->fill.pattern.back, &fill_buf);
 
 	if (style->outline.width > 0.)	/* in pts */
@@ -252,7 +252,7 @@
 			  double width, double height)
 {
 	GnmSOFilled *sof = GNM_SO_FILLED (so);
-	GogStyle const *style = sof->style;
+	GOStyle const *style = sof->style;
 	cairo_pattern_t *pat = NULL;
 
 	cairo_new_path (cr);
@@ -270,7 +270,7 @@
 		cairo_close_path (cr);
 	}
 	/* Fill the shape */
-	pat = gog_style_create_cairo_pattern (style, cr);
+	pat = go_style_create_cairo_pattern (style, cr);
 	if (pat) {
 		cairo_set_source (cr, pat);
 		cairo_fill_preserve (cr);
@@ -382,7 +382,7 @@
 
 	g_object_unref (new_sof->style);
 	new_sof->is_oval = sof->is_oval;
-	new_sof->style	 = gog_style_dup (sof->style);
+	new_sof->style	 = go_style_dup (sof->style);
 	new_sof->text	 = g_strdup (sof->text);
 	new_sof->margin_pts.top    = sof->margin_pts.top  ;
 	new_sof->margin_pts.bottom = sof->margin_pts.bottom;
@@ -397,13 +397,13 @@
 			    GValue const *value, GParamSpec *pspec)
 {
 	GnmSOFilled *sof = GNM_SO_FILLED (obj);
-	GogStyle *style;
+	GOStyle *style;
 
 	switch (param_id) {
 	case SOF_PROP_STYLE:
 		style = sof->style;
 		sof->style = g_object_ref (g_value_get_object (value));
-		sof->style->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+		sof->style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 		g_object_unref (style);
 		break;
 	case SOF_PROP_IS_OVAL:
@@ -493,7 +493,7 @@
 	so_class->draw_cairo	= gnm_so_filled_draw_cairo;
 
         g_object_class_install_property (gobject_class, SOF_PROP_STYLE,
-                 g_param_spec_object ("style", NULL, NULL, GOG_TYPE_STYLE,
+                 g_param_spec_object ("style", NULL, NULL, GO_TYPE_STYLE,
 			GSF_PARAM_STATIC | G_PARAM_READWRITE));
         g_object_class_install_property (gobject_class, SOF_PROP_IS_OVAL,
                  g_param_spec_boolean ("is-oval", NULL, NULL, FALSE,

Modified: trunk/src/gnm-so-line.c
==============================================================================
--- trunk/src/gnm-so-line.c	(original)
+++ trunk/src/gnm-so-line.c	Fri Apr 10 15:04:58 2009
@@ -27,9 +27,9 @@
 #include "xml-io.h"
 
 #include <goffice/utils/go-libxml-extras.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/utils/go-color.h>
 #include <goffice/utils/go-persist.h>
+#include <goffice/utils/go-style.h>
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
 #include <string.h>
@@ -73,7 +73,7 @@
 typedef struct {
 	SheetObject base;
 
-	GogStyle *style;
+	GOStyle *style;
 	GOArrow	  start_arrow, end_arrow;
 } GnmSOLine;
 typedef SheetObjectClass GnmSOLineClass;
@@ -94,7 +94,7 @@
 {
 	FooCanvasItem	*view = FOO_CANVAS_ITEM (sov);
 	SheetObject	*so = sheet_object_view_get_so (sov);
-	GogStyleLine const *style = &GNM_SO_LINE (so)->style->line;
+	GOStyleLine const *style = &GNM_SO_LINE (so)->style->line;
 
 	sheet_object_direction_set (so, coords);
 
@@ -133,11 +133,11 @@
         SOL_PROP_IS_ARROW
 };
 
-static GogStyle *
+static GOStyle *
 sol_default_style (void)
 {
-	GogStyle *res = gog_style_new ();
-	res->interesting_fields = GOG_STYLE_LINE;
+	GOStyle *res = go_style_new ();
+	res->interesting_fields = GO_STYLE_LINE;
 	res->line.width   = 0; /* hairline */
 	res->line.color   = RGBA_BLACK;
 	res->line.dash_type = GO_LINE_SOLID; /* anything but 0 */
@@ -164,7 +164,7 @@
 			G_GNUC_UNUSED GParamSpec *pspec,
 			FooCanvasItem *item)
 {
-	GogStyleLine const *style = &sol->style->line;
+	GOStyleLine const *style = &sol->style->line;
 	GdkColor buf, *gdk = NULL;
 
 	if (style->color != 0 && style->width >= 0 && style->dash_type != GO_LINE_NONE)
@@ -210,7 +210,7 @@
 			double width, double height)
 {
 	GnmSOLine *sol = GNM_SO_LINE (so);
-	GogStyleLine const *style = &sol->style->line;
+	GOStyleLine const *style = &sol->style->line;
 	double x1, y1, x2, y2;
 
 	if (style->color == 0 || style->width < 0 || style->dash_type == GO_LINE_NONE)
@@ -377,7 +377,7 @@
 	GnmSOLine   *new_sol = GNM_SO_LINE (dst);
 
 	g_object_unref (new_sol->style);
-	new_sol->style = gog_style_dup (sol->style);
+	new_sol->style = go_style_dup (sol->style);
 	go_arrow_copy (&new_sol->start_arrow, &sol->start_arrow);
 	go_arrow_copy (&new_sol->end_arrow, &sol->end_arrow);
 }
@@ -391,7 +391,7 @@
 	case SOL_PROP_STYLE:
 		g_object_unref (sol->style);
 		sol->style = g_object_ref (g_value_get_object (value));
-		sol->style->interesting_fields = GOG_STYLE_LINE;
+		sol->style->interesting_fields = GO_STYLE_LINE;
 		break;
 	case SOL_PROP_START_ARROW:
 		go_arrow_copy (&sol->start_arrow, g_value_get_pointer (value));
@@ -469,7 +469,7 @@
 #endif /* GNM_WITH_GTK */
 
         g_object_class_install_property (gobject_class, SOL_PROP_STYLE,
-                 g_param_spec_object ("style", NULL, NULL, GOG_TYPE_STYLE,
+                 g_param_spec_object ("style", NULL, NULL, GO_TYPE_STYLE,
 			GSF_PARAM_STATIC | G_PARAM_READWRITE));
         g_object_class_install_property (gobject_class, SOL_PROP_START_ARROW,
                  g_param_spec_pointer ("start-arrow", NULL, NULL,

Modified: trunk/src/gnm-so-polygon.c
==============================================================================
--- trunk/src/gnm-so-polygon.c	(original)
+++ trunk/src/gnm-so-polygon.c	Fri Apr 10 15:04:58 2009
@@ -27,8 +27,8 @@
 #include "xml-io.h"
 
 #include <goffice/utils/go-libxml-extras.h>
-#include <goffice/graph/gog-style.h>
 #include <goffice/utils/go-color.h>
+#include <goffice/utils/go-style.h>
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
 #include <string.h>
@@ -47,7 +47,7 @@
 
 typedef struct {
 	SheetObject base;
-	GogStyle *style;
+	GOStyle *style;
 	GArray	 *points;
 } GnmSOPolygon;
 typedef SheetObjectClass GnmSOPolygonClass;
@@ -121,15 +121,15 @@
 	SOP_PROP_POINTS
 };
 
-static GogStyle *
+static GOStyle *
 sop_default_style (void)
 {
-	GogStyle *res = gog_style_new ();
-	res->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+	GOStyle *res = go_style_new ();
+	res->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 	res->outline.width = 0; /* hairline */
 	res->outline.color = RGBA_BLACK;
 	res->outline.dash_type = GO_LINE_SOLID; /* anything but 0 */
-	res->fill.type = GOG_FILL_STYLE_PATTERN;
+	res->fill.type = GO_STYLE_FILL_PATTERN;
 	go_pattern_set_solid (&res->fill.pattern, RGBA_WHITE);
 	return res;
 }
@@ -141,7 +141,7 @@
 static void
 cb_gnm_so_polygon_style_changed (FooCanvasItem *view, GnmSOPolygon const *sop)
 {
-	GogStyle const *style = sop->style;
+	GOStyle const *style = sop->style;
 	GdkColor outline_buf, *outline_gdk = NULL;
 	GdkColor fill_buf, *fill_gdk = NULL;
 
@@ -150,7 +150,7 @@
 	    style->outline.dash_type != GO_LINE_NONE)
 		outline_gdk = go_color_to_gdk (style->outline.color, &outline_buf);
 
-	if (style->fill.type != GOG_FILL_STYLE_NONE)
+	if (style->fill.type != GO_STYLE_FILL_NONE)
 		fill_gdk = go_color_to_gdk (style->fill.pattern.back, &fill_buf);
 
 	if (style->outline.width > 0.)	/* in pts */
@@ -246,13 +246,13 @@
 {
 	GnmSOPolygon *sop = GNM_SO_POLYGON (obj);
 	GArray *points;
-	GogStyle *style;
+	GOStyle *style;
 
 	switch (param_id) {
 	case SOP_PROP_STYLE:
 		style = sop->style;
 		sop->style = g_object_ref (g_value_get_object (value));
-		sop->style->interesting_fields = GOG_STYLE_OUTLINE | GOG_STYLE_FILL;
+		sop->style->interesting_fields = GO_STYLE_OUTLINE | GO_STYLE_FILL;
 		g_object_unref (style);
 		break;
 	case SOP_PROP_POINTS:
@@ -327,7 +327,7 @@
 	so_class->draw_cairo	= gnm_so_polygon_draw_cairo;
 
         g_object_class_install_property (gobject_class, SOP_PROP_STYLE,
-                 g_param_spec_object ("style", NULL, NULL, GOG_TYPE_STYLE,
+                 g_param_spec_object ("style", NULL, NULL, GO_TYPE_STYLE,
 			GSF_PARAM_STATIC | G_PARAM_READWRITE));
         g_object_class_install_property (gobject_class, SOP_PROP_POINTS,
                  g_param_spec_pointer ("points", NULL, NULL,

Modified: trunk/src/tools/analysis-kaplan-meier.c
==============================================================================
--- trunk/src/tools/analysis-kaplan-meier.c	(original)
+++ trunk/src/tools/analysis-kaplan-meier.c	Fri Apr 10 15:04:58 2009
@@ -41,10 +41,10 @@
 #include <goffice/graph/gog-chart.h>
 #include <goffice/graph/gog-plot.h>
 #include <goffice/graph/gog-series.h>
-#include <goffice/graph/gog-style.h>
-#include <goffice/graph/gog-styled-object.h>
 #include <goffice/utils/go-glib-extras.h>
 #include <goffice/utils/go-marker.h>
+#include <goffice/utils/go-style.h>
+#include <goffice/utils/go-styled-object.h>
 
 static gboolean
 analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
@@ -413,7 +413,7 @@
 		if (info->chart) {
 			GogSeries    *series;
 			GOData *probabilities;
-			GogStyle  *style;
+			GOStyle  *style;
 			
 			probabilities = dao_go_data_vector (dao, prob_col, 2, prob_col, 1+rows);
 			
@@ -422,10 +422,10 @@
 			gog_series_set_dim (series, 0, times, NULL);
 			gog_series_set_dim (series, 1, probabilities, NULL);
 			
-			style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+			style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
 			style->marker.auto_shape = FALSE;
 			go_marker_set_shape (style->marker.mark, GO_MARKER_NONE);
-			gog_styled_object_set_style (GOG_STYLED_OBJECT (series), style);
+			go_styled_object_set_style (GO_STYLED_OBJECT (series), style);
 			
 			if (info->censored && info->ticks) {
 				GOData *censures;
@@ -445,13 +445,13 @@
 				gog_series_set_dim (series, 0, times, NULL);
 				gog_series_set_dim (series, 1, censures, NULL);
 				
-				style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series));
+				style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
 				style->marker.auto_shape = FALSE;
 				go_marker_set_shape (style->marker.mark, GO_MARKER_TRIANGLE_DOWN);
 				style->line.dash_type = GO_LINE_NONE;
 				style->line.auto_dash = FALSE;
 				style->line.width = 0;
-				gog_styled_object_set_style (GOG_STYLED_OBJECT (series), style);
+				go_styled_object_set_style (GO_STYLED_OBJECT (series), style);
 			}
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]