ofz#877 reference to stack alloced obj outlives obj
Change-Id: I8c854e2f651f8bf0018e8249827aae0fe23057e7
This commit is contained in:
@@ -102,10 +102,8 @@
|
|||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
|
|
||||||
SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium )
|
SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium )
|
||||||
|
: maParam(rDocStream, 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
sal_uInt32 nImportFlags = 0;
|
|
||||||
|
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
PropRead* pSummaryInformation = new PropRead( rStorage, "\005SummaryInformation" );
|
PropRead* pSummaryInformation = new PropRead( rStorage, "\005SummaryInformation" );
|
||||||
if ( pSummaryInformation->IsValid() )
|
if ( pSummaryInformation->IsValid() )
|
||||||
@@ -125,7 +123,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
|
|||||||
aPropItem.Read( aComment );
|
aPropItem.Read( aComment );
|
||||||
if ( aComment.indexOf( "Applixware" ) >= 0 )
|
if ( aComment.indexOf( "Applixware" ) >= 0 )
|
||||||
{
|
{
|
||||||
nImportFlags |= PPT_IMPORTFLAGS_NO_TEXT_ASSERT;
|
maParam.nImportFlags |= PPT_IMPORTFLAGS_NO_TEXT_ASSERT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,11 +131,10 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
|
|||||||
delete pSummaryInformation;
|
delete pSummaryInformation;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PowerPointImportParam aParam( rDocStream, nImportFlags );
|
|
||||||
SvStream* pCurrentUserStream = rStorage.OpenSotStream( "Current User", StreamMode::STD_READ );
|
SvStream* pCurrentUserStream = rStorage.OpenSotStream( "Current User", StreamMode::STD_READ );
|
||||||
if( pCurrentUserStream )
|
if( pCurrentUserStream )
|
||||||
{
|
{
|
||||||
ReadPptCurrentUserAtom( *pCurrentUserStream, aParam.aCurrentUserAtom );
|
ReadPptCurrentUserAtom(*pCurrentUserStream, maParam.aCurrentUserAtom);
|
||||||
delete pCurrentUserStream;
|
delete pCurrentUserStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +154,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pFilter.reset( new ImplSdPPTImport( pDocument, rStorage, rMedium, aParam ) );
|
pFilter.reset(new ImplSdPPTImport(pDocument, rStorage, rMedium, maParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SdPPTImport::Import()
|
bool SdPPTImport::Import()
|
||||||
|
@@ -48,7 +48,6 @@ class ImplSdPPTImport : public SdrPowerPointImport
|
|||||||
{
|
{
|
||||||
SfxMedium& mrMed;
|
SfxMedium& mrMed;
|
||||||
SotStorage& mrStorage;
|
SotStorage& mrStorage;
|
||||||
// SvStream* mpPicStream;
|
|
||||||
DffRecordHeader maDocHd;
|
DffRecordHeader maDocHd;
|
||||||
std::vector<OUString> maSlideNameList;
|
std::vector<OUString> maSlideNameList;
|
||||||
bool mbDocumentFound;
|
bool mbDocumentFound;
|
||||||
@@ -82,14 +81,15 @@ public:
|
|||||||
|
|
||||||
class SdPPTImport
|
class SdPPTImport
|
||||||
{
|
{
|
||||||
|
PowerPointImportParam maParam;
|
||||||
std::unique_ptr<ImplSdPPTImport> pFilter;
|
std::unique_ptr<ImplSdPPTImport> pFilter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMed );
|
SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMed );
|
||||||
~SdPPTImport();
|
~SdPPTImport();
|
||||||
|
|
||||||
bool Import();
|
bool Import();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDED_SD_SOURCE_FILTER_PPT_PPTIN_HXX
|
#endif // INCLUDED_SD_SOURCE_FILTER_PPT_PPTIN_HXX
|
||||||
|
Reference in New Issue
Block a user