summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorFelix Zhang <fezhang@suse.com>2011-12-13 12:07:20 +0800
committerRadek Doulik <rodo@novell.com>2011-12-14 10:29:19 +0100
commit8d691a2d94d2b2be3ad3fc0a44d2abc387d7b6c2 (patch)
tree9e75813685442877fb2d16bd7a6048e02aaf34c4 /oox/source
parent0cead1d53372cc2e93db5a27b40dee8567129bed (diff)
import text body rotation property of custom shape
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx1
-rw-r--r--oox/source/drawingml/shape.cxx6
-rw-r--r--oox/source/token/properties.txt1
3 files changed, 8 insertions, 0 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index c433d7630774..12a7f29a2cf2 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -186,6 +186,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
+ aPropertyMap[ PROP_TextRotateAngle ] <<= Any( mnTextRotateAngle );
Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index d7168233e865..a261eb915f4c 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -528,6 +528,12 @@ Reference< XShape > Shape::createAndInsert(
mpCustomShapePropertiesPtr->setMirroredX( sal_True );
if ( mbFlipV )
mpCustomShapePropertiesPtr->setMirroredY( sal_True );
+ if( mpTextBody.get() )
+ {
+ sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( mpTextBody->getTextProperties().moRotation.get( 0 ) );
+ mpCustomShapePropertiesPtr->setTextRotateAngle( -nTextRotateAngle / 60000 );
+ }
+
OSL_TRACE("==cscode== shape name: '%s'", rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr());
mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape );
}
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index d071a220e61a..65d2cb035564 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -458,6 +458,7 @@ TextLeftDistance
TextLowerDistance
TextOverlap
TextRightDistance
+TextRotateAngle
TextRotation
TextUpperDistance
TextVerticalAdjust