[gnumeric] Write viewport position to ODF



commit 8c7bdd59d0aacba81fa4837ab06e35542464f126
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Thu Feb 20 11:44:27 2014 -0700

    Write viewport position to ODF
    
    2014-02-20  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_ooo_settings): write viewport (topleft)
        position

 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |   21 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 277bd31..7897497 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-20  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-write.c (odf_write_ooo_settings): write viewport (topleft)
+       position
+
 2014-02-19  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (oo_style_prop_cell): handle underline similarly
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 8d7f444..166ec2b 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -5915,6 +5915,27 @@ 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> */
+               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");
+               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", "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-map-entry> */
        }
        g_slist_free (sheets);


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