filter/source/msfilter/svdfppt.cxx | 22 +++++++++++----------- include/filter/msfilter/svdfppt.hxx | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-)
New commits: commit 7d05bbd50d5b3a9fff467b44e033bedb12a46a2d Author: David Tardon <dtar...@redhat.com> Date: Wed Oct 15 11:38:34 2014 +0200 avoid double-delete This is a regression from commit b1d48f0d9a3442c11adae6e36325a463d89ce44e. Change-Id: Iffd39782c1d1fd7be14f4d657919f704807a40f5 diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index b6300bb..494949c 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2443,14 +2443,14 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind ) PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE ); if ( pPageList && nMasterIndex < pPageList->size() ) { - PptSlidePersistEntry& rMasterPersist = (*pPageList)[ nMasterIndex ]; - if ( ( rMasterPersist.pStyleSheet == NULL ) && rMasterPersist.aSlideAtom.nMasterId ) + PptSlidePersistEntry* pMasterPersist = &(*pPageList)[ nMasterIndex ]; + if ( ( pMasterPersist->pStyleSheet == NULL ) && pMasterPersist->aSlideAtom.nMasterId ) { - nMasterIndex = pMasterPages->FindPage( rMasterPersist.aSlideAtom.nMasterId ); + nMasterIndex = pMasterPages->FindPage( pMasterPersist->aSlideAtom.nMasterId ); if ( nMasterIndex != PPTSLIDEPERSIST_ENTRY_NOTFOUND ) - rMasterPersist = (*pPageList)[ nMasterIndex ]; + pMasterPersist = &(*pPageList)[ nMasterIndex ]; } - pPPTStyleSheet = rMasterPersist.pStyleSheet; + pPPTStyleSheet = pMasterPersist->pStyleSheet; } } if ( !pPPTStyleSheet ) @@ -2753,21 +2753,21 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* { sal_uInt16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind ); PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE ); - PptSlidePersistEntry& rE = (*pPageList)[ nMasterNum ]; - while( ( rE.aSlideAtom.nFlags & 4 ) && rE.aSlideAtom.nMasterId ) + PptSlidePersistEntry* pE = &(*pPageList)[ nMasterNum ]; + while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId ) { - sal_uInt16 nNextMaster = pMasterPages->FindPage( rE.aSlideAtom.nMasterId ); + sal_uInt16 nNextMaster = pMasterPages->FindPage( pE->aSlideAtom.nMasterId ); if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND ) break; else - rE = (*pPageList)[ nNextMaster ]; + pE = &(*pPageList)[ nNextMaster ]; } - if ( rE.nBackgroundOffset ) + if ( pE->nBackgroundOffset ) { // do not follow master colorscheme? bool bTemporary = ( rSlidePersist.aSlideAtom.nFlags & 2 ) != 0; sal_uInt32 nPos = rStCtrl.Tell(); - rStCtrl.Seek( rE.nBackgroundOffset ); + rStCtrl.Seek( pE->nBackgroundOffset ); rSlidePersist.pBObj = ImportObj( rStCtrl, (void*)&aProcessData, aPageSize, aPageSize ); rSlidePersist.bBObjIsTemporary = bTemporary; rStCtrl.Seek( nPos ); diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 9fed6d0..bc19a42 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -36,6 +36,7 @@ #include <filter/msfilter/msfilterdllapi.h> #include <vcl/font.hxx> #include <vector> +#include <boost/noncopyable.hpp> #include <boost/optional.hpp> #include <boost/ptr_container/ptr_vector.hpp> @@ -315,7 +316,7 @@ public: struct ProcessData; struct PPTStyleSheet; struct HeaderFooterEntry; -struct PptSlidePersistEntry +struct PptSlidePersistEntry : private boost::noncopyable { PptSlidePersistAtom aPersistAtom; PptSlideAtom aSlideAtom; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits