[gnumeric] Export row and column visibility to ODF. [#725115]



commit a338f7daa53527b40a67ad28b0344de6521a83ef
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Mon Feb 24 22:02:16 2014 -0700

    Export row and column visibility to ODF. [#725115]
    
    2014-02-24  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (write_row_style): write visibility
        (write_col_style): write visibility

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |    8 +++++++-
 3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index f155ac4..c1b455b 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Andreas:
        * Fix ODF viewport roundtrip issue. [#724761]
        * Fix ODF pagesetup roundtrip issue. [#724516]
        * Fix ODF pattern roundtrip issue. [#724898]
+       * Export row and column visibility to ODF. [#725115]
 
 Jean:
        * Fix persistence of hyperlinks tips. [see #724108]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index d3484c4..9ed6e60 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-24  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-write.c (write_row_style): write visibility
+       (write_col_style): write visibility
+
 2014-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (oo_style_prop_cell): read new foreign elements
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index bfb05fd..cafdab3 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -1761,7 +1761,7 @@ odf_write_row_style (GnmOOExport *state, ColRowInfo const *ci)
        odf_add_pt (state->xml, STYLE "row-height", ci->size_pts);
        odf_add_bool (state->xml, STYLE "use-optimal-row-height",
                      !ci->hard_size);
-       gsf_xml_out_end_element (state->xml); /* </style:table-column-properties> */
+       gsf_xml_out_end_element (state->xml); /* </style:table-row-properties> */
 }
 
 static const char*
@@ -3506,6 +3506,9 @@ write_col_style (GnmOOExport *state, GnmStyle *col_style, ColRowInfo const *ci,
                                   FALSE);
        if (name != NULL)
                gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
+
+       if (ci != NULL && !ci->visible)
+               gsf_xml_out_add_cstr (state->xml, TABLE "visibility", ci->in_filter ? "filter" : "collapse"); 
  
 }
 
 static void
@@ -3559,6 +3562,9 @@ write_row_style (GnmOOExport *state, ColRowInfo const *ci,
                                   FALSE);
        if (name != NULL)
                gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
+
+       if (ci != NULL && !ci->visible)
+               gsf_xml_out_add_cstr (state->xml, TABLE "visibility", ci->in_filter ? "filter" : "collapse");
 }
 
 static gboolean


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