diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-23 16:36:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-24 07:18:35 +0100 |
commit | b1d48a0e22bb8d2eabead41a6a6b53ffaec932e4 (patch) | |
tree | 0be36b589a3595a16a7d4d2a9ee78012dd700c4c /chart2 | |
parent | 8d23f9c2c1e0479a95cb44a09066740213b0f99a (diff) |
loplugin:makeshared in chart2..comphelper
Change-Id: Ia25f5de3167fd554d463ce6111e8c5b0e7842907
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
8 files changed, 13 insertions, 13 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index 4d5e1d89ae7f..9ce465b70613 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -297,8 +297,8 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments MutexGuard aGuard( m_aMutex); Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY ); if( xChartDoc.is()) - m_spObjectHierarchy.reset( - new ObjectHierarchy( xChartDoc, comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(m_xChartView) )); + m_spObjectHierarchy = + std::make_shared<ObjectHierarchy>( xChartDoc, comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(m_xChartView) ); else m_spObjectHierarchy.reset(); } diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 74b0bf7bb65c..593ac535338d 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -639,7 +639,7 @@ Any WrappedHasSubTitleProperty::getPropertyDefault( const Reference< beans::XPro ChartDocumentWrapper::ChartDocumentWrapper( const Reference< uno::XComponentContext > & xContext ) : - m_spChart2ModelContact( new Chart2ModelContact( xContext ) ), + m_spChart2ModelContact( std::make_shared<Chart2ModelContact>( xContext ) ), m_bUpdateAddIn( true ), m_bIsDisposed( false ) { diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 7d293852857f..cbfb03b50031 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -851,9 +851,9 @@ void DataBrowser::SetDataFromModel( m_xChartDoc.set( xChartDoc ); m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc, xContext )); - m_spNumberFormatterWrapper.reset( - new NumberFormatterWrapper( - Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY ))); + m_spNumberFormatterWrapper = + std::make_shared<NumberFormatterWrapper>( + Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY )); m_aNumberEditField->SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() ); diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index cdd1a187d766..6dc9201bc61f 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -395,8 +395,8 @@ std::shared_ptr< RangeSelectionHelper > const & DialogModel::getRangeSelectionHelper() const { if( ! m_spRangeSelectionHelper.get()) - m_spRangeSelectionHelper.reset( - new RangeSelectionHelper( m_xChartDocument )); + m_spRangeSelectionHelper = + std::make_shared<RangeSelectionHelper>( m_xChartDocument ); return m_spRangeSelectionHelper; } diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx index 580b81e11190..ec37591200c0 100644 --- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx @@ -84,7 +84,7 @@ ErrorBarItemConverter::ErrorBarItemConverter( SdrModel& rDrawModel, const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory ) : ItemConverter( rPropertySet, rItemPool ), - m_spGraphicConverter( new GraphicPropertyItemConverter( + m_spGraphicConverter( std::make_shared<GraphicPropertyItemConverter>( rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, GraphicObjectType::LineProperties )), diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx index f2ee1d4cbfce..482c48e8efbe 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx @@ -90,7 +90,7 @@ RegressionCurveItemConverter::RegressionCurveItemConverter( SdrModel& rDrawModel, const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory ) : ItemConverter( rPropertySet, rItemPool ), - m_spGraphicConverter( new GraphicPropertyItemConverter( + m_spGraphicConverter( std::make_shared<GraphicPropertyItemConverter>( rPropertySet, rItemPool, rDrawModel, xNamedPropertyContainerFactory, GraphicObjectType::LineProperties )), diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx index b173332c9ed4..91687aebd28f 100644 --- a/chart2/source/controller/main/UndoGuard.cxx +++ b/chart2/source/controller/main/UndoGuard.cxx @@ -41,7 +41,7 @@ UndoGuard::UndoGuard( const OUString& i_undoString, const uno::Reference< docume ,m_aUndoString( i_undoString ) ,m_bActionPosted( false ) { - m_pDocumentSnapshot.reset( new ChartModelClone( m_xChartModel, i_facet ) ); + m_pDocumentSnapshot = std::make_shared<ChartModelClone>( m_xChartModel, i_facet ); } UndoGuard::~UndoGuard() diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 530ea060f390..c25492e91ef1 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2167,7 +2167,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType return apVTitle; //create title - apVTitle.reset(new VTitle(xTitle)); + apVTitle = std::make_shared<VTitle>(xTitle); OUString aCID = ObjectIdentifier::createClassifiedIdentifierForObject(xTitle, rModel); apVTitle->init(xPageShapes, xShapeFactory, aCID); apVTitle->createShapes(awt::Point(0,0), rPageSize); @@ -2969,7 +2969,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize ) if (aParam.maRemainingSpace.Width <= 0|| aParam.maRemainingSpace.Height <= 0) return; - aParam.mpSeriesPlotterContainer.reset(new SeriesPlotterContainer(m_aVCooSysList)); + aParam.mpSeriesPlotterContainer = std::make_shared<SeriesPlotterContainer>(m_aVCooSysList); aParam.mpSeriesPlotterContainer->initializeCooSysAndSeriesPlotter( mrChartModel ); if(maTimeBased.bTimeBased && maTimeBased.nFrame != 0) { |