[gnumeric] HTML Paste: use the right size for temporary sheet.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] HTML Paste: use the right size for temporary sheet.
- Date: Sat, 9 May 2009 20:51:10 -0400 (EDT)
commit b06ed1ecc1b52132d8fb27292448ccf170592c74
Author: Morten Welinder <terra gnome org>
Date: Sat May 9 20:49:08 2009 -0400
HTML Paste: use the right size for temporary sheet.
---
ChangeLog | 3 +++
src/gui-clipboard.c | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5b81119..b32a8b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-05-09 Morten Welinder <terra gnome org>
+ * src/gui-clipboard.c (table_cellregion_write): Explicitly size
+ the temporary sheet.
+
* src/workbook.c (workbook_new_with_sheets): Respect the sheet
size preferences.
diff --git a/src/gui-clipboard.c b/src/gui-clipboard.c
index 5f42d7b..906d227 100644
--- a/src/gui-clipboard.c
+++ b/src/gui-clipboard.c
@@ -537,7 +537,15 @@ table_cellregion_write (GOCmdContext *ctx, GnmCellRegion *cr,
output = gsf_output_memory_new ();
ioc = gnumeric_io_context_new (ctx);
- wb = workbook_new_with_sheets (1);
+
+ {
+ int cols = cr->cols;
+ int rows = cr->rows;
+ gnm_sheet_suggest_size (&cols, &rows);
+ wb = workbook_new ();
+ workbook_sheet_add (wb, -1, cols, rows);
+ }
+
wb_view = workbook_view_new (wb);
sheet = workbook_sheet_by_index (wb, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]