summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 09:47:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-24 08:37:51 +0200
commitf31c9f16fefd16ea434cdd68721d45bced9b78e1 (patch)
treec0c504cb4e4d41e168f7118c1baee6b4091aa51d /xmloff
parent645db9a2643832e29dbdf904e1cf7b323d273f86 (diff)
clang-tidy performance-unnecessary-copy-init in test..xmlscript
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLSeriesHelper.cxx3
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx6
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/table/XMLTableImport.cxx4
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx2
-rw-r--r--xmloff/source/text/txtparai.cxx2
7 files changed, 9 insertions, 12 deletions
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index c4764a856f89..1a27fff4a1b9 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -77,9 +77,8 @@ using ::com::sun::star::uno::Sequence;
sal_Int32 nIndex=0;
::std::vector< Reference< chart2::XDataSeries > > aSeriesVector( SchXMLSeriesHelper::getDataSeriesFromDiagram( xDiagram ));
- for( const auto& rSeries : aSeriesVector )
+ for( const Reference< chart2::XDataSeries >& xSeries : aSeriesVector )
{
- Reference< chart2::XDataSeries > xSeries( rSeries );
if( xSeries.is() )
{
if( aRet.end() == aRet.find(xSeries) )
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index ca5f677dbdd6..c3df15c10ac8 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -129,7 +129,7 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny,
break;
default:
{
- uno::Type aType = aAny.getValueType();
+ const uno::Type& aType = aAny.getValueType();
if (aType.equals(cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get() ) )
{
uno::Sequence< beans::PropertyValue> aProps;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 0eb2051d9edb..8163386e13b1 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2303,7 +2303,7 @@ void SdXMLExport::ExportMasterStyles_()
ImpXMLEXPPageMasterInfo* pInfo = mpHandoutPageMaster;
if(pInfo)
{
- OUString sString = pInfo->GetName();
+ const OUString& sString = pInfo->GetName();
AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, sString );
}
@@ -2348,7 +2348,7 @@ void SdXMLExport::ExportMasterStyles_()
ImpXMLEXPPageMasterInfo* pInfo = mvPageMasterUsageList.at( nMPageId );
if(pInfo)
{
- OUString sString = pInfo->GetName();
+ const OUString& sString = pInfo->GetName();
AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, sString );
}
@@ -2383,7 +2383,7 @@ void SdXMLExport::ExportMasterStyles_()
ImpXMLEXPPageMasterInfo* pMasterInfo = mvNotesPageMasterUsageList.at( nMPageId );
if(pMasterInfo)
{
- OUString sString = pMasterInfo->GetName();
+ const OUString& sString = pMasterInfo->GetName();
AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, sString);
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index b78d6c3b2f89..da1e94b26d49 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2255,7 +2255,7 @@ void XMLShapeExport::ImpExportPolygonShape(
if(!aPolyPolygon.areControlPointsUsed() && 1 == aPolyPolygon.count())
{
// simple polygon shape, can be written as svg:points sequence
- const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0));
+ const basegfx::B2DPolygon& aPolygon(aPolyPolygon.getB2DPolygon(0));
const OUString aPointString(basegfx::utils::exportToSvgPoints(aPolygon));
// write point array
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 9b2c646c3a09..5cc315c73efd 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -596,10 +596,8 @@ void XMLTableImportContext::EndElement()
{
if( !maMergeInfos.empty() )
{
- for( const auto& rMergeInfo : maMergeInfos )
+ for( const std::shared_ptr< MergeInfo >& xInfo : maMergeInfos )
{
- std::shared_ptr< MergeInfo > xInfo( rMergeInfo );
-
if( xInfo.get() ) try
{
Reference< XCellRange > xRange( mxTable->getCellRangeByPosition( xInfo->mnStartColumn, xInfo->mnStartRow, xInfo->mnEndColumn, xInfo->mnEndRow ) );
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 595ffb546985..aeb74de1d951 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -189,7 +189,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
if ( bIsContinueNumberingAttributePresent && !mbRestartNumbering &&
msContinueListId.isEmpty() )
{
- OUString Last( rTextListsHelper.GetLastProcessedListId() );
+ const OUString& Last( rTextListsHelper.GetLastProcessedListId() );
if ( rTextListsHelper.GetListStyleOfLastProcessedList() == msListStyleName
&& Last != msListId )
{
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 48d28cd1df7c..4b1ed3061456 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2127,7 +2127,7 @@ void XMLParaContext::EndElement()
const XMLDrawHint_Impl *pDHint =
static_cast<const XMLDrawHint_Impl*>(pHint);
// Improvement: hint directly provides the shape. (#i33242#)
- Reference < XShape > xShape = pDHint->GetShape();
+ const Reference < XShape >& xShape = pDHint->GetShape();
if ( xShape.is() )
{
// determine anchor type