[gnumeric] fix extent calculation
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] fix extent calculation
- Date: Mon, 17 Oct 2011 14:47:35 +0000 (UTC)
commit 94a1a69fdea77b5f620be6acfced01eade285f13
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Mon Oct 17 08:47:07 2011 -0600
fix extent calculation
2011-10-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/sheet.c (sheet_get_extent): fix this for the case that we have
content only in the bottom right 4 cells [#661958]
ChangeLog | 5 +++++
src/sheet.c | 9 ++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8559be0..df0de07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/sheet.c (sheet_get_extent): fix this for the case that we have
+ content only in the bottom right 4 cells [#661958]
+
2011-10-05 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/undo.c (gnm_undo_filter_set_condition_undo): fix error in
diff --git a/src/sheet.c b/src/sheet.c
index 9e00fea..b1b2a7d 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -2115,9 +2115,8 @@ sheet_get_extent (Sheet const *sheet, gboolean spans_and_merges_extend)
g_return_val_if_fail (IS_SHEET (sheet), dummy);
- /* FIXME : Why -2 ??? */
- closure.range.start.col = gnm_sheet_get_max_cols (sheet) - 2;
- closure.range.start.row = gnm_sheet_get_max_rows (sheet) - 2;
+ closure.range.start.col = gnm_sheet_get_last_col (sheet) + 1;
+ closure.range.start.row = gnm_sheet_get_last_row (sheet) + 1;
closure.range.end.col = 0;
closure.range.end.row = 0;
closure.spans_and_merges_extend = spans_and_merges_extend;
@@ -2138,9 +2137,9 @@ sheet_get_extent (Sheet const *sheet, gboolean spans_and_merges_extend)
closure.range.end.row);
}
- if (closure.range.start.col >= gnm_sheet_get_max_cols (sheet) - 2)
+ if (closure.range.start.col > gnm_sheet_get_last_col (sheet))
closure.range.start.col = 0;
- if (closure.range.start.row >= gnm_sheet_get_max_rows (sheet) - 2)
+ if (closure.range.start.row > gnm_sheet_get_last_row (sheet))
closure.range.start.row = 0;
if (closure.range.end.col < 0)
closure.range.end.col = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]