kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0095-bnc-887227-Do-not-set-TextAutoGrowHeight-for-vertica.patch

f085be
From ca51beb73336b3a19364df02aab82d56a2a63e74 Mon Sep 17 00:00:00 2001
f085be
From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= <matus.kukan@collabora.com>
f085be
Date: Thu, 24 Jul 2014 20:03:43 +0200
f085be
Subject: [PATCH 095/137] bnc#887227: Do not set TextAutoGrowHeight for
f085be
 vertical text.
f085be
f085be
It's horribly broken and it would resize text box
f085be
horizontally which is not supposed to happen.
f085be
f085be
(cherry picked from commit d068f13596f6d1023a70d98ec2059d38ad6fd777)
f085be
f085be
Change-Id: I201ec8dbcddca56d21bf46ea8ee838d01923c442
f085be
Reviewed-on: https://gerrit.libreoffice.org/10585
f085be
Reviewed-by: David Tardon <dtardon@redhat.com>
f085be
Tested-by: David Tardon <dtardon@redhat.com>
f085be
---
f085be
 oox/source/drawingml/textbodypropertiescontext.cxx | 6 +++++-
f085be
 1 file changed, 5 insertions(+), 1 deletion(-)
f085be
f085be
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
f085be
index b580be3..166ecd0 100644
f085be
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
f085be
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
f085be
@@ -132,7 +132,11 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement
f085be
                 mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false;
f085be
                 break;
f085be
             case A_TOKEN( spAutoFit ):
f085be
-                mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= true;
f085be
+                {
f085be
+                    const sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
f085be
+                    if( tVert != XML_vert && tVert != XML_eaVert && tVert != XML_vert270 && tVert != XML_mongolianVert )
f085be
+                        mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= true;
f085be
+                }
f085be
                 break;
f085be
 
f085be
             case A_TOKEN( scene3d ):        // CT_Scene3D
f085be
-- 
f085be
1.9.3
f085be