[gnumeric] xlsx: fix reading chart text angle.



commit 1c547b33cd523cc1f2654292496fc343fb062b85
Author: Morten Welinder <terra gnome org>
Date:   Mon Jan 26 09:55:23 2015 -0500

    xlsx: fix reading chart text angle.
    
    The angle sign convention is reversed in xlsx.

 plugins/excel/ChangeLog           |    3 +++
 plugins/excel/xlsx-read-drawing.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 0540448..726cc19 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,8 @@
 2015-01-26  Morten Welinder  <terra gnome org>
 
+       * xlsx-read-drawing.c (xlsx_body_pr): Fix reading angle.  In xlsx
+       positive angles are measured clock-wise.
+
        * xlsx-write-drawing.c (xlsx_write_go_style_full): Make sure auto
        markers don't get rotated or flipped.
 
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index 59acb1c..99d854c 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -279,7 +279,7 @@ xlsx_body_pr (GsfXMLIn *xin, xmlChar const **attrs)
                                int rotation;
                                if (attr_int (xin, attrs, "rot", &rotation)) {
                                        state->cur_style->text_layout.auto_angle = FALSE;
-                                       state->cur_style->text_layout.angle = (double) rotation / 60000.;
+                                       state->cur_style->text_layout.angle = -rotation / 60000.0;
                                }
                        }
                }


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