Kaydet (Commit) 1ea64c9d authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in XclExpChTrData

Change-Id: I07ca61d4b3a1c85c4441938ece8106bc469173df
Reviewed-on: https://gerrit.libreoffice.org/57360
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2d71dd52
...@@ -438,7 +438,7 @@ inline void XclExpChTrAction::WriteTabId( XclExpStream& rStrm, SCTAB nTab ) cons ...@@ -438,7 +438,7 @@ inline void XclExpChTrAction::WriteTabId( XclExpStream& rStrm, SCTAB nTab ) cons
struct XclExpChTrData struct XclExpChTrData
{ {
XclExpString* pString; std::unique_ptr<XclExpString> pString;
XclExpStringRef mpFormattedString; XclExpStringRef mpFormattedString;
const ScFormulaCell* mpFormulaCell; const ScFormulaCell* mpFormulaCell;
XclTokenArrayRef mxTokArr; XclTokenArrayRef mxTokArr;
......
...@@ -763,7 +763,7 @@ XclExpChTrData::~XclExpChTrData() ...@@ -763,7 +763,7 @@ XclExpChTrData::~XclExpChTrData()
void XclExpChTrData::Clear() void XclExpChTrData::Clear()
{ {
DELETEZ( pString ); pString.reset();
mpFormulaCell = nullptr; mpFormulaCell = nullptr;
mxTokArr.reset(); mxTokArr.reset();
maRefLog.clear(); maRefLog.clear();
...@@ -911,7 +911,7 @@ void XclExpChTrCellContent::GetCellData( ...@@ -911,7 +911,7 @@ void XclExpChTrCellContent::GetCellData(
rRoot, EMPTY_OUSTRING, nullptr); 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->nType = EXC_CHTR_TYPE_STRING;
rpData->nSize = 3 + rpData->pString->GetSize(); rpData->nSize = 3 + rpData->pString->GetSize();
rXclLength1 = 64 + (sCellStr.getLength() << 1); rXclLength1 = 64 + (sCellStr.getLength() << 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment