diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-05 11:09:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-07 11:47:20 +0200 |
commit | c666ea47bcf45b3c530778a7d0eea888e949947e (patch) | |
tree | 075bc50f937c6d50d589fdf2fbd87abe3cbf759e /sc | |
parent | 3250c27b86d420d4891e1f83d8b11f9999b2a7d0 (diff) |
use more std::unique_ptr in ScCheckListMenuWindow
Change-Id: Ia63d663204af570fb0e7faa46e4925c2787fc59b
Reviewed-on: https://gerrit.libreoffice.org/61433
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/checklistmenu.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 9dcd5894baec..6a2a8b436674 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -2008,9 +2008,9 @@ void ScCheckListMenuWindow::close(bool bOK) EndPopupMode(); } -void ScCheckListMenuWindow::setExtendedData(ExtendedData* p) +void ScCheckListMenuWindow::setExtendedData(std::unique_ptr<ExtendedData> p) { - mpExtendedData.reset(p); + mpExtendedData = std::move(p); } ScCheckListMenuWindow::ExtendedData* ScCheckListMenuWindow::getExtendedData() diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 076ad2414afa..c3638b147384 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -355,7 +355,7 @@ public: * popup window class manages its life time; no explicit deletion of the * instance is needed in the client code. */ - void setExtendedData(ExtendedData* p); + void setExtendedData(std::unique_ptr<ExtendedData> p); /** * Get the store auxiliary data, or NULL if no such data is stored. diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 4bbdc97493e0..fdcdf2da7e5b 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -662,7 +662,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) return; pData->mpData = pDBData; - mpAutoFilterPopup->setExtendedData(pData.release()); + mpAutoFilterPopup->setExtendedData(std::move(pData)); ScQueryParam aParam; pDBData->GetQueryParam(aParam); diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 66e1a83ee25c..4adfc1e32f5d 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -470,7 +470,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScr mpDPFieldPopup.disposeAndClear(); mpDPFieldPopup.reset(VclPtr<ScCheckListMenuWindow>::Create(this, pViewData->GetDocument())); mpDPFieldPopup->setName("DataPilot field member popup"); - mpDPFieldPopup->setExtendedData(pDPData.release()); + mpDPFieldPopup->setExtendedData(std::move(pDPData)); mpDPFieldPopup->setOKAction(new DPFieldPopupOKAction(this)); { // Populate field members. |