diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-17 13:09:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-18 06:58:44 +0000 |
commit | d96c114171dada05caffd9a50f870809ebd0c450 (patch) | |
tree | 2ef1572fce732c39557b3f2f944aef86f17aa703 /sd/source | |
parent | 70aa5799336de6cbd1d964e2e9a176b44d438db2 (diff) |
clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/CustomAnimationPreset.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/escherex.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/html/buttonset.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/framework/configuration/ConfigurationUpdater.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Server.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/model/SlideSorterModel.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx | 8 |
7 files changed, 11 insertions, 12 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 9f7bb73da750..2773050a8707 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -466,7 +466,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor #endif pEffectNames++; } - rPresetMap.push_back( PresetCategoryPtr( new PresetCategory( aLabel, aEffectsList ) ) ); + rPresetMap.push_back( std::make_shared<PresetCategory>( aLabel, aEffectsList ) ); } p++; diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index 346fa881e4b9..3365bcac51f8 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -20,7 +20,7 @@ #include "escherex.hxx" PptEscherEx::PptEscherEx( SvStream& rOutStrm, const OUString& rBaseURI ) : - EscherEx( EscherExGlobalRef( new EscherExGlobal ), &rOutStrm ) + EscherEx( std::make_shared<EscherExGlobal>( ), &rOutStrm ) { mxGlobal->SetBaseURI( rBaseURI ); mnCurrentDg = 0; diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx index 2d07d782e135..7828f8d63633 100644 --- a/sd/source/filter/html/buttonset.cxx +++ b/sd/source/filter/html/buttonset.cxx @@ -177,7 +177,7 @@ void ButtonSetImpl::scanForButtonSets( const OUString& rPath ) { OUString sFileName( aStatus.getFileName() ); if( sFileName.endsWithIgnoreAsciiCase( ".zip" ) ) - maButtons.push_back( std::shared_ptr< ButtonsImpl >( new ButtonsImpl( aStatus.getFileURL() ) ) ); + maButtons.push_back( std::make_shared< ButtonsImpl >( aStatus.getFileURL() ) ); } } } diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx index 4bbeb6d76595..df1d5670001f 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx @@ -356,7 +356,7 @@ void ConfigurationUpdater::UnlockUpdates() std::shared_ptr<ConfigurationUpdaterLock> ConfigurationUpdater::GetLock() { - return std::shared_ptr<ConfigurationUpdaterLock>(new ConfigurationUpdaterLock(*this)); + return std::make_shared<ConfigurationUpdaterLock>(*this); } void ConfigurationUpdater::SetUpdateBeingProcessed (bool bValue) diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index f58d69f9b71b..be5ab7b73098 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -264,7 +264,7 @@ std::vector< std::shared_ptr< ClientInfo > > RemoteServer::getClients() Sequence< OUString > aNames = xConfig->getElementNames(); for ( int i = 0; i < aNames.getLength(); i++ ) { - aClients.push_back( std::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], true ) ) ); + aClients.push_back( std::make_shared< ClientInfo > ( aNames[i], true ) ); } return aClients; diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index 6baca008835b..68fc9a0450ed 100644 --- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx +++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx @@ -562,11 +562,10 @@ void SlideSorterModel::InsertSlide (SdPage* pPage) // Insert the given page at index nIndex maPageDescriptors.insert( maPageDescriptors.begin()+nIndex, - SharedPageDescriptor( - new PageDescriptor ( + std::make_shared<PageDescriptor>( Reference<drawing::XDrawPage>(mxSlides->getByIndex(nIndex),UNO_QUERY), pPage, - nIndex))); + nIndex)); // Update page indices. UpdateIndices(nIndex+1); diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index 41e878e4fdbd..2145b389c3aa 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx @@ -216,11 +216,11 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun ( { // There is only one run that contains all slides. if (maRuns.empty()) - maRuns.insert(SharedPageObjectRun(new PageObjectRun( + maRuns.insert(std::make_shared<PageObjectRun>( *this, 0, 0, - mrModel.GetPageCount()-1))); + mrModel.GetPageCount()-1)); iRun = maRuns.begin(); } else @@ -233,11 +233,11 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun ( const sal_Int32 nEndIndex (rLayouter.GetIndex(nRow, rLayouter.GetColumnCount()-1)); if (nStartIndex <= nEndIndex) { - iRun = maRuns.insert(SharedPageObjectRun(new PageObjectRun( + iRun = maRuns.insert(std::make_shared<PageObjectRun>( *this, nRow, nStartIndex, - nEndIndex))).first; + nEndIndex)).first; OSL_ASSERT(iRun != maRuns.end()); } } |