[Libreoffice-commits] core.git: sfx2/inc sfx2/source

Caolán McNamara caolanm at redhat.com
Thu Apr 11 07:41:06 PDT 2013


 sfx2/inc/sfx2/docfile.hxx    |    3 +++
 sfx2/source/appl/appopen.cxx |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 60683b6de3f0ef0e9b22de5f5159086eb64e9f33
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 11 15:38:20 2013 +0100

    Resolves: fdo#63426 presentation wizard crashes
    
    This effectively reverts the code parts of
    13e8f68e82713cae2d081a236b260bda12aafa23
    "fix memory leak and add some documentation"
    
    Change-Id: I66fa052f79185e1348c14e99954b04bf0a4622e5

diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 5aef2f2..fcf7351 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -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,
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index d88ecb7..1e8a832 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -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();


More information about the Libreoffice-commits mailing list