diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/graphicshapecontext.cxx | 14 | ||||
-rw-r--r-- | oox/source/ppt/pptshapegroupcontext.cxx | 7 |
2 files changed, 12 insertions, 9 deletions
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index ebd2028f6ad6..db04d5ce9310 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -36,6 +36,7 @@ #include "oox/drawingml/transform2dcontext.hxx" #include "oox/helper/binaryinputstream.hxx" #include "oox/helper/binaryoutputstream.hxx" +#include "oox/ppt/pptshapegroupcontext.hxx" #include <comphelper/processfactory.hxx> using namespace ::com::sun::star; @@ -103,7 +104,8 @@ ContextHandlerRef GraphicShapeContext::onCreateContext( sal_Int32 aElementToken, GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ) : ShapeContext( rParent, pMasterShapePtr, pShapePtr ), - mbEmbedShapesInChart( bEmbedShapesInChart ) + mbEmbedShapesInChart( bEmbedShapesInChart ), + mpParent(&rParent) { } @@ -146,7 +148,15 @@ ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aEleme return ShapeContext::onCreateContext( aElementToken, rAttribs ); } - +void GraphicalObjectFrameContext::onEndElement() +{ + if( getCurrentElement() == PPT_TOKEN( graphicFrame ) && mpParent ) + { + oox::ppt::PPTShapeGroupContext* pParent = dynamic_cast<oox::ppt::PPTShapeGroupContext*>(mpParent); + if( pParent ) + pParent->importExtDrawings(); + } +} OleObjectGraphicDataContext::OleObjectGraphicDataContext( ContextHandler2Helper& rParent, ShapePtr xShape ) : ShapeContext( rParent, ShapePtr(), xShape ), diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index 0fd517f0c14c..9bf3d2bd5383 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -109,8 +109,6 @@ ContextHandlerRef PPTShapeGroupContext::onCreateContext( sal_Int32 aElementToken return new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ); case PPT_TOKEN( graphicFrame ): // CT_GraphicalObjectFrame { - if( pGraphicShape ) - importExtDrawings(); pGraphicShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) ); return new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, pGraphicShape, true ); } @@ -150,11 +148,6 @@ void PPTShapeGroupContext::applyFontRefColor(oox::drawingml::ShapePtr pShape, co } } -void PPTShapeGroupContext::onEndElement() -{ - importExtDrawings(); -} - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |