[gnumeric] ssdiff: teach this a bit about links.



commit 1c0f7f3b50409e9030ee6bb62a7a4081e499fb37
Author: Morten Welinder <terra gnome org>
Date:   Tue Jun 4 21:59:32 2013 -0400

    ssdiff: teach this a bit about links.
    
    Note, that all link objects are considered different, so this isn't very
    useful yet.

 ChangeLog    |    4 ++++
 src/ssdiff.c |   20 +++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d1ad4c1..fe03ca6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-04  Morten Welinder  <terra gnome org>
+
+       * src/ssdiff.c (xml_style_changed): Teach this a bit about links.
+
 2013-06-01  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * src/sheet-control-gui.c (scg_comment_display_filter_cb): new
diff --git a/src/ssdiff.c b/src/ssdiff.c
index 6507ed0..d3d62d6 100644
--- a/src/ssdiff.c
+++ b/src/ssdiff.c
@@ -28,6 +28,7 @@
 #include "ranges.h"
 #include "mstyle.h"
 #include "xml-sax.h"
+#include "hlink.h"
 #include <gsf/gsf-libxml.h>
 #include <gsf/gsf-output-stdio.h>
 #include <gsf/gsf-input.h>
@@ -595,8 +596,25 @@ xml_style_changed (GnmDiffState *state, GnmRange const *r,
                        DO_INT ("Hidden", gnm_style_get_contents_hidden);
                        break;
 
+               case MSTYLE_HLINK: {
+                       GnmHLink const *ol = gnm_style_get_hlink (os);
+                       GnmHLink const *nl = gnm_style_get_hlink (ns);
+
+                       gsf_xml_out_start_element (state->xml, "HLink");
+                       if (ol) {
+                               gsf_xml_out_add_cstr (state->xml, "OldTarget", gnm_hlink_get_target (ol));
+                               gsf_xml_out_add_cstr (state->xml, "OldTip", gnm_hlink_get_tip (ol));
+                       }
+                       if (nl) {
+                               gsf_xml_out_add_cstr (state->xml, "NewTarget", gnm_hlink_get_target (nl));
+                               gsf_xml_out_add_cstr (state->xml, "NewTip", gnm_hlink_get_tip (nl));
+                       }
+                       gsf_xml_out_end_element (state->xml); /* </HLink> */
+
+                       break;
+               }
+
                case MSTYLE_VALIDATION:
-               case MSTYLE_HLINK:
                case MSTYLE_INPUT_MSG:
                case MSTYLE_CONDITIONS:
                default:


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