oox/inc/oox/drawingml/customshapeproperties.hxx | 2 ++ oox/source/drawingml/customshapeproperties.cxx | 1 + oox/source/drawingml/shape.cxx | 6 ++++++ oox/source/token/properties.txt | 1 + 4 files changed, 10 insertions(+)
New commits: commit 8d691a2d94d2b2be3ad3fc0a44d2abc387d7b6c2 Author: Felix Zhang <fezh...@suse.com> Date: Tue Dec 13 12:07:20 2011 +0800 import text body rotation property of custom shape diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index d5ae9a5..004d771 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -136,6 +136,7 @@ public: std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& getSegments(){ return maSegments; }; void setMirroredX( sal_Bool bMirroredX ) { mbMirroredX = bMirroredX; }; void setMirroredY( sal_Bool bMirroredY ) { mbMirroredY = bMirroredY; }; + void setTextRotateAngle( sal_Int32 nAngle ) { mnTextRotateAngle = nAngle; }; double getValue( const std::vector< CustomShapeGuide >&, sal_uInt32 nIndex ) const; static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide ); @@ -157,6 +158,7 @@ private: maSegments; sal_Bool mbMirroredX; sal_Bool mbMirroredY; + sal_Int32 mnTextRotateAngle; typedef boost::unordered_map< sal_Int32, PropertyMap > PresetsMap; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index c433d76..12a7f29 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 d716823..a261eb9 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 d071a22..65d2cb0 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 _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits