summaryrefslogtreecommitdiff
path: root/oox/source/shape
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-06-12 17:11:10 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-06-19 11:52:39 +0200
commit831c2d95289f41529ea1f85c90f8bb112e522d97 (patch)
treeab7a925e4e6b1110ccbd486600d08220bd91f8c1 /oox/source/shape
parente28c8f3b75cb46906a8479cf9a52f272fdb17682 (diff)
Revert "rework getting shape for the .docx import filter"
Stupid containers with shared_ptr. Trying to remove the object from it gets it deleted because it's owned by the shared_ptr and there's no sensible way to wrestle it out of it. This will need to be redone somehow. This reverts commit 04d600d4be7c50db4b3b505039eb8bc96856f593.
Diffstat (limited to 'oox/source/shape')
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 241ae868ca2b..04e2330ca14d 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -280,8 +280,11 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException)
if ( getContextHandler() == getDrawingShapeContext() )
{
mpDrawing->finalizeFragmentImport();
- if( const ::oox::vml::ShapeBase* pShape = mpDrawing->getShapes().takeLastShape() )
+ if( const ::oox::vml::ShapeBase* pShape = mpDrawing->getShapes().getFirstShape() )
+ {
xResult = pShape->convertAndInsert( xShapes );
+ mpDrawing->getShapes( ).clearShapes( );
+ }
}
else if (mxDiagramShapeContext.is())
{