[Libreoffice-commits] core.git: sw/source

David Tardon dtardon at redhat.com
Wed Aug 26 09:29:52 PDT 2015


 sw/source/filter/ww8/ww8par.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 444761dc952974a3ae7180dde867df41b6e105f6
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Aug 26 18:27:37 2015 +0200

    use unique_ptr
    
    Change-Id: I4c8e2e62943171a001036ea46fbfc83f92a2b1d8

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 00318f2..b476bb8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6147,8 +6147,8 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, co
 
     if( !nRet )
     {
-        SwWW8ImplReader* pRdr = new SwWW8ImplReader(nVersion, pStg, pIn, rDoc,
-            rBaseURL, bNew, bSkipImages, *rPaM.GetPoint());
+        std::unique_ptr<SwWW8ImplReader> pRdr(new SwWW8ImplReader(nVersion, pStg, pIn, rDoc,
+            rBaseURL, bNew, bSkipImages, *rPaM.GetPoint()));
         if (bNew)
         {
             // Remove Frame and offsets from Frame Template
@@ -6166,7 +6166,6 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, co
         {
             nRet = ERR_WW8_NO_WW8_FILE_ERR;
         }
-        delete pRdr;
 
         if( refStrm.Is() )
         {


More information about the Libreoffice-commits mailing list