diff options
author | Tor Lillqvist <tml@openoffice.org> | 2010-04-22 15:33:46 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@openoffice.org> | 2010-04-22 15:33:46 +0300 |
commit | 50ce399dd160de25ee92b537269e27149f5d606a (patch) | |
tree | 47dce2bcd8be1d5b743505629ec3108591a50edc /oox/source/drawingml/textbodypropertiescontext.cxx | |
parent | dba391b866c92a5015ef821620d1b5720cf2f487 (diff) | |
parent | 17e7675fe6fccf5a0f084bb9f7bceb4f663f8e3b (diff) |
ooxml10: merge with DEV300 m77, conflicts hopefully resolved correctly
Diffstat (limited to 'oox/source/drawingml/textbodypropertiescontext.cxx')
-rw-r--r-- | oox/source/drawingml/textbodypropertiescontext.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index d64aab174f8b..668266f2f679 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -30,6 +30,8 @@ #include <com/sun/star/drawing/TextHorizontalAdjust.hpp> #include <com/sun/star/text/ControlCharacter.hpp> #include <com/sun/star/text/WritingMode.hpp> +#include <com/sun/star/drawing/TextVerticalAdjust.hpp> +#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> #include "oox/drawingml/textbodyproperties.hxx" #include "oox/drawingml/drawingmltypes.hxx" #include "oox/helper/attributelist.hxx" @@ -40,6 +42,7 @@ using ::rtl::OUString; using namespace ::oox::core; +using namespace ::com::sun::star; using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::text; using namespace ::com::sun::star::uno; @@ -59,7 +62,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, // ST_TextWrappingType sal_Int32 nWrappingType = aAttribs.getToken( XML_wrap, XML_square ); - mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= (nWrappingType == XML_square); + mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= static_cast< sal_Bool >( nWrappingType == XML_square ); // ST_Coordinate OUString sValue; @@ -85,7 +88,17 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, } // ST_TextAnchoringType - mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= GetTextVerticalAdjust( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) ); + drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP ); + switch( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) ) + { + case XML_b : eVA = drawing::TextVerticalAdjust_BOTTOM; break; + case XML_dist : + case XML_just : + case XML_ctr : eVA = drawing::TextVerticalAdjust_CENTER; break; + default: + case XML_t : eVA = drawing::TextVerticalAdjust_TOP; break; + } + mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; bool bAnchorCenter = aAttribs.getBool( XML_anchorCtr, false ); if( bAnchorCenter ) |