diff options
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFastContextHandler.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 8c02cca4bcbc..f4a7924432ea 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -2283,11 +2283,14 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext bool bInNamespaces = mMyNamespaces.find(nNameSpace) != mMyNamespaces.end(); bool bInTokens = mMyTokens.find( Element ) != mMyTokens.end( ); + OOXMLFastContextHandlerShape* pShapeCtx = (OOXMLFastContextHandlerShape*)mpParent; + // We have methods to _add_ individual tokens or whole namespaces to be // processed by writerfilter (instead of oox), but we have no method to // filter out a single token. Just hardwire the wrap token here till we // need a more generic solution. - if ( bInNamespaces && Element != static_cast<sal_Int32>(NS_vml_wordprocessingDrawing | OOXML_wrap) ) + bool bIsWrap = Element == static_cast<sal_Int32>(NS_vml_wordprocessingDrawing | OOXML_wrap); + if ( bInNamespaces && ((pShapeCtx->isShapeSent() && bIsWrap) || !bIsWrap) ) xResult.set(OOXMLFactory::getInstance()->createFastChildContextFromStart(this, Element)); else if (mxContext.is()) { @@ -2302,10 +2305,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext xResult.set(this); if ( bInTokens ) - { - OOXMLFastContextHandlerShape* pShapeCtx = (OOXMLFastContextHandlerShape*)mpParent; pShapeCtx->sendShape( Element ); - } return xResult; } |