summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-16 11:40:20 +0000
committerMichael Stahl <mstahl@redhat.com>2017-03-21 16:37:31 +0000
commite8a070fd1170a7452d57304d6cf979f0c9961a0e (patch)
tree5ec109516976a8ac8495253fa504edbeb25191da /sd
parent29b783dc6844a3fed9bcf434ae3901e986b44991 (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>
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 8eac912e254c..74d3e45557a1 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 ef69e29c9308..bf221f945a2a 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