[Libreoffice-commits] .: oox/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Tue Nov 8 07:13:05 PST 2011
oox/source/drawingml/textbodypropertiescontext.cxx | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
New commits:
commit 07a61ac39681a398fadff7597367c804b8321aa2
Author: Radek Doulik <rodo at novell.com>
Date: Tue Nov 8 16:12:29 2011 +0100
fix texbox vertical alignment, it was regression introduced by f1a2b0cb
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index ed95ee7..083cccf 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;
}
}
More information about the Libreoffice-commits
mailing list