summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shapecontext.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index 7d6971f294b8..7966482fe756 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -31,6 +31,7 @@
#include "oox/drawingml/drawingmltypes.hxx"
#include "oox/drawingml/customshapegeometry.hxx"
#include "oox/drawingml/textbodycontext.hxx"
+#include "oox/drawingml/textbodypropertiescontext.hxx"
#include "hyperlinkcontext.hxx"
using namespace oox::core;
@@ -95,15 +96,27 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const
case XML_txBody:
case XML_txbxContent:
{
- TextBodyPtr xTextBody( new TextBody );
- mpShapePtr->setTextBody( xTextBody );
- return new TextBodyContext( *this, *xTextBody );
+ if (!mpShapePtr->getTextBody())
+ mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
+ return new TextBodyContext( *this, *mpShapePtr->getTextBody() );
}
case XML_txXfrm:
{
mpShapePtr->getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot );
break;
}
+ case XML_cNvSpPr:
+ break;
+ case XML_spLocks:
+ break;
+ case XML_bodyPr:
+ if (!mpShapePtr->getTextBody())
+ mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
+ return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr->getTextBody()->getTextProperties() );
+ break;
+ default:
+ SAL_WARN("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
+ break;
}
return this;