diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-30 09:28:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-30 14:47:51 +0100 |
commit | 4b06bd166a14bcb8da12c923de57098bee179767 (patch) | |
tree | a51c99966d7eaa9ed21d38dbabd2088e5c850f98 /filter | |
parent | 20029f713f2cb07b27d7be9bb4df5c2cec4723da (diff) |
ofz#41510 make sure BackgroundColoredObjects doesn't contain dead objects
Change-Id: I42a96a998736b9921c6416eb76b39029279c8bca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126099
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 360669ff90f2..93a9a9913335 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2912,7 +2912,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* if ( pObj ) { if ( aProcessData.pTableRowProperties ) - pObj = CreateTable(pObj, aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.xSolverContainer.get()); + pObj = CreateTable(pObj, aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.xSolverContainer.get(), aProcessData.aBackgroundColoredObjects); pRet->NbcInsertObject( pObj ); @@ -7535,7 +7535,7 @@ static void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable > } } -SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) +SdrObject* SdrPowerPointImport::CreateTable(SdrObject* pGroup, const sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer, std::vector<SdrObject*>& rBackgroundColoredObjects) { SdrObject* pRet = pGroup; @@ -7688,7 +7688,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, const sal_uInt32 while( aIter.IsMore() ) { SdrObject* pPartObj = aIter.Next(); - removeShapeId( pPartObj ); + removeShapeId(pPartObj); + // ofz#41510 make sure rBackgroundColoredObjects doesn't contain deleted objects + std::replace(rBackgroundColoredObjects.begin(), rBackgroundColoredObjects.end(), pPartObj, pRet); } SdrObject::Free( pGroup ); |