[gnumeric] xlsx: fix import of comments.



commit 0278bb258e33f924caf5cefeaba4fbc2d5c4fbc3
Author: Morten Welinder <terra gnome org>
Date:   Tue Feb 25 13:13:58 2014 -0500

    xlsx: fix import of comments.

 NEWS                      |    1 +
 plugins/excel/ChangeLog   |    3 +++
 plugins/excel/xlsx-read.c |    4 +---
 3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index c1b455b..c40255d 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,7 @@ Morten:
        * Fix xlsx export of row heights.
        * Fix xlsx export of rotated styles.
        * Make window geometry round-trip through xlsx.
+       * Fix xlsx import of comments.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.11
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index b6719a0..c66dc27 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
 2014-02-25  Morten Welinder  <terra gnome org>
 
+       * xlsx-read.c (xlsx_comment_start): Use cell_comment_set_pos to
+       the anchor gets set up in a standard way.
+
        * ms-biff.c (ms_biff_put_new): No need for bp->buf anymore.
 
 2014-02-24  Morten Welinder  <terra gnome org>
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 83189b6..78762bc 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -3619,7 +3619,6 @@ xlsx_comment_start (GsfXMLIn *xin, xmlChar const **attrs)
        XLSXReadState *state = (XLSXReadState *)xin->user_state;
        SheetObject *so;
        GnmRange anchor_r;
-       SheetObjectAnchor       anchor;
 
        state->comment = g_object_new (cell_comment_get_type (), NULL);
        so = SHEET_OBJECT (state->comment);
@@ -3638,8 +3637,7 @@ xlsx_comment_start (GsfXMLIn *xin, xmlChar const **attrs)
                        }
                }
 
-       sheet_object_anchor_init (&anchor, &anchor_r, NULL, GOD_ANCHOR_DIR_UNKNOWN);
-       sheet_object_set_anchor (so, &anchor);
+       cell_comment_set_pos (CELL_COMMENT (so), &anchor_r.start);
        state->r_text = g_string_new ("");
 }
 


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