Kaydet (Commit) 1ae7ac2a authored tarafından Muthu Subramanian's avatar Muthu Subramanian

Code review fixes.

üst a647b5b8
...@@ -42,10 +42,6 @@ TextBodyProperties::TextBodyProperties() ...@@ -42,10 +42,6 @@ TextBodyProperties::TextBodyProperties()
void TextBodyProperties::pushToPropMap( PropertyMap& rPropMap ) const void TextBodyProperties::pushToPropMap( PropertyMap& rPropMap ) const
{ {
rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() ); rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() );
// #160799# fake different vertical text modes by top-bottom writing mode
if( moVert.get( XML_horz ) != XML_horz )
rPropMap[ PROP_TextWritingMode ] <<= ::com::sun::star::text::WritingMode_TB_RL;
} }
// ============================================================================ // ============================================================================
......
...@@ -119,6 +119,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, ...@@ -119,6 +119,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent,
bool bRtl = aAttribs.getBool( XML_rtl, false ); bool bRtl = aAttribs.getBool( XML_rtl, false );
sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz ); sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) { if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) {
// #160799# fake different vertical text modes by top-bottom writing mode
mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ] mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
<<= WritingMode_TB_RL; <<= WritingMode_TB_RL;
// workaround for TB_LR as using WritingMode2 doesn't work // workaround for TB_LR as using WritingMode2 doesn't work
...@@ -154,6 +155,8 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, ...@@ -154,6 +155,8 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent,
} }
else if( mrTextBodyProp.moVert.get( XML_horz ) == XML_horz ) else if( mrTextBodyProp.moVert.get( XML_horz ) == XML_horz )
mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA;
else if( eVA == drawing::TextVerticalAdjust_CENTER && xAttributes->hasAttribute( XML_vert ) )
mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= TextHorizontalAdjust_CENTER;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment