[gnumeric] ods: don't write go-style's text angle if it is auto.



commit 5475b84f738eae46f655945922a2012850f5473d
Author: Morten Welinder <terra gnome org>
Date:   Mon Apr 14 16:00:57 2014 -0400

    ods: don't write go-style's text angle if it is auto.

 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-write.c |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 31a0412..4dc02d4 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-14  Morten Welinder  <terra gnome org>
+
+       * openoffice-write.c (odf_write_gog_style_text): Don't write
+       auto-angles.
+
 2014-04-13  Morten Welinder <terra gnome org>
 
        * Release 1.12.14
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index c988f89..d4549b7 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -7123,9 +7123,11 @@ odf_write_gog_style_text (GnmOOExport *state, GOStyle const *style)
        if (style != NULL) {
                PangoFontDescription const *desc = style->font.font->desc;
                PangoFontMask mask = pango_font_description_get_set_fields (desc);
-               int val = style->text_layout.angle;
 
-               odf_add_angle (state->xml, STYLE "text-rotation-angle", val);
+               if (!style->text_layout.auto_angle) {
+                       int val = style->text_layout.angle;
+                       odf_add_angle (state->xml, STYLE "text-rotation-angle", val);
+               }
 
                if (mask & PANGO_FONT_MASK_SIZE)
                        odf_add_pt (state->xml, FOSTYLE "font-size",


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