From 9767537e22e178eb23872de138ea70e57c1a6725 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 17 Jan 2017 10:11:31 +0200 Subject: new loplugin: useuniqueptr: sc part 2 Change-Id: I37936a297027313e2a8ae18f355567462955739e Reviewed-on: https://gerrit.libreoffice.org/33203 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sc/source/ui/docshell/dataprovider.cxx | 2 -- sc/source/ui/docshell/pagedata.cxx | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'sc/source/ui/docshell') diff --git a/sc/source/ui/docshell/dataprovider.cxx b/sc/source/ui/docshell/dataprovider.cxx index eb037edcd1b2..f309e791e088 100644 --- a/sc/source/ui/docshell/dataprovider.cxx +++ b/sc/source/ui/docshell/dataprovider.cxx @@ -71,7 +71,6 @@ ExternalDataMapper::ExternalDataMapper(ScDocShell* pDocShell, const OUString& rU ExternalDataMapper::~ExternalDataMapper() { - delete mpDataProvider; } void ExternalDataMapper::StartImport() @@ -146,7 +145,6 @@ CSVFetchThread::CSVFetchThread(SvStream *pData, size_t nColCount): CSVFetchThread::~CSVFetchThread() { - delete mpStream; } bool CSVFetchThread::IsRequestedTerminate() diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx index 7a73ae639ac7..143c1e50119f 100644 --- a/sc/source/ui/docshell/pagedata.cxx +++ b/sc/source/ui/docshell/pagedata.cxx @@ -68,15 +68,12 @@ ScPageBreakData::ScPageBreakData(size_t nMax) { nUsed = 0; if (nMax) - pData = new ScPrintRangeData[nMax]; - else - pData = nullptr; + pData.reset( new ScPrintRangeData[nMax] ); nAlloc = nMax; } ScPageBreakData::~ScPageBreakData() { - delete[] pData; } ScPrintRangeData& ScPageBreakData::GetData(size_t nPos) -- cgit