From b52f309f2b9037ee53ab8ac2d66967c012ba82f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 12 Apr 2019 18:39:22 +0200 Subject: 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 --- svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 2 +- svx/source/form/fmpgeimp.cxx | 2 +- svx/source/items/algitem.cxx | 2 +- svx/source/items/pageitem.cxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'svx') diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 363287dabcf9..b3800b6dfef5 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -864,7 +864,7 @@ public: rNodeStack.pop(); // create combined ExpressionNode - std::shared_ptr pNode = std::shared_ptr( new BinaryFunctionExpression( meFunct, pFirstArg, pSecondArg ) ); + std::shared_ptr pNode( new BinaryFunctionExpression( meFunct, pFirstArg, pSecondArg ) ); // check for constness if( pFirstArg->isConstant() && pSecondArg->isConstant() ) // call the operator() at pNode, store result in constant value ExpressionNode. rNodeStack.push( std::shared_ptr( new ConstantValueExpression( (*pNode)() ) ) ); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index c49e81b8973f..8ca89e14aab7 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -161,7 +161,7 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl ) MapControlModels aModelAssignment; typedef TreeVisitor< FormComponentPair, FormHierarchyComparator, FormComponentAssignment > FormComponentVisitor; - FormComponentVisitor aVisitor = FormComponentVisitor( FormHierarchyComparator() ); + FormComponentVisitor aVisitor{ FormHierarchyComparator() }; FormComponentAssignment aAssignmentProcessor( aModelAssignment ); aVisitor.process( FormComponentPair( xForeignForms, m_xForms ), aAssignmentProcessor ); diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index cffccb570087..4d9a7baecebd 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -199,7 +199,7 @@ bool SvxMarginItem::GetPresentation OUString& rText, const IntlWrapper& rIntl ) const { - OUString cpDelimTmp = OUString(cpDelim); + OUString cpDelimTmp(cpDelim); switch ( ePres ) { diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index bbf80d45d5c0..d7b1b619b57f 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -104,7 +104,7 @@ bool SvxPageItem::GetPresentation ) const { rText.clear(); - OUString cpDelimTmp = OUString(cpDelim); + OUString cpDelimTmp(cpDelim); switch ( ePres ) { -- cgit