[gnumeric] ods: fix import problem with irregular sheet size.



commit c9f96e0d4594c18b22944afc9b3055f44663468b
Author: Morten Welinder <terra gnome org>
Date:   Tue Jan 5 19:07:31 2021 -0500

    ods: fix import problem with irregular sheet size.

 NEWS                                 | 1 +
 plugins/openoffice/openoffice-read.c | 4 ++++
 2 files changed, 5 insertions(+)
---
diff --git a/NEWS b/NEWS
index 2c34e1a82..85f61ae32 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Morten:
        * Use 1us resolution for NOW.  [#549]
        * Fix ssconvert sheet selection for csv.  [#555]
        * Test suite improvements.
+       * Fix ods import problem with irregular sheet sizes.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.48
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index c54461b13..b30fb9027 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -14128,6 +14128,10 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
                        max_rows = sot->rows;
                l = l->next;
        }
+
+       if (!gnm_sheet_valid_size (max_cols, max_rows))
+               gnm_sheet_suggest_size (&max_cols, &max_rows);
+
        l = state.sheet_order;
        while (l != NULL) {
                sheet_order_t *sot;


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