[Libreoffice-commits] core.git: cui/source dbaccess/source desktop/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 24 06:19:33 UTC 2020


 cui/source/tabpages/page.cxx                               |   20 ++++++-------
 dbaccess/source/core/api/RowSet.cxx                        |    6 +--
 dbaccess/source/core/api/querycontainer.cxx                |    4 +-
 dbaccess/source/core/api/tablecontainer.cxx                |    2 -
 dbaccess/source/core/dataaccess/ComponentDefinition.cxx    |    2 -
 dbaccess/source/core/dataaccess/ModelImpl.cxx              |    2 -
 dbaccess/source/core/dataaccess/commanddefinition.cxx      |    2 -
 dbaccess/source/core/dataaccess/documentcontainer.cxx      |    6 +--
 dbaccess/source/sdbtools/connection/objectnames.cxx        |   10 +++---
 dbaccess/source/ui/dlg/sqlmessage.cxx                      |    4 +-
 dbaccess/source/ui/dlg/textconnectionsettings.cxx          |   12 +++----
 dbaccess/source/ui/misc/DExport.cxx                        |    2 -
 dbaccess/source/ui/misc/UITools.cxx                        |    2 -
 dbaccess/source/ui/misc/dsmeta.cxx                         |    2 -
 dbaccess/source/ui/misc/imageprovider.cxx                  |    4 +-
 dbaccess/source/ui/querydesign/JoinController.cxx          |    2 -
 dbaccess/source/ui/querydesign/QueryTableView.cxx          |    2 -
 dbaccess/source/ui/relationdesign/RelationTableView.cxx    |    6 +--
 dbaccess/source/ui/tabledesign/FieldDescriptions.cxx       |    2 -
 dbaccess/source/ui/tabledesign/TEditControl.cxx            |    4 +-
 dbaccess/source/ui/tabledesign/TableController.cxx         |    4 +-
 dbaccess/source/ui/tabledesign/TableUndo.cxx               |    6 +--
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx |   12 +++----
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx        |    2 -
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx         |    2 -
 desktop/source/lib/init.cxx                                |    6 +--
 26 files changed, 64 insertions(+), 64 deletions(-)

New commits:
commit a41f9b3ae91101414a7ba2f651f735bc71f69f81
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jan 23 16:37:11 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 24 07:18:56 2020 +0100

    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 at collabora.co.uk>

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index ccb159205308..4a98f37dd594 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1022,7 +1022,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
             if(mbEnableDrawingLayerFillStyles)
             {
                 // create FillAttributes directly from DrawingLayer FillStyle entries
-                aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet));
+                aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rTmpSet);
             }
             else
             {
@@ -1035,7 +1035,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
                     SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
 
                     setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
-                    aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+                    aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
                 }
             }
 
@@ -1058,7 +1058,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
             if(mbEnableDrawingLayerFillStyles)
             {
                 // create FillAttributes directly from DrawingLayer FillStyle entries
-                aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet));
+                aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rTmpSet);
             }
             else
             {
@@ -1071,7 +1071,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
                     SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
 
                     setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
-                    aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+                    aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
                 }
             }
 
@@ -1085,7 +1085,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
     if(mbEnableDrawingLayerFillStyles)
     {
         // create FillAttributes directly from DrawingLayer FillStyle entries
-        aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rSet));
+        aPageFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rSet);
     }
     else
     {
@@ -1098,7 +1098,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
             SfxItemSet aTempSet(*rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
 
             setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
-            aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+            aPageFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
         }
     }
 
@@ -1149,7 +1149,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
         if(mbEnableDrawingLayerFillStyles)
         {
             // create FillAttributes directly from DrawingLayer FillStyle entries
-            aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rHeaderSet));
+            aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rHeaderSet);
         }
         else
         {
@@ -1162,7 +1162,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
                 SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
 
                 setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
-                aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+                aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
             }
         }
 
@@ -1203,7 +1203,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
         if(mbEnableDrawingLayerFillStyles)
         {
             // create FillAttributes directly from DrawingLayer FillStyle entries
-            aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rFooterSet));
+            aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rFooterSet);
         }
         else
         {
@@ -1216,7 +1216,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
                 SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
 
                 setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
-                aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
+                aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
             }
         }
 
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 933530480d55..10432ffbfb7b 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1690,9 +1690,9 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
         aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::EComposeRule::InDataManipulation );
 
     SAL_INFO("dbaccess", "ORowSet::impl_prepareAndExecute_throw: creating cache" );
-    m_pCache.reset(
-        new ORowSetCache(xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName,
-               m_bModified, m_bNew, *m_aParameterValueForCache, m_aFilter, m_nMaxRows));
+    m_pCache =
+        std::make_shared<ORowSetCache>(xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName,
+               m_bModified, m_bNew, *m_aParameterValueForCache, m_aFilter, m_nMaxRows);
     if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
     {
         m_nPrivileges = Privilege::SELECT;
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index 2fbf6b551689..731bf4e21896 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -63,7 +63,7 @@ OQueryContainer::OQueryContainer(
                 , const Reference< XConnection >& _rxConn
                 , const Reference< XComponentContext >& _rxORB,
                 ::dbtools::WarningsContainer* _pWarnings)
-    :ODefinitionContainer(_rxORB,nullptr,TContentPtr(new ODefinitionContainer_Impl))
+    :ODefinitionContainer(_rxORB,nullptr,std::make_shared<ODefinitionContainer_Impl>())
     ,m_pWarnings( _pWarnings )
     ,m_xCommandDefinitions(_rxCommandDefinitions)
     ,m_xConnection(_rxConn)
@@ -90,7 +90,7 @@ void OQueryContainer::init()
         m_aDocuments.push_back(m_aDocumentMap.emplace( *pDefinitionName,Documents::mapped_type()).first);
     }
 
-    setElementApproval( PContainerApprove( new ObjectNameApproval( m_xConnection, ObjectNameApproval::TypeQuery ) ) );
+    setElementApproval( std::make_shared<ObjectNameApproval>( m_xConnection, ObjectNameApproval::TypeQuery ) );
 }
 
 rtl::Reference<OQueryContainer> OQueryContainer::create(
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 3637e6b3bed1..fb14a5f4170c 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -267,7 +267,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer
     }
 
     Reference< XConnection > xConnection( m_xConnection.get(), UNO_QUERY );
-    PContainerApprove pApprove( new ObjectNameApproval( xConnection, ObjectNameApproval::TypeTable ) );
+    PContainerApprove pApprove = std::make_shared<ObjectNameApproval>( xConnection, ObjectNameApproval::TypeTable );
     pApprove->approveElement( aName );
 
     {
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 2114fe323939..ca088bb080fe 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -271,7 +271,7 @@ com_sun_star_comp_dba_OComponentDefinition(css::uno::XComponentContext* context,
         css::uno::Sequence<css::uno::Any> const &)
 {
     return cppu::acquire(new dbaccess::OComponentDefinition(
-            context, nullptr, dbaccess::TContentPtr(new dbaccess::OComponentDefinition_Impl)));
+            context, nullptr, std::make_shared<dbaccess::OComponentDefinition_Impl>()));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 0b9679232141..988d47038d52 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1032,7 +1032,7 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
 
     if ( !rContentPtr.get() )
     {
-        rContentPtr = TContentPtr( new ODefinitionContainer_Impl );
+        rContentPtr = std::make_shared<ODefinitionContainer_Impl>();
         rContentPtr->m_pDataSource = this;
         rContentPtr->m_aProps.aTitle = lcl_getContainerStorageName_throw( _eType );
     }
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index 4781146f8bed..03af40113d72 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -127,7 +127,7 @@ com_sun_star_comp_dba_OCommandDefinition(css::uno::XComponentContext* context,
         css::uno::Sequence<css::uno::Any> const &)
 {
     return cppu::acquire(new dbaccess::OCommandDefinition(
-            context, nullptr, dbaccess::TContentPtr( new dbaccess::OCommandDefinition_Impl )));
+            context, nullptr, std::make_shared<dbaccess::OCommandDefinition_Impl>() ));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 05f0da16f474..db5bed5ceb43 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -96,7 +96,7 @@ ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xO
     registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::BOUND | PropertyAttribute::READONLY | PropertyAttribute::CONSTRAINED,
                     &m_pImpl->m_aProps.aTitle, cppu::UnoType<decltype(m_pImpl->m_aProps.aTitle)>::get());
 
-    setElementApproval( PContainerApprove( new LocalNameApproval ) );
+    setElementApproval( std::make_shared<LocalNameApproval>() );
 }
 
 ODocumentContainer::~ODocumentContainer()
@@ -256,7 +256,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
         TContentPtr pElementImpl;
         if ( bNew || ( aFind == rDefinitions.end() ) )
         {
-            pElementImpl.reset( new OContentHelper_Impl );
+            pElementImpl = std::make_shared<OContentHelper_Impl>();
             if ( !bNew )
                 pElementImpl->m_aProps.aTitle = sName;
 
@@ -317,7 +317,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
         TContentPtr pElementImpl;
         if ( aFind == rDefinitions.end() )
         {
-            pElementImpl.reset(new ODefinitionContainer_Impl);
+            pElementImpl = std::make_shared<ODefinitionContainer_Impl>();
             pElementImpl->m_aProps.aTitle = sName;
             pElementImpl->m_pDataSource = m_pImpl->m_pDataSource;
         }
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index d067a042afa8..5a21c1a4abb4 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -307,12 +307,12 @@ namespace sdbtools
             );
         }
 
-        PNameValidation pTableCheck( new PlainExistenceCheck( _rxConnection, xTables ) );
-        PNameValidation pQueryCheck( new PlainExistenceCheck( _rxConnection, xQueries ) );
+        PNameValidation pTableCheck = std::make_shared<PlainExistenceCheck>( _rxConnection, xTables );
+        PNameValidation pQueryCheck = std::make_shared<PlainExistenceCheck>( _rxConnection, xQueries );
         PNameValidation pReturn;
 
         if ( aMeta.supportsSubqueriesInFrom() )
-            pReturn.reset( new CombinedNameCheck( pTableCheck, pQueryCheck ) );
+            pReturn = std::make_shared<CombinedNameCheck>( pTableCheck, pQueryCheck );
         else if ( _nCommandType == CommandType::TABLE )
             pReturn = pTableCheck;
         else
@@ -339,8 +339,8 @@ namespace sdbtools
         }
 
         if ( _nCommandType == CommandType::TABLE )
-            return PNameValidation( new TableValidityCheck( _rxConnection ) );
-        return PNameValidation( new QueryValidityCheck( _rxConnection ) );
+            return std::make_shared<TableValidityCheck>( _rxConnection );
+        return std::make_shared<QueryValidityCheck>( _rxConnection );
     }
 
     // ObjectNames
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 047758341b58..b19e4209b230 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -118,7 +118,7 @@ namespace
             }
 
             if ( !ppProvider->get() )
-                ppProvider->reset(new ImageProvider(sNormalImageID));
+                (*ppProvider) = std::make_shared<ImageProvider>(sNormalImageID);
             return *ppProvider;
         }
 
@@ -143,7 +143,7 @@ namespace
             }
 
             if ( !ppProvider->get() )
-                ppProvider->reset( new LabelProvider( pLabelID ) );
+                (*ppProvider) = std::make_shared<LabelProvider>( pLabelID );
             return *ppProvider;
         }
 
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
index ce481645ac12..5076b3d328c3 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
@@ -41,12 +41,12 @@ namespace dbaui
 
     void TextConnectionSettingsDialog::bindItemStorages( SfxItemSet& _rSet, PropertyValues& _rValues )
     {
-        _rValues[ PROPERTY_ID_HEADER_LINE ].reset( new SetItemPropertyStorage( _rSet, DSID_TEXTFILEHEADER ) );
-        _rValues[ PROPERTY_ID_FIELD_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_FIELDDELIMITER ) );
-        _rValues[ PROPERTY_ID_STRING_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_TEXTDELIMITER ) );
-        _rValues[ PROPERTY_ID_DECIMAL_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_DECIMALDELIMITER ) );
-        _rValues[ PROPERTY_ID_THOUSAND_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_THOUSANDSDELIMITER ) );
-        _rValues[ PROPERTY_ID_ENCODING ].reset( new SetItemPropertyStorage( _rSet, DSID_CHARSET ) );
+        _rValues[ PROPERTY_ID_HEADER_LINE ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_TEXTFILEHEADER );
+        _rValues[ PROPERTY_ID_FIELD_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_FIELDDELIMITER );
+        _rValues[ PROPERTY_ID_STRING_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_TEXTDELIMITER );
+        _rValues[ PROPERTY_ID_DECIMAL_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_DECIMALDELIMITER );
+        _rValues[ PROPERTY_ID_THOUSAND_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_THOUSANDSDELIMITER );
+        _rValues[ PROPERTY_ID_ENCODING ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_CHARSET );
     }
 
     short TextConnectionSettingsDialog::run()
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index e64ab80b8293..5dc324566f1b 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -670,7 +670,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
 
 void ODatabaseExport::createRowSet()
 {
-    m_pUpdateHelper.reset(new OParameterUpdateHelper(createPreparedStatment(m_xConnection->getMetaData(),m_xTable,m_vColumnPositions)));
+    m_pUpdateHelper = std::make_shared<OParameterUpdateHelper>(createPreparedStatment(m_xConnection->getMetaData(),m_xTable,m_vColumnPositions));
 }
 
 bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTextColor, const FontDescriptor& _rFont)
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 84b2d6f9095a..257a10f3b8c0 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -436,7 +436,7 @@ void fillTypeInfo(  const Reference< css::sdbc::XConnection>& _rxConnection,
         // Loop on the result set until we reach end of file
         while (xRs->next())
         {
-            TOTypeInfoSP pInfo(new OTypeInfo());
+            TOTypeInfoSP pInfo = std::make_shared<OTypeInfo>();
             sal_Int32 nPos = 1;
             if ( aTypes.empty() )
             {
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index a894c0329080..58831f081185 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -167,7 +167,7 @@ namespace dbaui
 
     // DataSourceMetaData
     DataSourceMetaData::DataSourceMetaData( const OUString& _sURL )
-        :m_pImpl( new DataSourceMetaData_Impl( _sURL ) )
+        :m_pImpl( std::make_shared<DataSourceMetaData_Impl>( _sURL ) )
     {
     }
 
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 426f99252537..16548dc43edd 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -94,12 +94,12 @@ namespace dbaui
     }
     // ImageProvider
     ImageProvider::ImageProvider()
-        :m_pData( new ImageProvider_Data )
+        :m_pData( std::make_shared<ImageProvider_Data>() )
     {
     }
 
     ImageProvider::ImageProvider( const Reference< XConnection >& _rxConnection )
-        :m_pData( new ImageProvider_Data )
+        :m_pData( std::make_shared<ImageProvider_Data>() )
     {
         m_pData->xConnection = _rxConnection;
         try
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index b2a5184ffc7c..37560014c4c7 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -270,7 +270,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
 void OJoinController::runDialogAsync()
 {
     assert(!m_xAddTableDialog);
-    m_xAddTableDialog.reset(new OAddTableDlg(getFrameWeld(), impl_getDialogContext()));
+    m_xAddTableDialog = std::make_shared<OAddTableDlg>(getFrameWeld(), impl_getDialogContext());
     {
         weld::WaitObject aWaitCursor(getFrameWeld());
         m_xAddTableDialog->Update();
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 905f766916a0..f2d0a17581cf 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -592,7 +592,7 @@ void OQueryTableView::ConnDoubleClicked(VclPtr<OTableConnection>& rConnection)
 
 void OQueryTableView::createNewConnection()
 {
-    TTableConnectionData::value_type pData(new OQueryTableConnectionData());
+    TTableConnectionData::value_type pData = std::make_shared<OQueryTableConnectionData>();
     if( openJoinDialog(this,pData,true) )
     {
         OTableWindowMap& rMap = GetTabWinMap();
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 968b63a547eb..cbc4f9b009e2 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -180,8 +180,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
         }
     }
     // insert table connection into view
-    TTableConnectionData::value_type pTabConnData(new ORelationTableConnectionData(pSourceWin->GetData(),
-                                                                                   pDestWin->GetData()));
+    TTableConnectionData::value_type pTabConnData = std::make_shared<ORelationTableConnectionData>(pSourceWin->GetData(),
+                                                                                   pDestWin->GetData());
 
     // the names of the affected fields
     OUString sSourceFieldName = jxdSource.pListBox->GetEntryText(jxdSource.pEntry);
@@ -246,7 +246,7 @@ void ORelationTableView::ConnDoubleClicked(VclPtr<OTableConnection>& rConnection
 void ORelationTableView::AddNewRelation()
 {
 
-    TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() );
+    TTableConnectionData::value_type pNewConnData = std::make_shared<ORelationTableConnectionData>();
     ORelationDialog aRelDlg(this, pNewConnData, true);
 
     bool bSuccess = (aRelDlg.run() == RET_OK);
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 9f5428b04559..e178cd17d8c2 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -576,7 +576,7 @@ SvxCellHorJustify           OFieldDescription::GetHorJustify()          const
 
 TOTypeInfoSP                OFieldDescription::getSpecialTypeInfo() const
 {
-    TOTypeInfoSP pSpecialType( new OTypeInfo() );
+    TOTypeInfoSP pSpecialType = std::make_shared<OTypeInfo>();
     *pSpecialType = *m_pType;
     pSpecialType->nPrecision = GetPrecision();
     pSpecialType->nMaximumScale = static_cast<sal_Int16>(GetScale());
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 6ee67535d414..4408f36a6427 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -724,7 +724,7 @@ void OTableEditorCtrl::CopyRows()
         OSL_ENSURE(pRow,"OTableEditorCtrl::CopyRows: Row is NULL!");
         if ( pRow && pRow->GetActFieldDescr() )
         {
-            pClipboardRow.reset(new OTableRow( *pRow ));
+            pClipboardRow = std::make_shared<OTableRow>( *pRow );
             vClipboardList.push_back( pClipboardRow);
         }
     }
@@ -782,7 +782,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
             vInsertedUndoRedoRows.reserve(nSize);
             for(sal_Int32 i=0;i < nSize;++i)
             {
-                pRow.reset(new OTableRow());
+                pRow = std::make_shared<OTableRow>();
                 ReadOTableRow( *aStreamRef, *pRow );
                 pRow->SetReadOnly( false );
                 sal_Int32 nType = pRow->GetActFieldDescr()->GetType();
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 17cd3780ee77..2b39fc45c477 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -814,7 +814,7 @@ void OTableController::loadData()
             if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
                 xColumn->getPropertyValue(PROPERTY_ALIGN)       >>= nAlign;
 
-            pTabEdRow.reset(new OTableRow());
+            pTabEdRow = std::make_shared<OTableRow>();
             pTabEdRow->SetReadOnly(!bIsAlterAllowed);
             // search for type
             bool bForce;
@@ -874,7 +874,7 @@ void OTableController::loadData()
     bool bReadRow = !isAddAllowed();
     for(sal_Int32 i=m_vRowList.size(); i < NEWCOLS; i++ )
     {
-        pTabEdRow.reset(new OTableRow());
+        pTabEdRow = std::make_shared<OTableRow>();
         pTabEdRow->SetReadOnly(bReadRow);
         m_vRowList.push_back( pTabEdRow);
     }
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 87baeb3cc80a..f299be1caede 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -163,7 +163,7 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) :
     while( nIndex != SFX_ENDOFSELECTION )
     {
         pOriginalRow = (*pOriginalRows)[nIndex];
-        pNewRow.reset(new OTableRow( *pOriginalRow, nIndex ));
+        pNewRow = std::make_shared<OTableRow>( *pOriginalRow, nIndex );
         m_aDeletedRows.push_back( pNewRow);
 
         nIndex = pOwner->NextSelectedRow();
@@ -185,7 +185,7 @@ void OTableEditorDelUndoAct::Undo()
 
     for (auto const& deletedRow : m_aDeletedRows)
     {
-        pNewOrigRow.reset(new OTableRow( *deletedRow ));
+        pNewOrigRow = std::make_shared<OTableRow>( *deletedRow );
         nPos = deletedRow->GetPos();
         pOriginalRows->insert( pOriginalRows->begin()+nPos,pNewOrigRow);
     }
@@ -245,7 +245,7 @@ void OTableEditorInsUndoAct::Redo()
     std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
     for (auto const& insertedRow : m_vInsertedRows)
     {
-        pRow.reset(new OTableRow( *insertedRow ));
+        pRow = std::make_shared<OTableRow>( *insertedRow );
         pRowList->insert( pRowList->begin()+nInsertRow ,pRow );
         nInsertRow++;
     }
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)
     {


More information about the Libreoffice-commits mailing list