diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-06 15:57:43 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-06-06 17:55:02 +0200 |
commit | 7c7c7dc785750769d661df1dc36201b9f5566ea1 (patch) | |
tree | 989ed89c59676075079d8a6d8d96e16b5607a02e /oox/source/drawingml | |
parent | e0c9b690074cd476b03169397cbf1969f2239c1e (diff) |
bnc#880763: PPTX import: wrong z-order becuause of wrong import order
importExtDrawings() must be called as soon as possible,
before parser starts to parse the next shape.
Call it when graphicFrame tag is closed. This tag include
the reference to the SmartArt.
Plus fix up import tests.
Change-Id: I9e8d54c2b1afeb78a1122390dc4982d580c152ae
(cherry picked from commit 46d682eec92bb241f4604a4b6ab42a3859cd0d48)
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/graphicshapecontext.cxx | 14 |
1 files changed, 12 insertions, 2 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 ), |