[gnumeric] Export frozen panes info to ODF.



commit 3d740ebe18f25a7b3a84a3229f44986d651b0c73
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Thu Feb 27 00:31:49 2014 -0700

     Export frozen panes info to ODF.
    
    2014-02-26  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_ooo_settings): write frozen panes
        info

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    5 +++
 plugins/openoffice/openoffice-write.c |   55 ++++++++++++++++++++++++++------
 3 files changed, 50 insertions(+), 11 deletions(-)
---
diff --git a/NEWS b/NEWS
index ebcc0f4..1bc1b1a 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Andreas:
        * Fix ODF pagesetup roundtrip issue. [#724516]
        * Fix ODF pattern roundtrip issue. [#724898]
        * Export row and column visibility to ODF. [#725115]
+       * Export frozen panes info to ODF.
 
 Jean:
        * Fix persistence of hyperlinks tips. [see #724108]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 9ed6e60..4034255 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-26  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-write.c (odf_write_ooo_settings): write frozen panes
+       info
+
 2014-02-24  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-write.c (write_row_style): write visibility
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index cafdab3..c37d047 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -5926,16 +5926,49 @@ odf_write_ooo_settings (GnmOOExport *state)
                gsf_xml_out_add_cstr_unchecked (state->xml, NULL, "true");
                gsf_xml_out_end_element (state->xml); /* </config:config-item> */
 
-               gsf_xml_out_start_element (state->xml, CONFIG "config-item");
-               gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionLeft");
-               gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
-               gsf_xml_out_add_int (state->xml, NULL, sv->initial_top_left.col);
-               gsf_xml_out_end_element (state->xml); /* </config:config-item> */
-               gsf_xml_out_start_element (state->xml, CONFIG "config-item");
-               gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionRight");
-               gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
-               gsf_xml_out_add_int (state->xml, NULL, 0);
-               gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+               if (sv_is_frozen (sv)) {
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "HorizontalSplitMode");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "short");
+                       gsf_xml_out_add_int (state->xml, NULL, 2);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "VerticalSplitMode");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "short");
+                       gsf_xml_out_add_int (state->xml, NULL, 2);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "HorizontalSplitPosition");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+                       gsf_xml_out_add_int (state->xml, NULL, sv->unfrozen_top_left.col);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "VerticalSplitPosition");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+                       gsf_xml_out_add_int (state->xml, NULL, sv->unfrozen_top_left.row);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */                     
  
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionLeft");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+                       gsf_xml_out_add_int (state->xml, NULL, 0);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionRight");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+                       gsf_xml_out_add_int (state->xml, NULL, sv->initial_top_left.col);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+               } else {
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionLeft");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+                       gsf_xml_out_add_int (state->xml, NULL, sv->initial_top_left.col);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+                       gsf_xml_out_start_element (state->xml, CONFIG "config-item");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionRight");
+                       gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+                       gsf_xml_out_add_int (state->xml, NULL, 0);
+                       gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+               }
                gsf_xml_out_start_element (state->xml, CONFIG "config-item");
                gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionTop");
                gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
@@ -5945,7 +5978,7 @@ odf_write_ooo_settings (GnmOOExport *state)
                gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionBottom");
                gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
                gsf_xml_out_add_int (state->xml, NULL, sv->initial_top_left.row);
-               gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+               gsf_xml_out_end_element (state->xml); /* </config:config-item> */               
 
                gsf_xml_out_end_element (state->xml); /* </config:config-item-map-entry> */
        }


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