summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-16 11:40:20 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-16 16:13:25 +0000
commit037069698c6aa78a3509c0527b0bd00c412ba735 (patch)
tree54349402d44cdb1a1df4c40c3d4a8f5e658aa39b
parentd0b73f86c667e3637cc439868cb84e7182d98786 (diff)
ofz#877 reference to stack alloced obj outlives obj
(cherry picked from commit ae174b009bcf0f84073b9ebbf01ad31b274b789e) Change-Id: I8c854e2f651f8bf0018e8249827aae0fe23057e7 Reviewed-on: https://gerrit.libreoffice.org/35271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sd/source/filter/ppt/pptin.cxx11
-rw-r--r--sd/source/filter/ppt/pptin.hxx10
2 files changed, 9 insertions, 12 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 78b5e274c7cd..f2e90fc41cb6 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -100,10 +100,8 @@
using namespace ::com::sun::star;
SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium )
+ : maParam(rDocStream, 0)
{
-
- sal_uInt32 nImportFlags = 0;
-
#ifdef DBG_UTIL
PropRead* pSummaryInformation = new PropRead( rStorage, OUString( "\005SummaryInformation" ) );
if ( pSummaryInformation->IsValid() )
@@ -123,7 +121,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
aPropItem.Read( aComment );
if ( aComment.indexOf( "Applixware" ) >= 0 )
{
- nImportFlags |= PPT_IMPORTFLAGS_NO_TEXT_ASSERT;
+ maParam.nImportFlags |= PPT_IMPORTFLAGS_NO_TEXT_ASSERT;
}
}
}
@@ -131,11 +129,10 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
delete pSummaryInformation;
#endif
- PowerPointImportParam aParam( rDocStream, nImportFlags );
SvStream* pCurrentUserStream = rStorage.OpenSotStream( "Current User", StreamMode::STD_READ );
if( pCurrentUserStream )
{
- ReadPptCurrentUserAtom( *pCurrentUserStream, aParam.aCurrentUserAtom );
+ ReadPptCurrentUserAtom(*pCurrentUserStream, maParam.aCurrentUserAtom);
delete pCurrentUserStream;
}
@@ -155,7 +152,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
}
}
- pFilter = new ImplSdPPTImport( pDocument, rStorage, rMedium, aParam );
+ pFilter = new ImplSdPPTImport(pDocument, rStorage, rMedium, maParam);
}
bool SdPPTImport::Import()
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index f9435922facf..7fb951fe48fc 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -48,7 +48,6 @@ class ImplSdPPTImport : public SdrPowerPointImport
{
SfxMedium& mrMed;
SotStorage& mrStorage;
-// SvStream* mpPicStream;
DffRecordHeader maDocHd;
std::vector<OUString> maSlideNameList;
bool mbDocumentFound;
@@ -82,14 +81,15 @@ public:
class SdPPTImport
{
+ PowerPointImportParam maParam;
ImplSdPPTImport* pFilter;
- public:
+public:
- SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMed );
- ~SdPPTImport();
+ SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMed );
+ ~SdPPTImport();
- bool Import();
+ bool Import();
};
#endif // INCLUDED_SD_SOURCE_FILTER_PPT_PPTIN_HXX