diff options
author | Radek Doulik <rodo@novell.com> | 2011-11-08 16:12:29 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-11-08 16:13:01 +0100 |
commit | 07a61ac39681a398fadff7597367c804b8321aa2 (patch) | |
tree | c2ca8ad644b112e91a10d482abea5d82a00d6821 /oox | |
parent | e494bd26e5415dd0926bcef7c51ab99a4322730f (diff) |
fix texbox vertical alignment, it was regression introduced by f1a2b0cb
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textbodypropertiescontext.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index ed95ee7be1bc..083cccfd4a05 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -145,17 +145,15 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, default: case XML_t : eVA = drawing::TextVerticalAdjust_TOP; break; } - if( !xAttributes->hasAttribute( XML_vert ) ) - mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; - else + if( xAttributes->hasAttribute( XML_vert ) && + ( ( mrTextBodyProp.moVert.get( XML_horz ) == XML_vert && eVA == drawing::TextVerticalAdjust_TOP ) || + ( mrTextBodyProp.moVert.get( XML_horz ) == XML_vert270 && eVA == drawing::TextVerticalAdjust_BOTTOM ) ) ) { - if( ( mrTextBodyProp.moVert.get( XML_horz ) == XML_vert && eVA == drawing::TextVerticalAdjust_TOP ) || - ( mrTextBodyProp.moVert.get( XML_horz ) == XML_vert270 && eVA == drawing::TextVerticalAdjust_BOTTOM ) ) - { - mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= - TextHorizontalAdjust_RIGHT; - } + mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= + TextHorizontalAdjust_RIGHT; } + else + mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; } } |