diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 22:04:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-12 07:25:33 +0100 |
commit | 554861a3e25c047f3b44e8154f80456985c83402 (patch) | |
tree | ae9f0d5f410a287c1e38b04b4f76fc3bb0b06415 /reportdesign/source | |
parent | 16f6149a09945465c97525f521f11922b6a95138 (diff) |
clang-tidy: performance-unnecessary-copy-initialization in reportdesgn
Change-Id: I00a0db4a3cd23ae757aa894f886f5b5a1a0359f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176435
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/sdr/UndoEnv.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportControllerObserver.cxx | 6 |
3 files changed, 5 insertions, 10 deletions
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index a2cdddafbdae..649703a34f80 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -480,8 +480,7 @@ void OXUndoEnvironment::AddSection(const Reference< report::XSection > & _xSecti { uno::Reference<container::XChild> xChild = _xSection; m_pImpl->m_aSections.push_back(xChild); - Reference< XInterface > xInt(_xSection); - AddElement(xInt); + AddElement(_xSection); } catch(const uno::Exception&) { @@ -497,8 +496,7 @@ void OXUndoEnvironment::RemoveSection(const Reference< report::XSection > & _xSe { uno::Reference<container::XChild> xChild(_xSection); std::erase(m_pImpl->m_aSections, xChild); - Reference< XInterface > xInt(_xSection); - RemoveElement(xInt); + RemoveElement(_xSection); } catch(uno::Exception&){} } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index bc572efa2224..83e354df6ead 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -228,8 +228,7 @@ static void lcl_getReportControlFormat(const Sequence< PropertyValue >& aArgs, } else { - uno::Reference<uno::XInterface> xInterface(xReportControlFormat); - _rControlsFormats.push_back(xInterface); + _rControlsFormats.push_back(xReportControlFormat); } if ( !_xWindow.is() ) diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index d693c1787116..892f79872b1e 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -150,8 +150,7 @@ void OXReportControllerObserver::AddSection(const uno::Reference< report::XSecti { uno::Reference<container::XChild> xChild = _xSection; m_aSections.push_back(xChild); - uno::Reference< uno::XInterface > xInt(_xSection); - AddElement(xInt); + AddElement(_xSection); } catch(const uno::Exception&) { @@ -167,8 +166,7 @@ void OXReportControllerObserver::RemoveSection(const uno::Reference< report::XSe { uno::Reference<container::XChild> xChild(_xSection); std::erase(m_aSections, xChild); - uno::Reference< uno::XInterface > xInt(_xSection); - RemoveElement(xInt); + RemoveElement(_xSection); } catch(uno::Exception&) { |