summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/inc/sfx2/app.hxx3
-rw-r--r--sfx2/inc/sfx2/docfile.hxx6
-rw-r--r--sfx2/source/appl/appopen.cxx1
3 files changed, 10 insertions, 0 deletions
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 6fe8bc071809..24c0294211d9 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -164,6 +164,9 @@ public:
void RemoveDdeTopic( SfxObjectShell* );
// "static" methods
+ /**
+ * @param pArgs Takes ownership
+ */
sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const String& rFileName, sal_Bool bCopy=sal_True, SfxItemSet* pArgs = 0 );
SfxTemplateDialog* GetTemplateDialog();
Window* GetTopWindow() const;
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index d4ee981266c1..05b6c915ec2d 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -96,9 +96,15 @@ public:
SfxMedium(String const &, StreamMode, void *)
SAL_DELETED_FUNCTION;
+ /**
+ * @param pSet does NOT take ownership
+ */
SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const String& rBaseURL,
const SfxItemSet* pSet=0 );
+ /**
+ * @param pSet does NOT take ownership
+ */
SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const String& rBaseURL,
const String& rTypeName,
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index aaee060eea62..de1e79d33df5 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -375,6 +375,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String
xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, pFilter, pSet );
+ delete pSet;
if(!xDoc->DoLoad(pMedium))
{
ErrCode nErrCode = xDoc->GetErrorCode();