[gnumeric] Tests: add new sheet-tab-tests to full corpus.



commit 2d8aa5e68d86164b9e3d2dae2187d7adb6ed29a0
Author: Morten Welinder <terra gnome org>
Date:   Mon Apr 13 15:55:29 2015 -0400

    Tests: add new sheet-tab-tests to full corpus.
    
    ...and fix the schema problem it demonstrates.

 plugins/excel/xlsx-write.c |   14 +++++++-------
 test/GnumericTest.pm       |    1 +
 2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index f623b0a..66fcb40 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -2828,13 +2828,6 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *wb_part, Sheet *sheet)
        /*   element sheetPr { CT_SheetPr }?,     */
        gsf_xml_out_start_element (xml, "sheetPr");
 
-       pi = state->sheet->print_info;
-       if (pi != NULL) {
-               gsf_xml_out_start_element (xml, "pageSetUpPr");
-               xlsx_add_bool (xml, "fitToPage", pi->scaling.type == PRINT_SCALE_FIT_PAGES);
-               gsf_xml_out_end_element (xml); /* </pageSetUpPr> */
-       }
-
        if (NULL != state->sheet->tab_color) {
                gsf_xml_out_start_element (xml, "tabColor");
                xlsx_add_rgb (xml, "rgb", state->sheet->tab_color->go_color);
@@ -2843,6 +2836,13 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *wb_part, Sheet *sheet)
        if (NULL != state->sheet->tab_text_color)
                ext_tab_textcolor = TRUE;
 
+       pi = state->sheet->print_info;
+       if (pi != NULL) {
+               gsf_xml_out_start_element (xml, "pageSetUpPr");
+               xlsx_add_bool (xml, "fitToPage", pi->scaling.type == PRINT_SCALE_FIT_PAGES);
+               gsf_xml_out_end_element (xml); /* </pageSetUpPr> */
+       }
+
        gsf_xml_out_end_element (xml); /* </sheetPr> */
 
 /*   element dimension { CT_SheetDimension }?,     */
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index b6091d2..75c5f04 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -216,6 +216,7 @@ my @full_corpus =
      "$samples/page-setup-tests.gnumeric",
      "$samples/rich-text-tests.gnumeric",
      "$samples/sheet-formatting-tests.gnumeric",
+     "$samples/sheet-tab-tests.gnumeric",
      "$samples/solver-tests.gnumeric",
      "$samples/split-panes-tests.gnumeric",
      "$samples/string-tests.gnumeric",


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