diff options
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/customshapeproperties.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/textbodypropertiescontext.cxx | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 14c7a777811f..df878d39eec3 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -46,6 +46,7 @@ CustomShapeProperties::CustomShapeProperties() , mbMirroredX ( false ) , mbMirroredY ( false ) , mnTextRotateAngle ( 0 ) +, mnTextCameraZRotateAngle ( 0 ) , mnArcNum ( 0 ) { } @@ -150,6 +151,7 @@ void CustomShapeProperties::pushToPropSet( aPropertyMap.setProperty( PROP_MirroredX, mbMirroredX ); aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY ); aPropertyMap.setProperty( PROP_TextPreRotateAngle, mnTextRotateAngle ); + aPropertyMap.setProperty( PROP_TextCameraZRotateAngle, mnTextCameraZRotateAngle ); 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 25d94efee180..4e574af50869 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1380,7 +1380,11 @@ Reference< XShape > const & Shape::createAndInsert( mpCustomShapePropertiesPtr->setMirroredY( true ); if( getTextBody() ) { + sal_Int32 nTextCameraZRotation = static_cast< sal_Int32 >( get3DProperties().maCameraRotation.mnRevolution.get() ); + mpCustomShapePropertiesPtr->setTextCameraZRotateAngle( nTextCameraZRotation / 60000 ); + sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( getTextBody()->getTextProperties().moRotation.get( 0 ) ); + nTextRotateAngle -= mnDiagramRotation; /* OOX measures text rotation clockwise in 1/60000th degrees, relative to the containing shape. setTextRotateAngle wants diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 48654a0bc4d2..cac8bc10f89e 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -27,6 +27,7 @@ #include <drawingml/textbodyproperties.hxx> #include <drawingml/textbody.hxx> #include <drawingml/customshapegeometry.hxx> +#include <drawingml/scene3dcontext.hxx> #include <oox/drawingml/drawingmltypes.hxx> #include <oox/helper/attributelist.hxx> #include <oox/helper/propertymap.hxx> @@ -171,6 +172,9 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement break; case A_TOKEN( scene3d ): // CT_Scene3D + return new Scene3DPropertiesContext( *this, mpShapePtr->get3DProperties() ); + break; + // EG_Text3D case A_TOKEN( sp3d ): // CT_Shape3D |