summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-09 13:35:39 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-09 14:01:57 +0100
commitf5b3a728cec51cedc985e60bdd25f8f5484b7e14 (patch)
tree97fe9c6a0bba896ba3603c79c164a17c23667570 /oox
parent66338e11a48f600c63d37c3969ddb8b5a1188011 (diff)
drawingml import: handle wps:bodyPr inside a groupshape
Change-Id: I1f059ae653ab13a7c867f77b2b1b4265e9e71b4e
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;