diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-23 15:57:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-28 08:39:21 +0200 |
commit | b2e8bbeafa35c15d168961de711e4970eb0985cb (patch) | |
tree | 1d8259893caa4ff0c74a0e271c641c4f326ea8e2 /sc/source/filter | |
parent | c4170e4bcba61865425d03a1292b9aea39dc1e6d (diff) |
loplugin:useuniqueptr in ScColumn
Change-Id: Iff6c68a29b9e7660132cbe4e556802b0f63706f0
Reviewed-on: https://gerrit.libreoffice.org/51904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/excimp8.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/impop.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/workbookhelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.cxx | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index aa3e630f5d09..2cf116b9ee4d 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -794,7 +794,7 @@ void XclImpAutoFilterData::Apply() } else pCurrDBData->SetAdvancedQuerySource(nullptr); - rDoc.SetAnonymousDBData(Tab(), pCurrDBData); + rDoc.SetAnonymousDBData(Tab(), std::unique_ptr<ScDBData>(pCurrDBData)); } if( bActive ) diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 56b2de54f441..136904fa87c4 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -1348,13 +1348,13 @@ void ImportExcel::PostDocLoad() { if( p->aStart.Col() == 0 && p->aEnd.Col() == MAXCOL && bRowVirgin ) { - pD->SetRepeatRowRange( n, p ); + pD->SetRepeatRowRange( n, std::unique_ptr<ScRange>(new ScRange(*p)) ); bRowVirgin = false; } if( p->aStart.Row() == 0 && p->aEnd.Row() == MAXROW && bColVirgin ) { - pD->SetRepeatColRange( n, p ); + pD->SetRepeatColRange( n, std::unique_ptr<ScRange>(new ScRange(*p)) ); bColVirgin = false; } diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index b37638da99cb..ce72e708e029 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -455,10 +455,10 @@ Reference< XDatabaseRange > WorkbookGlobals::createUnnamedDatabaseRangeObject( c ScDocument& rDoc = getScDocument(); if( rDoc.GetTableCount() <= aDestRange.aStart.Tab() ) throw css::lang::IndexOutOfBoundsException(); - ScDBData* pNewDBData = new ScDBData( STR_DB_LOCAL_NONAME, aDestRange.aStart.Tab(), + std::unique_ptr<ScDBData> pNewDBData(new ScDBData( STR_DB_LOCAL_NONAME, aDestRange.aStart.Tab(), aDestRange.aStart.Col(), aDestRange.aStart.Row(), - aDestRange.aEnd.Col(), aDestRange.aEnd.Row() ); - rDoc.SetAnonymousDBData( aDestRange.aStart.Tab() , pNewDBData ); + aDestRange.aEnd.Col(), aDestRange.aEnd.Row() )); + rDoc.SetAnonymousDBData( aDestRange.aStart.Tab() , std::move(pNewDBData) ); ScDocShell* pDocSh = static_cast< ScDocShell* >(rDoc.GetDocumentShell()); xDatabaseRange.set(new ScDatabaseRangeObj(pDocSh, aDestRange.aStart.Tab())); } diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index 721f7f946a8f..d71a07e51769 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -417,7 +417,7 @@ void SAL_CALL ScXMLDatabaseRangeContext::endFastElement( sal_Int32 /*nElement*/ pData->GetArea(aRange); setAutoFilterFlags(*pDoc, *pData); - pDoc->SetAnonymousDBData(aRange.aStart.Tab(), pData.release()); + pDoc->SetAnonymousDBData(aRange.aStart.Tab(), std::move(pData)); } return; } @@ -431,7 +431,7 @@ void SAL_CALL ScXMLDatabaseRangeContext::endFastElement( sal_Int32 /*nElement*/ pData->GetArea(aRange); if (setAutoFilterFlags(*pDoc, *pData)) - pDoc->SetAnonymousDBData(aRange.aStart.Tab(), pData.release()); + pDoc->SetAnonymousDBData(aRange.aStart.Tab(), std::move(pData)); else pDoc->GetDBCollection()->getAnonDBs().insert(pData.release()); } |