Resolves: fdo#63426 presentation wizard crashes

This effectively reverts the code parts of
13e8f68e82
"fix memory leak and add some documentation"

Change-Id: I66fa052f79185e1348c14e99954b04bf0a4622e5
This commit is contained in:
Caolán McNamara
2013-04-11 15:38:20 +01:00
parent 87cb8d784c
commit 60683b6de3
2 changed files with 4 additions and 1 deletions

View File

@@ -71,6 +71,9 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
public:
SfxMedium();
/**
* @param pSet Takes ownership
*/
SfxMedium( const String &rName,
StreamMode nOpenMode,
const SfxFilter *pFilter = 0,

View File

@@ -375,8 +375,8 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String
if ( !xDoc.Is() )
xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
//pMedium takes ownership of pSet
SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, pFilter, pSet );
delete pSet;
if(!xDoc->DoLoad(pMedium))
{
ErrCode nErrCode = xDoc->GetErrorCode();