From edc85fb55f8adc30a1416c6c854c89097060fb21 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Oct 2018 07:54:15 +0200 Subject: clang-tidy performance-unnecessary-copy-init in idl..reportdesign Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin --- reportdesign/source/core/sdr/ReportDrawPage.cxx | 2 +- reportdesign/source/core/sdr/RptObject.cxx | 2 +- reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2 +- reportdesign/source/ui/report/ViewsWindow.cxx | 2 +- reportdesign/source/ui/report/dlgedfunc.cxx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index 87984ce3b445..15910df12a12 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -75,7 +75,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj if ( xFactory.is() ) { bool bChangeOrientation = false; - OUString sServiceName = pBaseObj->getServiceName(); + const OUString& sServiceName = pBaseObj->getServiceName(); OSL_ENSURE(!sServiceName.isEmpty(),"No Service Name given!"); if (dynamic_cast< const OUnoObject* >(pObj) != nullptr) diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index ea94d02740b5..eb0f45742e77 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -404,7 +404,7 @@ void OObjectBase::SetPropsFromRect(const tools::Rectangle& _rRect) OReportPage* pPage = dynamic_cast(GetImplPage()); if ( pPage && !_rRect.IsEmpty() ) { - uno::Reference xSection = pPage->getSection(); + const uno::Reference& xSection = pPage->getSection(); assert(_rRect.getHeight() >= 0); const sal_uInt32 newHeight( ::std::max(0l, _rRect.getHeight()+_rRect.Top()) ); if ( xSection.is() && ( newHeight > xSection->getHeight() ) ) diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 7cf51a8e53b5..7021ed43f1ae 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -86,7 +86,7 @@ namespace rptui bool bSet = true; if ( aFormula.getType() == ReportFormula::Field ) { - const OUString sColumnName = aFormula.getFieldName(); + const OUString& sColumnName = aFormula.getFieldName(); OUString sLabel = m_rReportController.getColumnLabel_throw(sColumnName); if ( !sLabel.isEmpty() ) { diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index d5b6261b9bf5..3a1deb5958d9 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -716,7 +716,7 @@ void OViewsWindow::collectBoundResizeRect(const TRectangleMap& _rSortRectangles, { bOnlyOnce = true; OReportSection* pReportSection = aRectIter->second.second->getReportSection(); - const uno::Reference< report::XSection> xSection = pReportSection->getSection(); + const uno::Reference< report::XSection>& xSection = pReportSection->getSection(); try { uno::Reference xReportDefinition = xSection->getReportDefinition(); diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 161f28e0b0f0..58a71a4bddcd 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -446,7 +446,7 @@ void DlgEdFunc::colorizeOverlappedObject(SdrObject* _pOverlappedObj) OObjectBase* pObj = dynamic_cast(_pOverlappedObj); if ( pObj ) { - uno::Reference xComponent = pObj->getReportComponent(); + const uno::Reference& xComponent = pObj->getReportComponent(); if (xComponent.is() && xComponent != m_xOverlappingObj) { OReportModel& rRptModel(static_cast< OReportModel& >(_pOverlappedObj->getSdrModelFromSdrObject())); -- cgit v1.2.3