[gnumeric] Read/write zoom values to/from ODF files in LO compatible way. [#700013]



commit 811e0130cb279cd2c1c60a3f0912c4694a015478
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Thu Dec 31 00:50:43 2015 -0700

    Read/write zoom values to/from ODF files in LO compatible way. [#700013]
    
    2015-12-31  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_ooo_settings): write ZoomValue

 NEWS                                  |    2 +-
 plugins/openoffice/ChangeLog          |    4 ++++
 plugins/openoffice/openoffice-write.c |    6 ++++++
 3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3c29d05..094084b 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ Gnumeric 1.12.27
 
 Andreas:
        * Read/write rich-text font-size from ODF files. [#759983]
-       * Read zoom values from LO generated ODF files.
+       * Read/write zoom values to/from ODF files in LO compatible way. [#700013]
 
 Morten:
        * Teach ssconvert to split sheets into separate .txt files [#694408]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index bd68d0b..4e2a1c9 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,9 @@
 2015-12-31  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-write.c (odf_write_ooo_settings): write ZoomValue
+
+2015-12-31  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * openoffice-read.c (odf_apply_ooo_table_config): read ZoomValue
 
 2015-12-29  Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index b2b6f26..0629928 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6126,6 +6126,12 @@ odf_write_ooo_settings (GnmOOExport *state)
                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", "ZoomValue");
+               gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
+               gsf_xml_out_add_int (state->xml, NULL, (int) gnm_floor (sheet->last_zoom_factor_used * 100. + 
0.5));
+               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", "ShowGrid");
                gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "boolean");
                odf_add_bool (state->xml, NULL, !sheet->hide_grid);


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