summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2021-03-08 17:28:27 +0100
committerRegina Henschel <rb.henschel@t-online.de>2021-03-10 12:33:38 +0100
commitdbbb8cafcb801638bde3b21796eaebfc807acbdc (patch)
tree69a13cc253adb027edef7eb4857187033fe2a60b /oox
parent734f37aaf6027ef2d989b6440370dee46bac0df7 (diff)
tdf#140865 roundtrip pptx wordart 3D, add sp3d
Change-Id: I446ae4e8c9dd5f2fbf3efe289681339f967c515a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112185 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/scene3dcontext.cxx24
-rw-r--r--oox/source/drawingml/textbodypropertiescontext.cxx16
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;