rpms/gnumeric/devel gnumeric-gbz-605043.patch, NONE, 1.1 gnumeric.spec, 1.51, 1.52

Huzaifa Sidhpurwala huzaifas at fedoraproject.org
Wed Dec 30 05:46:21 UTC 2009


Author: huzaifas

Update of /cvs/pkgs/rpms/gnumeric/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12902

Modified Files:
	gnumeric.spec 
Added Files:
	gnumeric-gbz-605043.patch 
Log Message:
Add new patch

gnumeric-gbz-605043.patch:
 ChangeLog  |    5 +++++
 ms-chart.c |   45 ++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 47 insertions(+), 3 deletions(-)

--- NEW FILE gnumeric-gbz-605043.patch ---
>From 798e12600274cd5d3d21ba4f15d183582e998432 Mon Sep 17 00:00:00 2001
From: Jean Brefort <jean.brefort at normalesup.org>
Date: Mon, 21 Dec 2009 21:21:29 +0000
Subject: Fix import export of line type in scatter plots. [#605043]

---
 
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 282f593..dfed1ee 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-21  Jean Brefort  <jean.brefort at normalesup.org>
+
+	* ms-chart.c (lineformat), (chart_write_LINEFORMAT): fix import export
+	of line type in scatter plots. [#605043]
+
 2009-12-15  Morten Welinder <terra at gnome.org>
 
 	* Release 1.9.17
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index 1a4cd2d..a63fb39 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -1357,7 +1357,45 @@ BC_R(lineformat)(XLChartHandler const *handle,
 	d (0, g_printerr ("Lines have a %s pattern.\n",
 		       ms_line_pattern [pattern]););
 
-	s->style->line.dash_type = ms_escher_xl_to_line_type (pattern);
+	switch (pattern) {
+	default: 
+	case 0:
+		s->style->line.dash_type = GO_LINE_SOLID;
+		break;	
+	case 1:
+		s->style->line.dash_type = GO_LINE_DASH;
+		break;	
+	case 2:
+		s->style->line.dash_type = GO_LINE_DOT;
+		break;	
+	case 3:
+		s->style->line.dash_type = GO_LINE_DASH_DOT;
+		break;	
+	case 4:
+		s->style->line.dash_type = GO_LINE_DASH_DOT_DOT;
+		break;	
+	case 5:
+		s->style->line.dash_type = GO_LINE_NONE;
+		break;
+/* we don't really support the other styles, although GOStyle would allow that now */
+#if 0
+	case 6:
+		s->style->line.dash_type = GO_LINE_SOLID;
+		s->style->line.pattern = GO_PATTERN_GREY25; /* or 75? */
+		s->style->line.fore = GO_COLOR_WHITE;
+		break;	
+	case 7:
+		s->style->line.dash_type = GO_LINE_SOLID;
+		s->style->line.pattern = GO_PATTERN_GREY50;
+		s->style->line.fore = GO_COLOR_WHITE;
+		break;	
+	case 8:
+		s->style->line.dash_type = GO_LINE_SOLID;
+		s->style->line.pattern = GO_PATTERN_GREY75; /* or 25? */
+		s->style->line.fore = GO_COLOR_WHITE;
+		break;
+#endif
+	}
 
 	if (BC_R(ver)(s) >= MS_BIFF_V8 && s->currentSeries != NULL) {
 		guint16 const fore = GSF_LE_GET_GUINT16 (q->data + 10);
@@ -3976,8 +4014,9 @@ chart_write_LINEFORMAT (XLChartWriteState *s, GOStyleLine const *lstyle,
 			w = 1;	/* medium */
 		else
 			w = 2;	/* wide */
-		if (lstyle->auto_color)
-			flags |= 9;	/* docs only mention 1, but there is an 8 in there too */
+		/* seems that excel understand auto as solid, so if pattern is not solid
+		   do not set the auto flag, see #605043 */
+		flags |= (lstyle->auto_color && pat > 0)? 9: 8;	/* docs only mention 1, but there is an 8 in there too */
 	} else {
 		color_index = chart_write_color (s, data, 0);
 		if (clear_lines_for_null) {



Index: gnumeric.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnumeric/devel/gnumeric.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- gnumeric.spec	30 Dec 2009 04:09:01 -0000	1.51
+++ gnumeric.spec	30 Dec 2009 05:46:20 -0000	1.52
@@ -9,13 +9,14 @@ Group:            Applications/Productiv
 License:          GPLv2
 URL:              http://www.gnome.org/gnumeric/
 Source:           ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.8/%{name}-%{version}.tar.bz2
+Patch0:           gnumeric-gbz-605043.patch
 BuildRoot:        %{_tmppath}/%{name}-%{version}-root
 BuildRequires:    libgnomeui-devel >= 2.4.0
 BuildRequires:    libgnomeprintui22-devel >= 2.8.2
 BuildRequires:    libgsf-gnome-devel >= 1.13.2
 #BuildRequires:    libgnomedb-devel >= 3.0.0
 BuildRequires:    pygtk2-devel >= 2.6.0
-BuildRequires:    goffice-devel >= 0.7
+BuildRequires:    goffice-devel >= 0.7.17
 BuildRequires:    python-devel guile-devel perl(XML::Parser) scrollkeeper
 BuildRequires:    gettext desktop-file-utils perl(ExtUtils::Embed) intltool
 Requires:         scrollkeeper hicolor-icon-theme
@@ -57,6 +58,7 @@ This package contains the following addi
 
 %prep
 %setup -q
+%patch0 -p1
 
 chmod -x plugins/excel/rc4.?
 
@@ -191,6 +193,8 @@ fi
 %changelog
 * Wed Dec 31 2009 Huzaifa Sidhpurwala <huzaifas at redhat.com> 1:1.9.17-1
 - Upstream bump to 1.9.17
+- Apply gnome bz patch #605043
+- BR goffice-devel >= 1.7.17
 
 * Fri Dec  4 2009 Stepan Kasal <skasal at redhat.com> - 1:1.9.16-2
 - rebuild against perl 5.10.1




More information about the fedora-extras-commits mailing list