From 6b4fe3e44b4daa89fef6a3385919b00472eaed60 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Jan 2020 08:30:02 +0200 Subject: loplugin:makeshared in drawinglayer..fpicker Change-Id: Ib20fec3a7b6bfe2f94c6f5f2f9fa0be6f7c21e97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87320 Tested-by: Jenkins Reviewed-by: Noel Grandin --- fpicker/source/office/RemoteFilesDialog.cxx | 2 +- fpicker/source/office/iodlg.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'fpicker/source') diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index d2698983e6b9..f8791df0b27c 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -268,7 +268,7 @@ void RemoteFilesDialog::FillServicesListbox() for( sal_Int32 nPlace = 0; nPlace < placesUrlsList.getLength() && nPlace < placesNamesList.getLength(); ++nPlace ) { - ServicePtr pService( new Place( placesNamesList[nPlace], placesUrlsList[nPlace], true ) ); + ServicePtr pService = std::make_shared( placesNamesList[nPlace], placesUrlsList[nPlace], true ); m_aServices.push_back( pService ); // Add to the listbox only remote services, not local bookmarks diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 519b21329f65..4e592c5763c0 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -999,9 +999,9 @@ IMPL_LINK_NOARG ( SvtFileDialog, AddPlacePressed_Hdl, weld::Button&, void ) // Maybe open the PlacesDialog would have been a better idea // there is an ux choice to make we did not make... INetURLObject aURLObj( m_xFileView->GetViewURL() ); - PlacePtr newPlace( - new Place( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset), - m_xFileView->GetViewURL(), true)); + PlacePtr newPlace = + std::make_shared( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset), + m_xFileView->GetViewURL(), true); m_xImpl->m_xPlaces->AppendPlace(newPlace); } @@ -2289,7 +2289,7 @@ void SvtFileDialog::appendDefaultExtension(OUString& rFileName, void SvtFileDialog::initDefaultPlaces( ) { - PlacePtr pRootPlace( new Place( FpsResId(STR_DEFAULT_DIRECTORY), GetStandardDir() ) ); + PlacePtr pRootPlace = std::make_shared( FpsResId(STR_DEFAULT_DIRECTORY), GetStandardDir() ); m_xImpl->m_xPlaces->AppendPlace( pRootPlace ); // Load from user settings @@ -2298,7 +2298,7 @@ void SvtFileDialog::initDefaultPlaces( ) for(sal_Int32 nPlace = 0; nPlace < placesUrlsList.getLength() && nPlace < placesNamesList.getLength(); ++nPlace) { - PlacePtr pPlace(new Place(placesNamesList[nPlace], placesUrlsList[nPlace], true)); + PlacePtr pPlace = std::make_shared(placesNamesList[nPlace], placesUrlsList[nPlace], true); m_xImpl->m_xPlaces->AppendPlace(pPlace); } -- cgit