[gnumeric] fix background colours



commit c032a579e0bed674e61a116acd251a449ab96833
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Tue Sep 1 11:24:34 2009 -0600

    fix background colours
    
    2009-09-01  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/mstyle.c (gnm_style_new_default): use style_color_auto_back
    	  as background color.
    
    2009-09-01  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (gnm_xml_out_add_hex_color): simplify comparison

 plugins/openoffice/ChangeLog          |    4 ++++
 plugins/openoffice/openoffice-write.c |    6 +-----
 src/mstyle.c                          |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index dc62f34..0a17186 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,9 @@
 2009-09-01  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-write.c (gnm_xml_out_add_hex_color): simplify comparison
+
+2009-09-01  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-write.c (gnm_xml_out_add_hex_color): compare with
 	  automatic background to see whether we have transparency
 
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 1e45fb9..3d3c8e5 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -410,11 +410,7 @@ gnm_xml_out_add_hex_color (GsfXMLOut *o, char const *id, GnmColor const *c)
 	g_return_if_fail (c != NULL);
 
 	back_colour = style_color_auto_back ();
-/* The background colour of a new sheet is strangely not set as expected */
-/* 	if (style_color_equal (back_colour, c)) */
-	if (c->gdk_color.red   == back_colour->gdk_color.red &&
-	    c->gdk_color.green == back_colour->gdk_color.green &&
-	    c->gdk_color.blue  == back_colour->gdk_color.blue)
+	if (style_color_equal (back_colour, c))
 		gsf_xml_out_add_cstr_unchecked (o, id, "transparent");
 	else {
 		char *color;
diff --git a/src/mstyle.c b/src/mstyle.c
index ab6d762..5dc7b89 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -561,7 +561,7 @@ gnm_style_new_default (void)
 	gnm_style_set_conditions (new_style, NULL);
 
 	gnm_style_set_font_color (new_style, style_color_black ());
-	gnm_style_set_back_color (new_style, style_color_white ());
+	gnm_style_set_back_color (new_style, style_color_auto_back ());
 	gnm_style_set_pattern_color (new_style, style_color_black ());
 
 	for (i = MSTYLE_BORDER_TOP; i <= MSTYLE_BORDER_DIAGONAL; ++i)



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