[gnumeric] Fix ODF roundtrip of "center accross selection". [#726010]



commit 58b4794ba3dcbc8cc1bb0f97eeb02136d41de461
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Mar 12 09:16:28 2014 -0600

    Fix ODF roundtrip of "center accross selection". [#726010]
    
    2014-03-12  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-write.c (odf_write_style_cell_properties):
        GNM_HALIGN_CENTER_ACROSS_SELECTION should be source="fix"
        (odf_write_style_paragraph_properties): use "center" for
        GNM_HALIGN_CENTER_ACROSS_SELECTION

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    7 +++++++
 plugins/openoffice/openoffice-write.c |    8 ++++++--
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index b199ea4..6525cba 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Andreas:
          [part of #725852]
        * Fix fill-alignment export/import to and from ODF. [part of #726035]
        * Fix distributed-alignment export to ODF. [part of #726035]
+       * Fix ODF roundtrip of "center accross selection". [#726010]
 
 Morten:
        * Support volatile functions.  [#305798]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 7d826cf..3c19aa3 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,12 @@
 2014-03-12  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-write.c (odf_write_style_cell_properties):
+       GNM_HALIGN_CENTER_ACROSS_SELECTION should be source="fix"
+       (odf_write_style_paragraph_properties): use "center" for
+       GNM_HALIGN_CENTER_ACROSS_SELECTION
+
+2014-03-12  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * openoffice-read.c (oo_style_prop_cell): read script info
 
 2014-03-12  Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 02ae8fc..f96945f 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -1318,12 +1318,12 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
                case GNM_HALIGN_RIGHT:
                case GNM_HALIGN_CENTER:
                case GNM_HALIGN_JUSTIFY:
+               case GNM_HALIGN_CENTER_ACROSS_SELECTION:
                        source = "fix";
                        break;
                case GNM_HALIGN_FILL:
                        rep_content = TRUE;
                case GNM_HALIGN_GENERAL:
-               case GNM_HALIGN_CENTER_ACROSS_SELECTION:
                default:
                        /* Note that since source is value-type, alignment should be ignored */
                         /*(but isn't by OOo) */
@@ -1373,9 +1373,13 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
                        gnum_specs = TRUE;
                        break;
                case GNM_HALIGN_FILL:
+                       /* handled by repeat-content */
                        break;
-               case GNM_HALIGN_GENERAL:
                case GNM_HALIGN_CENTER_ACROSS_SELECTION:
+                       alignment = "center";
+                       gnum_specs = TRUE;
+                       break;
+               case GNM_HALIGN_GENERAL:
                default:
                        /* Note that since source is value-type, alignment should be ignored */
                         /*(but isn't by OOo) */


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