[gnumeric] ssdiff: report differences is background's is_auto flag.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] ssdiff: report differences is background's is_auto flag.
- Date: Tue, 18 Feb 2014 15:55:11 +0000 (UTC)
commit 465649af82ed66be793808fb0ab0fae81f5bb62a
Author: Morten Welinder <terra gnome org>
Date: Tue Feb 18 10:54:42 2014 -0500
ssdiff: report differences is background's is_auto flag.
ChangeLog | 5 +++++
NEWS | 1 +
src/ssdiff.c | 15 +++++++++++----
3 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 01ccb07..cc41852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-18 Morten Welinder <terra gnome org>
+
+ * src/ssdiff.c (xml_style_changed): Report differences for
+ auto-color settings.
+
2014-02-17 Morten Welinder <terra gnome org>
* src/ssconvert.c (convert): Add --resize option.
diff --git a/NEWS b/NEWS
index 8d1e35c..0d2ba6c 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Morten:
* Fix BIFF7 import of long strings. [#724399]
* Improve testing.
* Fix XLSX number roundtrip issue.
+ * Improve ssdiff's report of differences.
--------------------------------------------------------------------------
Gnumeric 1.12.11
diff --git a/src/ssdiff.c b/src/ssdiff.c
index d3d62d6..6c8ea82 100644
--- a/src/ssdiff.c
+++ b/src/ssdiff.c
@@ -454,7 +454,6 @@ xml_style_changed (GnmDiffState *state, GnmRange const *r,
gsf_xml_out_add_uint (state->xml, "endCol", r->end.col);
gsf_xml_out_add_uint (state->xml, "endRow", r->end.row);
- /* FIXME: Add how they differ. */
os_copy = gnm_style_dup (os);
conflicts = gnm_style_find_conflicts (os_copy, ns, 0);
gnm_style_unref (os_copy);
@@ -462,12 +461,20 @@ xml_style_changed (GnmDiffState *state, GnmRange const *r,
if ((conflicts & (1u << e)) == 0)
continue;
switch (e) {
- case MSTYLE_COLOR_BACK:
+ case MSTYLE_COLOR_BACK: {
+ GnmColor *oc = gnm_style_get_back_color (os);
+ GnmColor *nc = gnm_style_get_back_color (ns);
+
gsf_xml_out_start_element (state->xml, "BackColor");
- gnm_xml_out_add_gocolor (state->xml, "Old", gnm_style_get_back_color (os)->go_color);
- gnm_xml_out_add_gocolor (state->xml, "New", gnm_style_get_back_color (ns)->go_color);
+ gnm_xml_out_add_gocolor (state->xml, "Old", oc->go_color);
+ gnm_xml_out_add_gocolor (state->xml, "New", nc->go_color);
+ if (oc->is_auto != nc->is_auto) {
+ gsf_xml_out_add_int (state->xml, "OldAuto", oc->is_auto);
+ gsf_xml_out_add_int (state->xml, "NewAuto", nc->is_auto);
+ }
gsf_xml_out_end_element (state->xml);
break;
+ }
case MSTYLE_COLOR_PATTERN:
gsf_xml_out_start_element (state->xml, "PatternColor");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]