summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs/retypepassdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 10:54:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 11:04:11 +0100
commit1d10db1003f092f48ed09a0d45994f7481b96d84 (patch)
tree5f73a2450b5bda6cbd1becfba3f013e45b6d67b3 /sc/source/ui/miscdlgs/retypepassdlg.cxx
parent9aeff6adce7287f7e85bc47ac9c418b93351e3d4 (diff)
loplugin:makeshared in sc
Change-Id: Ie287b5c11a1276c56f416f17ea69cddd5992b4a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/miscdlgs/retypepassdlg.cxx')
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index 84f8ef182b54..d5bf831e3b83 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -74,7 +74,7 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
DeleteSheets();
const ScDocProtection* pDocProtect = rDoc.GetDocProtection();
if (pDocProtect && pDocProtect->isProtected())
- mpDocItem.reset(new ScDocProtection(*pDocProtect));
+ mpDocItem = std::make_shared<ScDocProtection>(*pDocProtect);
SCTAB nTabCount = rDoc.GetTableCount();
maTableItems.reserve(nTabCount);
@@ -86,7 +86,7 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
const ScTableProtection* pTabProtect = rDoc.GetTabProtection(i);
if (pTabProtect && pTabProtect->isProtected())
- aTabItem.mpProtect.reset(new ScTableProtection(*pTabProtect));
+ aTabItem.mpProtect = std::make_shared<ScTableProtection>(*pTabProtect);
maTableItems.push_back(aTabItem);
maSheets.emplace_back(new PassFragment(mxSheetsBox.get()));