From 1d10db1003f092f48ed09a0d45994f7481b96d84 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Jan 2020 10:54:10 +0200 Subject: loplugin:makeshared in sc Change-Id: Ie287b5c11a1276c56f416f17ea69cddd5992b4a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87326 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/miscdlgs/retypepassdlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/ui/miscdlgs/retypepassdlg.cxx') 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(*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(*pTabProtect); maTableItems.push_back(aTabItem); maSheets.emplace_back(new PassFragment(mxSheetsBox.get())); -- cgit