[gnumeric] remove GO_COLOR_FROM_GDK_RGBA deom openoffice-read.c
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] remove GO_COLOR_FROM_GDK_RGBA deom openoffice-read.c
- Date: Sun, 20 May 2012 02:24:36 +0000 (UTC)
commit 1716c6af3b11b3a8253da616246892fc1c557fa4
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sat May 19 20:23:54 2012 -0600
remove GO_COLOR_FROM_GDK_RGBA deom openoffice-read.c
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 17 +++++++----------
2 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index fdfbc72..15264bd 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-19 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c: replace GO_COLOR_FROM_GDK_RGBA with
+ go_color_from_gdk_rgba throughout
+
2012-05-18 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_adjust_offsets_col): add argument
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index bbee68a..a379797 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -778,15 +778,14 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style)
GdkRGBA rgba;
gchar const *color = g_value_get_string (&prop->value);
if (gdk_rgba_parse (&rgba, color)) {
- style->fill.pattern.back = GO_COLOR_FROM_GDK_RGBA (rgba);
+ go_color_from_gdk_rgba (&rgba, &style->fill.pattern.back);
style->fill.auto_back = FALSE;
}
} else if (0 == strcmp (prop->name, "stroke-color")) {
GdkRGBA rgba;
gchar const *color = g_value_get_string (&prop->value);
if (gdk_rgba_parse (&rgba, color)) {
- style->line.color = GO_COLOR_FROM_GDK_RGBA (rgba);
- style->line.fore = GO_COLOR_FROM_GDK_RGBA (rgba);
+ style->line.fore = go_color_from_gdk_rgba (&rgba, &style->line.color);
style->line.auto_color = FALSE;
style->line.auto_fore = FALSE;
style->line.pattern = GO_PATTERN_SOLID;
@@ -3837,13 +3836,13 @@ oo_gradient (GsfXMLIn *xin, xmlChar const **attrs)
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "start-color")) {
GdkRGBA rgba;
if (gdk_rgba_parse (&rgba, CXML2C (attrs[1])))
- info->from = GO_COLOR_FROM_GDK_RGBA (rgba);
+ go_color_from_gdk_rgba (&rgba, &info->from);
else
oo_warning (xin, _("Unable to parse gradient color: %s"), CXML2C (attrs[1]));
} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "end-color")) {
GdkRGBA rgba;
if (gdk_rgba_parse (&rgba, CXML2C (attrs[1])))
- info->to = GO_COLOR_FROM_GDK_RGBA (rgba);
+ go_color_from_gdk_rgba (&rgba, &info->to);
else
oo_warning (xin, _("Unable to parse gradient color: %s"), CXML2C (attrs[1]));
} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "style"))
@@ -3884,7 +3883,7 @@ oo_hatch (GsfXMLIn *xin, xmlChar const **attrs)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "color")) {
GdkRGBA rgba;
if (gdk_rgba_parse (&rgba, CXML2C (attrs[1])))
- hatch->fore = GO_COLOR_FROM_GDK_RGBA (rgba);
+ go_color_from_gdk_rgba (&rgba, &hatch->fore);
else
oo_warning (xin, _("Unable to parse hatch color: %s"), CXML2C (attrs[1]));
} else if (NULL != oo_attr_distance (xin, attrs, OO_NS_DRAW, "distance", &distance))
@@ -5875,8 +5874,7 @@ oo_style_prop_table (GsfXMLIn *xin, xmlChar const **attrs)
/* For ODF 1.3 etc. */
GdkRGBA rgba;
if (gdk_rgba_parse (&rgba, CXML2C (attrs[1]))) {
- style->tab_color
- = GO_COLOR_FROM_GDK_RGBA (rgba);
+ go_color_from_gdk_rgba (&rgba, &style->tab_color);
style->tab_color_set = TRUE;
} else
oo_warning (xin, _("Unable to parse "
@@ -5887,8 +5885,7 @@ oo_style_prop_table (GsfXMLIn *xin, xmlChar const **attrs)
"tab-text-color")) {
GdkRGBA rgba;
if (gdk_rgba_parse (&rgba, CXML2C (attrs[1]))) {
- style->tab_text_color
- = GO_COLOR_FROM_GDK_RGBA (rgba);
+ go_color_from_gdk_rgba (&rgba, &style->tab_text_color);
style->tab_text_color_set = TRUE;
} else
oo_warning (xin, _("Unable to parse tab "
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]