diff -ru svx.orig/inc/svx/svdfppt.hxx svx/inc/svx/svdfppt.hxx --- svx.orig/inc/svx/svdfppt.hxx 2009-10-21 09:45:21.000000000 +0100 +++ svx/inc/svx/svdfppt.hxx 2009-10-21 09:45:50.000000000 +0100 @@ -610,7 +610,7 @@ UINT32& nMappedFontId, Font& rFont, char nDefault ) const; const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; } virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const; - SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* ) const; + SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* ); }; //////////////////////////////////////////////////////////////////////////////////////////////////// diff -ru svx.orig/source/msfilter/msdffimp.cxx svx/source/msfilter/msdffimp.cxx --- svx.orig/source/msfilter/msdffimp.cxx 2009-10-21 09:45:12.000000000 +0100 +++ svx/source/msfilter/msdffimp.cxx 2009-10-21 09:52:13.000000000 +0100 @@ -7957,25 +7957,31 @@ delete pWrapPolygon; } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ - void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape ) { maShapeIdContainer[nShapeId] = pShape; } -void SvxMSDffManager::removeShapeId( SdrObject* pShape ) +namespace { - SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.begin() ); - const SvxMSDffShapeIdContainer::iterator aEnd( maShapeIdContainer.end() ); - while( aIter != aEnd ) + class IsShape : public std::unary_function { - if( (*aIter).second == pShape ) + const SdrObject *mpShape; + public: + IsShape(const SdrObject *pShape) : mpShape(pShape) {} + bool operator()(const SvxMSDffShapeIdContainer::value_type& rVal) { - maShapeIdContainer.erase( aIter ); - break; + return rVal.second == mpShape; } - } + }; +} + +void SvxMSDffManager::removeShapeId( SdrObject* pShape ) +{ + const SvxMSDffShapeIdContainer::iterator aEnd( maShapeIdContainer.end() ); + SvxMSDffShapeIdContainer::iterator aIter = std::find_if(maShapeIdContainer.begin(), aEnd, IsShape(pShape)); + if (aIter != aEnd) + maShapeIdContainer.erase( aIter ); } SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId ) @@ -7983,3 +7989,5 @@ SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.find(nShapeId) ); return aIter != maShapeIdContainer.end() ? (*aIter).second : 0; } + +/* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff -ru svx.orig/source/svdraw/svdfppt.cxx svx/source/svdraw/svdfppt.cxx --- svx.orig/source/svdraw/svdfppt.cxx 2009-10-21 09:45:12.000000000 +0100 +++ svx/source/svdraw/svdfppt.cxx 2009-10-21 09:45:37.000000000 +0100 @@ -7492,7 +7492,7 @@ } } -SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) const +SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) { SdrObject* pRet = pGroup; sal_uInt32 nRows = pTableArry[ 1 ]; @@ -7585,6 +7585,17 @@ pTable->uno_unlock(); pTable->SetSnapRect( pGroup->GetSnapRect() ); pRet = pTable; + + + //Remove Objects from shape map + SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS ); + while( aIter.IsMore() ) + { + SdrObject* pPartObj = aIter.Next(); + removeShapeId( pPartObj ); + } + + SdrObject::Free( pGroup ); } catch( Exception& )