[gnumeric] xls: export cursor position raw, even if outside the pane.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: export cursor position raw, even if outside the pane.
- Date: Tue, 27 Mar 2012 19:00:24 +0000 (UTC)
commit 413ef9c3ed8247d84e4023c234df5e30f277a09b
Author: Morten Welinder <terra gnome org>
Date: Tue Mar 27 14:59:45 2012 -0400
xls: export cursor position raw, even if outside the pane.
Fixes #671513, item [2].
plugins/excel/ChangeLog | 3 +++
plugins/excel/ms-excel-write.c | 8 ++------
2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index cfba678..a8b0503 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
2012-03-27 Morten Welinder <terra gnome org>
+ * ms-excel-write.c (excel_write_selections): Evidently we should
+ not restrict the cursor position to the pane. Fixes #671513 [2].
+
* ms-excel-read.c (excel_read_SELECTION): Read in sane order.
* ms-excel-write.c (excel_write_SELECTION): Write in reverse
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index 2f43d99..47acb52 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -4999,17 +4999,13 @@ excel_write_selections (BiffPut *bp, ExcelWriteSheet *esheet, SheetView *sv)
excel_write_SELECTION (bp, sv->selections, &sv->edit_pos, 3);
if (sv->unfrozen_top_left.col > 0) {
- pos = sv->edit_pos;
- if (pos.col < sv->unfrozen_top_left.col)
- pos.col = sv->unfrozen_top_left.col;
+ pos = sv->edit_pos; /* apparently no bounds check needed */
tmp = g_slist_prepend (NULL, range_init_cellpos (&r, &pos));
excel_write_SELECTION (bp, tmp, &pos, 1);
g_slist_free (tmp);
}
if (sv->unfrozen_top_left.row > 0) {
- pos = sv->edit_pos;
- if (pos.row < sv->unfrozen_top_left.row)
- pos.row = sv->unfrozen_top_left.row;
+ pos = sv->edit_pos; /* apparently no bounds check needed */
tmp = g_slist_prepend (NULL, range_init_cellpos (&r, &pos));
excel_write_SELECTION (bp, tmp, &pos, 2);
g_slist_free (tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]