summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 08:30:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 09:04:45 +0100
commit6b4fe3e44b4daa89fef6a3385919b00472eaed60 (patch)
treedb2d11ae4e08d0782e1eb240513abfbe8ff33113 /fpicker
parente975ab34daf72a2b708a46095994d0df3c23dec0 (diff)
loplugin:makeshared in drawinglayer..fpicker
Change-Id: Ib20fec3a7b6bfe2f94c6f5f2f9fa0be6f7c21e97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87320 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx10
2 files changed, 6 insertions, 6 deletions
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<Place>( 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<Place>( 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<Place>( 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<Place>(placesNamesList[nPlace], placesUrlsList[nPlace], true);
m_xImpl->m_xPlaces->AppendPlace(pPlace);
}