summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-16 11:40:20 +0000
committerAndras Timar <andras.timar@collabora.com>2017-04-23 13:14:31 +0200
commit48e1564139c1e94ca26934d7bcbdffddef38ede1 (patch)
treeeeaca906a5f50a9090419de273c435f10caa79c7 /sd
parente12fa59ae7f8076b4f23c24c9b157b1bce19eda5 (diff)
ofz#877 reference to stack alloced obj outlives obj
(cherry picked from commit ae174b009bcf0f84073b9ebbf01ad31b274b789e) Change-Id: I8c854e2f651f8bf0018e8249827aae0fe23057e7 Reviewed-on: https://gerrit.libreoffice.org/35272 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit e8a070fd1170a7452d57304d6cf979f0c9961a0e)
Diffstat (limited to 'sd')
-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 38f49fb61841..a9c9e493e9b9 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -98,10 +98,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() )
@@ -121,7 +119,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;
}
}
}
@@ -129,11 +127,10 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt
delete pSummaryInformation;
#endif
- PowerPointImportParam aParam( rDocStream, nImportFlags );
SvStream* pCurrentUserStream = rStorage.OpenSotStream( "Current User", STREAM_STD_READ );
if( pCurrentUserStream )
{
- ReadPptCurrentUserAtom( *pCurrentUserStream, aParam.aCurrentUserAtom );
+ ReadPptCurrentUserAtom(*pCurrentUserStream, maParam.aCurrentUserAtom);
delete pCurrentUserStream;
}
@@ -153,7 +150,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 1bee08a8596f..65db4a8e8cff 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -49,7 +49,6 @@ class ImplSdPPTImport : public SdrPowerPointImport
{
SfxMedium& mrMed;
SotStorage& mrStorage;
-// SvStream* mpPicStream;
DffRecordHeader maDocHd;
std::vector<OUString> maSlideNameList;
bool mbDocumentFound;
@@ -83,14 +82,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