diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-23 16:37:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-24 07:18:56 +0100 |
commit | a41f9b3ae91101414a7ba2f651f735bc71f69f81 (patch) | |
tree | 7827e21495a370fd68bc4d884a4fd3b89295239c /desktop/source | |
parent | e5cfe9c050fbd601b64dc13fe6760e762a35a4d4 (diff) |
loplugin:makeshared in cui..desktop
Change-Id: I45b7381f665a749b86302be07fa095a30842428f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 12 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 2 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 179304795611..acf23a0d5bf8 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -616,7 +616,7 @@ void ExtensionCmdQueue::Thread::addExtension( const OUString &rExtensionURL, { if ( !rExtensionURL.isEmpty() ) { - TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ADD, rExtensionURL, rRepository, bWarnUser ) ); + TExtensionCmd pEntry = std::make_shared<ExtensionCmd>( ExtensionCmd::ADD, rExtensionURL, rRepository, bWarnUser ); _insert( pEntry ); } } @@ -626,7 +626,7 @@ void ExtensionCmdQueue::Thread::removeExtension( const uno::Reference< deploymen { if ( rPackage.is() ) { - TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::REMOVE, rPackage ) ); + TExtensionCmd pEntry = std::make_shared<ExtensionCmd>( ExtensionCmd::REMOVE, rPackage ); _insert( pEntry ); } } @@ -636,7 +636,7 @@ void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment: { if ( rPackage.is() ) { - TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ACCEPT_LICENSE, rPackage ) ); + TExtensionCmd pEntry = std::make_shared<ExtensionCmd>( ExtensionCmd::ACCEPT_LICENSE, rPackage ); _insert( pEntry ); } } @@ -647,9 +647,9 @@ void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deploymen { if ( rPackage.is() ) { - TExtensionCmd pEntry( new ExtensionCmd( bEnable ? ExtensionCmd::ENABLE : + TExtensionCmd pEntry = std::make_shared<ExtensionCmd>( bEnable ? ExtensionCmd::ENABLE : ExtensionCmd::DISABLE, - rPackage ) ); + rPackage ); _insert( pEntry ); } } @@ -658,7 +658,7 @@ void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deploymen void ExtensionCmdQueue::Thread::checkForUpdates( const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList ) { - TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::CHECK_FOR_UPDATES, vExtensionList ) ); + TExtensionCmd pEntry = std::make_shared<ExtensionCmd>( ExtensionCmd::CHECK_FOR_UPDATES, vExtensionList ); _insert( pEntry ); } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 1f74612e1729..73cee9a90264 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -900,7 +900,7 @@ void ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & PackageState eState = TheExtensionManager::getPackageState( xPackage ); bool bLocked = m_pManager->isReadOnly( xPackage ); - TEntry_Impl pEntry( new Entry_Impl( xPackage, eState, bLocked ) ); + TEntry_Impl pEntry = std::make_shared<Entry_Impl>( xPackage, eState, bLocked ); // Don't add empty entries if ( pEntry->m_sTitle.isEmpty() ) diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 54bd5e4b5d9e..1a9a3cd43798 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -134,7 +134,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg ) } else if ( !m_xExtMgrDialog ) { - m_xExtMgrDialog.reset(new ExtMgrDialog(Application::GetFrameWeld(m_xParent), this)); + m_xExtMgrDialog = std::make_shared<ExtMgrDialog>(Application::GetFrameWeld(m_xParent), this); m_xExecuteCmdQueue.reset( new ExtensionCmdQueue( m_xExtMgrDialog.get(), this, m_xContext ) ); m_xExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL ); createPackageList(); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 75670689a32f..a308e28ba942 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1177,7 +1177,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone { if (!(m_pDocumentClass = gDocumentClass.lock())) { - m_pDocumentClass.reset(new LibreOfficeKitDocumentClass); + m_pDocumentClass = std::make_shared<LibreOfficeKitDocumentClass>(); m_pDocumentClass->nSize = sizeof(LibreOfficeKitDocumentClass); @@ -2016,7 +2016,7 @@ LibLibreOffice_Impl::LibLibreOffice_Impl() , mOptionalFeatures(0) { if(!m_pOfficeClass) { - m_pOfficeClass.reset(new LibreOfficeKitClass); + m_pOfficeClass = std::make_shared<LibreOfficeKitClass>(); m_pOfficeClass->nSize = sizeof(LibreOfficeKitClass); m_pOfficeClass->destroy = lo_destroy; @@ -3201,7 +3201,7 @@ static void doc_registerCallback(LibreOfficeKitDocument* pThis, } } - pDocument->mpCallbackFlushHandlers[nView].reset(new CallbackFlushHandler(pThis, pCallback, pData)); + pDocument->mpCallbackFlushHandlers[nView] = std::make_shared<CallbackFlushHandler>(pThis, pCallback, pData); if (pCallback != nullptr) { |