[gnumeric] export transparent patterns to xls as no filling.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] export transparent patterns to xls as no filling.
- Date: Wed, 31 Mar 2010 16:13:19 +0000 (UTC)
commit 3aa82ac27ddcbf44c139a704f030b26ce8f5c419
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed Mar 31 16:50:18 2010 +0200
export transparent patterns to xls as no filling.
plugins/excel/ChangeLog | 5 +++++
plugins/excel/ms-chart.c | 23 +++++++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index de3f292..a85659a 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-31 Jean Brefort <jean brefort normalesup org>
+
+ * ms-chart.c (chart_write_AREAFORMAT): export transparent patterns as
+ no filling.
+
2010-03-29 Morten Welinder <terra gnome org>
* ms-formula-write.c (write_funcall): Guess argument types for
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index a63fb39..213008a 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -3952,17 +3952,24 @@ chart_write_AREAFORMAT (XLChartWriteState *s, GOStyle const *style, gboolean dis
fore = GO_COLOR_WHITE;
back = GO_COLOR_WHITE;
break;
- case GO_STYLE_FILL_PATTERN: {
- pat = style->fill.pattern.pattern + 1;
- if (pat == 1) {
- back = style->fill.pattern.fore;
- fore = style->fill.pattern.back;
+ case GO_STYLE_FILL_PATTERN:
+ if ((style->fill.pattern.pattern == GO_PATTERN_SOLID && style->fill.pattern.back == 0)
+ || (style->fill.pattern.pattern == GO_PATTERN_FOREGROUND_SOLID && style->fill.pattern.fore == 0)
+ || (style->fill.pattern.fore == 0 && style->fill.pattern.back == 0)) {
+ pat = 0;
+ fore = GO_COLOR_WHITE;
+ back = GO_COLOR_WHITE;
} else {
- fore = style->fill.pattern.fore;
- back = style->fill.pattern.back;
+ pat = style->fill.pattern.pattern + 1;
+ if (pat == 1) {
+ back = style->fill.pattern.fore;
+ fore = style->fill.pattern.back;
+ } else {
+ fore = style->fill.pattern.fore;
+ back = style->fill.pattern.back;
+ }
}
break;
- }
case GO_STYLE_FILL_GRADIENT:
pat = 1;
fore = back = style->fill.pattern.fore;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]