diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/scene3dcontext.cxx | 24 | ||||
-rw-r--r-- | oox/source/drawingml/textbodypropertiescontext.cxx | 16 |
2 files changed, 40 insertions, 0 deletions
diff --git a/oox/source/drawingml/scene3dcontext.cxx b/oox/source/drawingml/scene3dcontext.cxx index 91b73f0bbd95..813f9442c901 100644 --- a/oox/source/drawingml/scene3dcontext.cxx +++ b/oox/source/drawingml/scene3dcontext.cxx @@ -92,6 +92,30 @@ ContextHandlerRef SceneText3DPropertiesContext::onCreateContext( sal_Int32 aElem case A_TOKEN( backdrop ): case A_TOKEN( extLst ): return nullptr; // TODO: later (backdrop is not supported by core anyway) + + case A_TOKEN( bevelT ): + case A_TOKEN( bevelB ): + { + BevelProperties aProps; + if( rAttribs.hasAttribute( XML_w ) ) + aProps.mnWidth = rAttribs.getInteger( XML_w, 0 ); + if( rAttribs.hasAttribute( XML_h ) ) + aProps.mnHeight = rAttribs.getInteger( XML_h, 0 ); + if( rAttribs.hasAttribute( XML_prst ) ) + aProps.mnPreset = rAttribs.getToken( XML_prst, XML_none ); + + if( aElementToken == A_TOKEN( bevelT ) ) + mr3DProperties.maTopBevelProperties.set( aProps ); + else + mr3DProperties.maBottomBevelProperties.set( aProps ); + break; + } + + case A_TOKEN( extrusionClr ): + return new ColorContext( *this, mr3DProperties.maExtrusionColor ); + + case A_TOKEN( contourClr ): + return new ColorContext( *this, mr3DProperties.maContourColor ); } return nullptr; } diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 5bc244b73fc2..4d94191dcfc7 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -177,6 +177,22 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement // EG_Text3D case A_TOKEN( sp3d ): // CT_Shape3D + { + if (mpShapePtr && mpShapePtr->getServiceName() == "com.sun.star.drawing.CustomShape") + { + if (rAttribs.hasAttribute(XML_extrusionH)) + mpShapePtr->getTextBody()->get3DProperties().mnExtrusionH = rAttribs.getInteger(XML_extrusionH, 0); + if (rAttribs.hasAttribute(XML_contourW)) + mpShapePtr->getTextBody()->get3DProperties().mnContourW = rAttribs.getInteger(XML_contourW, 0); + if (rAttribs.hasAttribute(XML_z)) + mpShapePtr->getTextBody()->get3DProperties().mnShapeZ = rAttribs.getInteger(XML_z, 0); + if (rAttribs.hasAttribute(XML_prstMaterial)) + mpShapePtr->getTextBody()->get3DProperties().mnMaterial = rAttribs.getToken(XML_prstMaterial, XML_none); + return new SceneText3DPropertiesContext(*this, mpShapePtr->getTextBody()->get3DProperties()); + } + break; + } + case A_TOKEN( flatTx ): // CT_FlatText break; |