1 diff -rup oox-orig-2/source/drawingml/shape.cxx oox/source/drawingml/shape.cxx
2 --- oox-orig-2/source/drawingml/shape.cxx 2009-05-22 15:56:35.000000000 +0200
3 +++ oox/source/drawingml/shape.cxx 2009-05-25 09:33:50.000000000 +0200
4 @@ -462,12 +462,14 @@ Reference< XShape > Shape::createAndInse
5 aFillProperties.assignUsed( getFillProperties() );
7 PropertyMap aShapeProperties;
8 - aShapeProperties.insert( getShapeProperties().begin(), getShapeProperties().end() );
10 // add properties from textbody to shape properties
11 + // add them first as they have priority over shape properties
12 if( mpTextBody.get() )
13 aShapeProperties.insert( mpTextBody->getTextProperties().maPropertyMap.begin(), mpTextBody->getTextProperties().maPropertyMap.end() );
15 + aShapeProperties.insert( getShapeProperties().begin(), getShapeProperties().end() );
17 // applying properties
18 PropertySet aPropSet( xSet );
19 if ( rServiceName == OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) )
20 diff -rup oox-orig-2/source/drawingml/textbodypropertiescontext.cxx oox/source/drawingml/textbodypropertiescontext.cxx
21 --- oox-orig-2/source/drawingml/textbodypropertiescontext.cxx 2009-05-22 15:56:35.000000000 +0200
22 +++ oox/source/drawingml/textbodypropertiescontext.cxx 2009-05-25 09:34:59.000000000 +0200
23 @@ -69,22 +69,26 @@ TextBodyPropertiesContext::TextBodyPrope
24 const OUString sTextRightDistance( RTL_CONSTASCII_USTRINGPARAM( "TextRightDistance" ) );
25 const OUString sTextLowerDistance( RTL_CONSTASCII_USTRINGPARAM( "TextLowerDistance" ) );
27 - sValue = xAttributes->getOptionalValue( XML_lIns );
28 - sal_Int32 nLeftInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 );
29 - mrTextBodyProp.maPropertyMap[ sTextLeftDistance ] <<= static_cast< sal_Int32 >( nLeftInset );
31 - sValue = xAttributes->getOptionalValue( XML_tIns );
32 - sal_Int32 nTopInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 );
33 - mrTextBodyProp.maPropertyMap[ sTextUpperDistance ] <<= static_cast< sal_Int32 >( nTopInset );
35 - sValue = xAttributes->getOptionalValue( XML_rIns );
36 - sal_Int32 nRightInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 );
37 - mrTextBodyProp.maPropertyMap[ sTextRightDistance ] <<= static_cast< sal_Int32 >( nRightInset );
39 - sValue = xAttributes->getOptionalValue( XML_bIns );
40 - sal_Int32 nBottonInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 45720 / 360 );
41 - mrTextBodyProp.maPropertyMap[ sTextLowerDistance ] <<= static_cast< sal_Int32 >( nBottonInset );
43 + if( sValue.getLength() ) {
44 + sValue = xAttributes->getOptionalValue( XML_lIns );
45 + sal_Int32 nLeftInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 );
46 + mrTextBodyProp.maPropertyMap[ sTextLeftDistance ] <<= static_cast< sal_Int32 >( nLeftInset );
48 + if( sValue.getLength() ) {
49 + sValue = xAttributes->getOptionalValue( XML_tIns );
50 + sal_Int32 nTopInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 );
51 + mrTextBodyProp.maPropertyMap[ sTextUpperDistance ] <<= static_cast< sal_Int32 >( nTopInset );
53 + if( sValue.getLength() ) {
54 + sValue = xAttributes->getOptionalValue( XML_rIns );
55 + sal_Int32 nRightInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 );
56 + mrTextBodyProp.maPropertyMap[ sTextRightDistance ] <<= static_cast< sal_Int32 >( nRightInset );
58 + if( sValue.getLength() ) {
59 + sValue = xAttributes->getOptionalValue( XML_bIns );
60 + sal_Int32 nBottonInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 45720 / 360 );
61 + mrTextBodyProp.maPropertyMap[ sTextLowerDistance ] <<= static_cast< sal_Int32 >( nBottonInset );
64 // ST_TextAnchoringType
65 mrTextBodyProp.maPropertyMap[ CREATE_OUSTRING( "TextVerticalAdjust" ) ] <<= GetTextVerticalAdjust( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) );