diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-24 13:21:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-25 07:06:20 +0100 |
commit | a258a043c90eaaa4f6a411318e239e805d087d0c (patch) | |
tree | 250eed3d964d3872e02d0d9622ede8b3343ce7ef /svtools | |
parent | cee62b1068775b7d0bcd2875e9789c8c36c22057 (diff) |
loplugin:makeshared in svl..svx
Change-Id: I067ea2f3cb651fdc5c3d1a09b0c55583618b9d1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87355
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/table/cellvalueconversion.cxx | 12 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol.cxx | 2 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/svtxgridcontrol.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.cxx | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx index 6219eee3efc5..2ca15c7ca514 100644 --- a/svtools/source/table/cellvalueconversion.cxx +++ b/svtools/source/table/cellvalueconversion.cxx @@ -340,25 +340,25 @@ namespace svt if ( sTypeName == ::cppu::UnoType< DateTime >::get().getTypeName() ) { - o_formatter.reset( new DateTimeNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<DateTimeNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< css::util::Date >::get().getTypeName() ) { - o_formatter.reset( new DateNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<DateNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< css::util::Time >::get().getTypeName() ) { - o_formatter.reset( new TimeNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<TimeNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< sal_Bool >::get().getTypeName() ) { - o_formatter.reset( new BooleanNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<BooleanNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< double >::get().getTypeName() || sTypeName == ::cppu::UnoType< float >::get().getTypeName() ) { - o_formatter.reset( new DoubleNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<DoubleNormalization>( io_data.xNumberFormatter ); } else if ( ( eTypeClass == TypeClass_BYTE ) || ( eTypeClass == TypeClass_SHORT ) @@ -368,7 +368,7 @@ namespace svt || ( eTypeClass == TypeClass_HYPER ) ) { - o_formatter.reset( new IntegerNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<IntegerNormalization>( io_data.xNumberFormatter ); } else { diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 175d711d4704..dda4d974dabe 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -49,7 +49,7 @@ namespace svt { namespace table TableControl::TableControl( vcl::Window* _pParent, WinBits _nStyle ) :Control( _pParent, _nStyle ) - ,m_pImpl( new TableControl_Impl( *this ) ) + ,m_pImpl( std::make_shared<TableControl_Impl>( *this ) ) { TableDataWindow& rDataWindow = m_pImpl->getDataWindow(); rDataWindow.SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 42e65a02b7a4..d413f9e28b69 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -218,7 +218,7 @@ namespace svt { namespace table TableControl_Impl::TableControl_Impl( TableControl& _rAntiImpl ) :m_rAntiImpl ( _rAntiImpl ) - ,m_pModel ( new EmptyTableModel ) + ,m_pModel ( std::make_shared<EmptyTableModel>() ) ,m_pInputHandler ( ) ,m_nRowHeightPixel ( 15 ) ,m_nColHeaderHeightPixel( 0 ) @@ -265,7 +265,7 @@ namespace svt { namespace table m_pModel = _pModel; if ( !m_pModel) - m_pModel.reset( new EmptyTableModel ); + m_pModel = std::make_shared<EmptyTableModel>(); m_pModel->addTableModelListener( shared_from_this() ); @@ -563,7 +563,7 @@ namespace svt { namespace table { m_pInputHandler = m_pModel->getInputHandler(); if ( !m_pInputHandler ) - m_pInputHandler.reset( new DefaultInputHandler ); + m_pInputHandler = std::make_shared<DefaultInputHandler>(); m_nColumnCount = m_pModel->getColumnCount(); if ( m_nLeftColumn >= m_nColumnCount ) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 31f46d0d9d7a..0526b2e4f680 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -70,7 +70,7 @@ using namespace ::svt::table; SVTXGridControl::SVTXGridControl() - :m_xTableModel( new UnoControlTableModel() ) + :m_xTableModel( std::make_shared<UnoControlTableModel>() ) ,m_bTableModelInitCompleted( false ) ,m_aSelectionListeners( *this ) { diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index dce3b908d320..12b48d129e33 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -123,8 +123,8 @@ namespace svt { namespace table m_pImpl->bHasColumnHeaders = true; m_pImpl->bHasRowHeaders = false; m_pImpl->bEnabled = true; - m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) ); - m_pImpl->pInputHandler.reset( new DefaultInputHandler ); + m_pImpl->pRenderer = std::make_shared<GridTableRenderer>( *this ); + m_pImpl->pInputHandler = std::make_shared<DefaultInputHandler>(); } @@ -217,7 +217,7 @@ namespace svt { namespace table ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), "UnoControlTableModel::insertColumn: illegal position!" ); - const PColumnModel pColumn( new UnoGridColumnFacade( *this, i_column ) ); + const PColumnModel pColumn = std::make_shared<UnoGridColumnFacade>( *this, i_column ); m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, pColumn ); // notify listeners |