diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-12 18:39:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-15 08:37:54 +0200 |
commit | b52f309f2b9037ee53ab8ac2d66967c012ba82f1 (patch) | |
tree | 4a4ace081c742af0cef50909e06394d9aef80345 /chart2 | |
parent | 897493fbd34a1bd10320767b48cbf04d422f89b3 (diff) |
improve loplugin simplifyconstruct
to find stuff like
OUString s = OUString("xxx")
Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
Reviewed-on: https://gerrit.libreoffice.org/70697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
5 files changed, 7 insertions, 9 deletions
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 63d88e18a007..a2f2dcb347ae 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -380,7 +380,7 @@ void ChartController::executeDispatch_InsertTrendline() // open dialog SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); aItemConverter.FillItemSet( aItemSet ); - ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( + ObjectPropertiesDialogParameter aDialogParameter( ObjectIdentifier::createDataCurveCID( ObjectIdentifier::getSeriesParticleFromCID( m_aSelection.getSelectedCID()), RegressionCurveHelper::getRegressionCurveIndex( xRegressionCurveContainer, xCurve ), false )); @@ -439,7 +439,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError ) SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); aItemSet.Put(SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE,bYError)); aItemConverter.FillItemSet( aItemSet ); - ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( + ObjectPropertiesDialogParameter aDialogParameter( ObjectIdentifier::createClassifiedIdentifierWithParent( objType, OUString(), m_aSelection.getSelectedCID())); aDialogParameter.init( getModel() ); diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 9a0242081da2..9ba3f1f712e4 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -753,7 +753,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( pItemConverter->FillItemSet(aItemSet); //prepare dialog - ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( rObjectCID ); + ObjectPropertiesDialogParameter aDialogParameter( rObjectCID ); aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() ); diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index f11c58787f0b..e20d23494f63 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -386,7 +386,7 @@ void SAL_CALL ChartTypeTemplate::applyStyle( try { StackMode eStackMode = getStackMode( nChartTypeIndex ); - const uno::Any aPropValue = uno::Any( + const uno::Any aPropValue( ( (eStackMode == StackMode::YStacked) || (eStackMode == StackMode::YStackedPercent) ) ? chart2::StackingDirection_Y_STACKING diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index adc04802925b..8a9717ac221c 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -131,8 +131,7 @@ bool LifeTimeManager::dispose() //--do the disposing of listeners after calling this method { - uno::Reference< lang::XComponent > xComponent = - uno::Reference< lang::XComponent >(m_pComponent); + uno::Reference< lang::XComponent > xComponent(m_pComponent); if(xComponent.is()) { // notify XCLoseListeners @@ -217,8 +216,7 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership) try { - uno::Reference< util::XCloseable > xCloseable = - uno::Reference< util::XCloseable >(m_pCloseable); + uno::Reference< util::XCloseable > xCloseable(m_pCloseable); if(xCloseable.is()) { //--call queryClosing on all registered close listeners diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx index b9d342cbe519..43088acc364a 100644 --- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx +++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx @@ -113,7 +113,7 @@ OUString MeanValueRegressionCurveCalculator::ImplGetRepresentation( const uno::Reference< util::XNumberFormatter >& xNumFormatter, sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength /* = nullptr */ ) const { - OUString aBuf = OUString(mYName + " = "); + OUString aBuf(mYName + " = "); if ( pFormulaLength ) { *pFormulaLength -= aBuf.getLength(); |