[gnumeric] Fix angle import of ODF graphs. [#698389]



commit b0647f30b7c6dda7a48614e011a4028bb2cdb412
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sun Apr 21 18:50:02 2013 -0600

    Fix angle import of ODF graphs. [#698389]
    
    2013-04-21  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (odf_apply_style_props): go_style angles are -180
        to 180

 NEWS                                 | 1 +
 plugins/openoffice/ChangeLog         | 5 +++++
 plugins/openoffice/openoffice-read.c | 2 ++
 3 files changed, 8 insertions(+)
---
diff --git a/NEWS b/NEWS
index 78e1b99..4519d5d 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.12.2
 
 Andreas:
        * Update documentation.
+       * Fix angle import of ODF graphs. [#698389]
 
 Dominique Leuenberger:
        * Fix locale directory.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 31824e3..7a915c8 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-21  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-read.c (odf_apply_style_props): go_style angles are -180
+       to 180
+
 2013-03-09  Morten Welinder <terra gnome org>
 
        * Release 1.12.1
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 92ca69d..d0ea241 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -828,6 +828,8 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style)
                        gnm_hatch = g_value_get_int (&prop->value);
                else if (0 == strcmp (prop->name, "text-rotation-angle")) {
                        int angle = g_value_get_int (&prop->value);
+                       if (angle > 180)
+                               angle -= 360;
                        go_style_set_text_angle (style, angle);
                } else if (0 == strcmp (prop->name, "font-size")) {
                        pango_font_description_set_size


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