summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh1.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-10 14:06:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-11 08:07:42 +0200
commit877362dadf34c910365490ce53b2dcf902dab8cc (patch)
tree91b0c0b1fd827539e971ca20fd46d1fe69d25531 /sc/source/ui/view/cellsh1.cxx
parent72eb6f7e47d7c8c19c76cea67330464af47648f1 (diff)
loplugin:useuniqueptr in ScTabViewShell
Change-Id: I35061f62244ea40ce66bbb0ba09edf9b45d62742 Reviewed-on: https://gerrit.libreoffice.org/57244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/cellsh1.cxx')
-rw-r--r--sc/source/ui/view/cellsh1.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index be04ff40351b..400a0273c9dd 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2758,7 +2758,7 @@ void ScCellShell::ExecuteDataPilotDialog()
ScViewData* pData = GetViewData();
ScDocument* pDoc = pData->GetDocument();
- std::unique_ptr<ScDPObject> pNewDPObject(nullptr);
+ std::unique_ptr<ScDPObject> pNewDPObject;
// ScPivot is no longer used...
ScDPObject* pDPObj = pDoc->GetDPAtCursor(
@@ -2917,8 +2917,9 @@ void ScCellShell::ExecuteDataPilotDialog()
pNewDPObject->SetOutRange( aDestPos );
}
- pTabViewShell->SetDialogDPObject( pNewDPObject.get() ); // is copied
- if ( pNewDPObject )
+ bool bHadNewDPObject = pNewDPObject != nullptr;
+ pTabViewShell->SetDialogDPObject( std::move(pNewDPObject) );
+ if ( bHadNewDPObject )
{
// start layout dialog