diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-04 11:49:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-04 12:13:33 +0100 |
commit | cbeb028519d0383ae3089c48f9ceefe9ee817188 (patch) | |
tree | e6877cfd2699ee4522765dece346202b82ee4401 /oox | |
parent | 14d49ded7177856f095d665edec92ddee5dbb86c (diff) |
DOCX import: parse drawingML group shapes in oox only
This is similar to commit d5c934d150cb6cea5f96cbbee4fb5e8312bf027e
(n#792778 DOCX import: parse group shapes in oox only, 2012-12-14),
except that was for the VML importer.
The only difference is that in case of drawingML,
OOXMLFastContextHandlerShape::lcl_createFastChildContext() is only
called for the children of the group shape, not for the element itself,
so compare against the start token, not the current element.
Change-Id: Iddeabb20bbd5f0153e2fc4e6df463830126fdd37
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shapecontext.cxx | 1 | ||||
-rw-r--r-- | oox/source/drawingml/textbodycontext.cxx | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 7a1de2de0494..7d6971f294b8 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -93,6 +93,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const return new ShapeStyleContext( *this, *mpShapePtr ); case XML_txBody: + case XML_txbxContent: { TextBodyPtr xTextBody( new TextBody ); mpShapePtr->setTextBody( xTextBody ); diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index 80e5657263b7..a276ca1c6348 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -62,6 +62,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken switch( aElementToken ) { case A_TOKEN( r ): // "CT_RegularTextRun" Regular Text Run. + case OOX_TOKEN( doc, r ): { TextRunPtr pRun( new TextRun ); mrParagraph.addRun( pRun ); @@ -104,6 +105,7 @@ void RegularTextRunContext::onEndElement( ) switch( getCurrentElement() ) { case A_TOKEN( t ): + case OOX_TOKEN( doc, t ): { mbIsInText = false; break; @@ -135,6 +137,7 @@ ContextHandlerRef RegularTextRunContext::onCreateContext( sal_Int32 aElementToke case A_TOKEN( rPr ): // "CT_TextCharPropertyBag" The text char properties of this text run. return new TextCharacterPropertiesContext( *this, rAttribs, mpRunPtr->getTextCharacterProperties() ); case A_TOKEN( t ): // "xsd:string" minOccurs="1" The actual text string. + case OOX_TOKEN( doc, t ): mbIsInText = true; break; } @@ -161,6 +164,7 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con case A_TOKEN( lstStyle ): // CT_TextListStyle return new TextListStyleContext( *this, mrTextBody.getTextListStyle() ); case A_TOKEN( p ): // CT_TextParagraph + case OOX_TOKEN( doc, p ): return new TextParagraphContext( *this, mrTextBody.addParagraph() ); } |