[gnumeric] Fix tag ordering in xlsx files [#581896]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Fix tag ordering in xlsx files [#581896]
- Date: Sun, 10 May 2009 13:04:11 -0400 (EDT)
commit 2d6fba23d70ab522e452cf2802572d4ffeec08c4
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sun May 10 11:02:55 2009 -0600
Fix tag ordering in xlsx files [#581896]
2009-05-10 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-write.c (xlsx_write_sheet): write the tags in schema ordering
---
NEWS | 1 +
plugins/excel/ChangeLog | 4 +++
plugins/excel/xlsx-write.c | 50 ++++++++++++++++++++++++++++++++++++-------
3 files changed, 47 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index 5959853..d57a715 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Andreas:
* Write all formulas to an odf file [#581937]
* Fix loading of arrays from ods files (and general array
partitioning) [#581953]
+ * Fix tag ordering in xlsx files [#581896]
Jody:
* Closer to a turnkey win32 build.
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 7f27786..7de3f03 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-10 Morten Welinder <terra gnome org>
+
+ * xlsx-write.c (xlsx_write_sheet): write the tags in schema ordering
+
2009-05-06 Morten Welinder <terra gnome org>
* Release 1.9.7
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 1fe65e8..347f2d4 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -1272,6 +1272,7 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
}
xml = gsf_xml_out_new (sheet_part);
+/* CT_Worksheet = */
gsf_xml_out_start_element (xml, "worksheet");
gsf_xml_out_add_cstr_unchecked (xml, "xmlns", ns_ss);
gsf_xml_out_add_cstr_unchecked (xml, "xmlns:r", ns_rel);
@@ -1279,6 +1280,7 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
/* for now we only use tabColor, move sheetPr outside when we add more
* features */
if (NULL != state->sheet->tab_color) {
+/* element sheetPr { CT_SheetPr }?, */
gsf_xml_out_start_element (xml, "sheetPr");
gsf_xml_out_start_element (xml, "tabColor");
@@ -1287,15 +1289,15 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
gsf_xml_out_end_element (xml); /* </sheetPr> */
}
-
+/* element dimension { CT_SheetDimension }?, */
gsf_xml_out_start_element (xml, "dimension");
xlsx_add_range (xml, "ref", &extent);
gsf_xml_out_end_element (xml); /* </dimension> */
-
+/* element sheetViews { CT_SheetViews }?, */
gsf_xml_out_start_element (xml, "sheetViews");
SHEET_FOREACH_VIEW (state->sheet, sv, xlsx_write_sheet_view (xml, sv););
gsf_xml_out_end_element (xml); /* </sheetViews> */
-
+/* element sheetFormatPr { CT_SheetFormatPr }?, */
gsf_xml_out_start_element (xml, "sheetFormatPr");
gsf_xml_out_add_float (xml, "defaultRowHeight",
sheet_row_get_default_size_pts (state->sheet), 4);
@@ -1306,21 +1308,53 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
gsf_xml_out_add_int (xml, "outlineLevelCol",
state->sheet->cols.max_outline_level);
gsf_xml_out_end_element (xml); /* </sheetFormatPr> */
-
+/* element cols { CT_Cols }*, */
xlsx_write_cols (state, xml, &extent);
-
+/* element sheetData { CT_SheetData }, */
xlsx_write_cells (state, xml, &extent);
- xlsx_write_merges (state, xml);
+/* element sheetCalcPr { CT_SheetCalcPr }?, */
+/* element sheetProtection { CT_SheetProtection }?, */
xlsx_write_protection (state, xml);
+/* element protectedRanges { CT_ProtectedRanges }?, */
+/* element scenarios { CT_Scenarios }?, */
+/* element autoFilter { CT_AutoFilter }?, */
+ xlsx_write_autofilters (state, xml);
+/* element sortState { CT_SortState }?, */
+/* element dataConsolidate { CT_DataConsolidate }?, */
+/* element customSheetViews { CT_CustomSheetViews }?, */
+/* element mergeCells { CT_MergeCells }?, */
+ xlsx_write_merges (state, xml);
+/* element phoneticPr { CT_PhoneticPr }?, */
+/* element conditionalFormatting { CT_ConditionalFormatting }*, */
+/* element dataValidations { CT_DataValidations }?, */
xlsx_write_validations (state, xml, &extent);
+/* element hyperlinks { CT_Hyperlinks }?, */
xlsx_write_hlinks (state, xml, &extent);
- xlsx_write_autofilters (state, xml);
+/* element printOptions { CT_PrintOptions }?, included in xlsx_write_print_info */
+/* element pageMargins { CT_PageMargins }?, included in xlsx_write_print_info */
+/* element pageSetup { CT_PageSetup }?, included in xlsx_write_print_info */
+/* element headerFooter { CT_HeaderFooter }?, included in xlsx_write_print_info */
xlsx_write_print_info (state, xml);
+/* element rowBreaks { CT_PageBreak }?, */
+/* element colBreaks { CT_PageBreak }?, */
+/* element customProperties { CT_CustomProperties }?, */
+/* element cellWatches { CT_CellWatches }?, */
+/* element ignoredErrors { CT_IgnoredErrors }?, */
+/* element smartTags { CT_SmartTags }?, */
+/* element drawing { CT_Drawing }?, */
if (NULL != chart_drawing_rel_id) {
gsf_xml_out_start_element (xml, "drawing");
gsf_xml_out_add_cstr_unchecked (xml, "r:id", chart_drawing_rel_id);
- gsf_xml_out_end_element (xml);
+ gsf_xml_out_end_element (xml); /* </drawing> */
}
+/* element legacyDrawing { CT_LegacyDrawing }?, */
+/* element legacyDrawingHF { CT_LegacyDrawing }?, */
+/* element picture { CT_SheetBackgroundPicture }?, */
+/* element oleObjects { CT_OleObjects }?, */
+/* element controls { CT_Controls }?, */
+/* element webPublishItems { CT_WebPublishItems }?, */
+/* element tableParts { CT_TableParts }?, */
+/* element extLst { CT_ExtensionList }? */
gsf_xml_out_end_element (xml); /* </worksheet> */
state->sheet = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]