[gnumeric] Export transparency for filled objects.



commit 4b7254e3b04f9d5a1c9b66c89dd99470f3c4618b
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Jan 29 16:47:25 2010 +0100

    Export transparency for filled objects.

 plugins/excel/ChangeLog        |    5 +++++
 plugins/excel/ms-excel-write.c |    7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 4a7b946..f52263d 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,10 @@
 2010-01-29  Jean Brefort  <jean brefort normalesup org>
 
+	* ms-excel-write.c (excel_write_textbox_or_widget_v8): export transparency
+	for filled objects.
+
+2010-01-29  Jean Brefort  <jean brefort normalesup org>
+
 	* ms-excel-read.c (ms_sheet_realize_obj): really import transparent objects.
 
 2010-01-19  Morten Welinder <terra gnome org>
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index f3a06c5..abd73ff 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -4272,6 +4272,7 @@ excel_write_textbox_or_widget_v8 (ExcelWriteSheet *esheet,
 	gboolean checkbox_active = FALSE;
 	GnmNamedExpr *macro_nexpr;
 	gboolean terminate_obj = TRUE;
+	gboolean transparent = FALSE;
 
 	if (has_text_prop) {
 		g_object_get (so,
@@ -4322,6 +4323,7 @@ excel_write_textbox_or_widget_v8 (ExcelWriteSheet *esheet,
 			shape = 1;
 			type = MSOT_RECTANGLE;
 		}
+		transparent = !style->fill.auto_type && style->fill.type == GO_STYLE_FILL_NONE;
 	} else if (GNM_IS_SOW_CHECKBOX (so)) {
 		shape = 0xc9;
 		type = MSOT_CHECKBOX;
@@ -4378,12 +4380,13 @@ excel_write_textbox_or_widget_v8 (ExcelWriteSheet *esheet,
 		ms_escher_opt_add_bool (escher, optmark, MSEP_SHADOWOK, TRUE);
 		ms_escher_opt_add_bool (escher, optmark, MSEP_LINEOK, TRUE);
 		ms_escher_opt_add_bool (escher, optmark, MSEP_FILLOK, TRUE);
-	}
+	} else if (transparent)
+		ms_escher_opt_add_bool (escher, optmark, MSEP_FILLOK, FALSE);
 	ms_escher_opt_add_color (escher, optmark, MSEP_FILLCOLOR,
 				 style == NULL || style->fill.auto_back
 				 ? GO_COLOR_WHITE
 				 : style->fill.pattern.back);
-	if (is_widget)
+	if (is_widget || transparent)
 		ms_escher_opt_add_bool (escher, optmark, MSEP_FILLED, FALSE);
 	ms_escher_opt_add_bool (escher, optmark, MSEP_NOFILLHITTEST, TRUE);
 	ms_escher_opt_add_color (escher, optmark, MSEP_LINECOLOR,



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