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

Noel Grandin noel.grandin at collabora.co.uk
Fri Jul 13 06:40:15 UTC 2018


 sc/source/filter/inc/XclExpChangeTrack.hxx   |    2 +-
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1ea64c9d0d73daec926390c87afc543d54e71fb0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Jul 12 16:34:49 2018 +0200

    loplugin:useuniqueptr in XclExpChTrData
    
    Change-Id: I07ca61d4b3a1c85c4441938ece8106bc469173df
    Reviewed-on: https://gerrit.libreoffice.org/57360
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index b20c1e167b21..5bdcd7a7bdd9 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -438,7 +438,7 @@ inline void XclExpChTrAction::WriteTabId( XclExpStream& rStrm, SCTAB nTab ) cons
 
 struct XclExpChTrData
 {
-    XclExpString*               pString;
+    std::unique_ptr<XclExpString> pString;
     XclExpStringRef             mpFormattedString;
     const ScFormulaCell*        mpFormulaCell;
     XclTokenArrayRef            mxTokArr;
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 3035a774ac36..240dfbc6336f 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -763,7 +763,7 @@ XclExpChTrData::~XclExpChTrData()
 
 void XclExpChTrData::Clear()
 {
-    DELETEZ( pString );
+    pString.reset();
     mpFormulaCell = nullptr;
     mxTokArr.reset();
     maRefLog.clear();
@@ -911,7 +911,7 @@ void XclExpChTrCellContent::GetCellData(
                         rRoot, EMPTY_OUSTRING, nullptr);
                 }
             }
-            rpData->pString = new XclExpString( sCellStr, XclStrFlags::NONE, 32766 );
+            rpData->pString.reset( new XclExpString( sCellStr, XclStrFlags::NONE, 32766 ) );
             rpData->nType = EXC_CHTR_TYPE_STRING;
             rpData->nSize = 3 + rpData->pString->GetSize();
             rXclLength1 = 64 + (sCellStr.getLength() << 1);


More information about the Libreoffice-commits mailing list