diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-06 08:50:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-06 09:54:25 +0200 |
commit | 24eae7bd702f3f6dd790be7ac38ac16e9fe6a375 (patch) | |
tree | 56398264184709e84517c2e843aa3a0894cc1c51 /reportdesign/source | |
parent | fad919eb0d30b2303193e1c00ba765514957652c (diff) |
clang-tidy performance-unnecessary-value-param
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8
Reviewed-on: https://gerrit.libreoffice.org/60068
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/sdr/UndoActions.cxx | 65 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/SectionWindow.hxx | 12 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/RptUndo.cxx | 32 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 10 |
4 files changed, 64 insertions, 55 deletions
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index 861e17740a44..c144edcf2100 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -38,6 +38,7 @@ #include <comphelper/types.hxx> #include <connectivity/dbtools.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/svapp.hxx> #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> @@ -240,15 +241,14 @@ void OUndoContainerAction::Redo() } } -OUndoGroupSectionAction::OUndoGroupSectionAction(SdrModel& _rMod - ,Action _eAction - ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction - ,const uno::Reference< report::XGroup >& _xGroup - ,const Reference< XInterface > & xElem - ,const char* pCommentId) -:OUndoContainerAction(_rMod,_eAction,nullptr,xElem,pCommentId) -,m_aGroupHelper(_xGroup) -,m_pMemberFunction(_pMemberFunction) +OUndoGroupSectionAction::OUndoGroupSectionAction( + SdrModel& _rMod, Action _eAction, + ::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction, + const uno::Reference<report::XGroup>& _xGroup, const Reference<XInterface>& xElem, + const char* pCommentId) + : OUndoContainerAction(_rMod, _eAction, nullptr, xElem, pCommentId) + , m_aGroupHelper(_xGroup) + , m_pMemberFunction(std::move(_pMemberFunction)) { } @@ -285,15 +285,14 @@ void OUndoGroupSectionAction::implReRemove( ) m_xOwnElement = m_xElement; } -OUndoReportSectionAction::OUndoReportSectionAction(SdrModel& _rMod - ,Action _eAction - ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction - ,const uno::Reference< report::XReportDefinition >& _xReport - ,const Reference< XInterface > & xElem - ,const char* pCommentId) -:OUndoContainerAction(_rMod,_eAction,nullptr,xElem,pCommentId) -,m_aReportHelper(_xReport) -,m_pMemberFunction(_pMemberFunction) +OUndoReportSectionAction::OUndoReportSectionAction( + SdrModel& _rMod, Action _eAction, + ::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction, + const uno::Reference<report::XReportDefinition>& _xReport, const Reference<XInterface>& xElem, + const char* pCommentId) + : OUndoContainerAction(_rMod, _eAction, nullptr, xElem, pCommentId) + , m_aReportHelper(_xReport) + , m_pMemberFunction(std::move(_pMemberFunction)) { } @@ -384,14 +383,13 @@ OUString ORptUndoPropertyAction::GetComment() const return aStr.replaceFirst("#", m_aPropertyName); } -OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction(SdrModel& _rMod - ,const PropertyChangeEvent& evt - ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction - ,const uno::Reference< report::XGroup >& _xGroup - ) -:ORptUndoPropertyAction(_rMod,evt) -,m_aGroupHelper(_xGroup) -,m_pMemberFunction(_pMemberFunction) +OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction( + SdrModel& _rMod, const PropertyChangeEvent& evt, + ::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction, + const uno::Reference<report::XGroup>& _xGroup) + : ORptUndoPropertyAction(_rMod, evt) + , m_aGroupHelper(_xGroup) + , m_pMemberFunction(std::move(_pMemberFunction)) { } @@ -400,14 +398,13 @@ Reference< XPropertySet> OUndoPropertyGroupSectionAction::getObject() return m_pMemberFunction(&m_aGroupHelper).get(); } -OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction(SdrModel& _rMod - ,const PropertyChangeEvent& evt - ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction - ,const uno::Reference< report::XReportDefinition >& _xReport - ) -:ORptUndoPropertyAction(_rMod,evt) -,m_aReportHelper(_xReport) -,m_pMemberFunction(_pMemberFunction) +OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction( + SdrModel& _rMod, const PropertyChangeEvent& evt, + ::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction, + const uno::Reference<report::XReportDefinition>& _xReport) + : ORptUndoPropertyAction(_rMod, evt) + , m_aReportHelper(_xReport) + , m_pMemberFunction(std::move(_pMemberFunction)) { } diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index a08bf82a27a5..14610862eace 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -66,7 +66,11 @@ namespace rptui * \param _pIsSectionOn * @return sal_True when title was set otherwise FALSE */ - bool setGroupSectionTitle(const css::uno::Reference< css::report::XGroup>& _xGroup,const char* pResId,::std::function<css::uno::Reference< css::report::XSection>(OGroupHelper *)> _pGetSection, const ::std::function<bool(OGroupHelper *)>& _pIsSectionOn); + bool setGroupSectionTitle( + const css::uno::Reference<css::report::XGroup>& _xGroup, const char* pResId, + const ::std::function<css::uno::Reference<css::report::XSection>(OGroupHelper*)>& + _pGetSection, + const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn); /** set the title of the (report/page) header or footer * @@ -76,7 +80,11 @@ namespace rptui * \param _pIsSectionOn * @return sal_True when title was set otherwise FALSE */ - bool setReportSectionTitle(const css::uno::Reference< css::report::XReportDefinition>& _xReport,const char* pResId,::std::function<css::uno::Reference< css::report::XSection>(OReportHelper *)> _pGetSection, const ::std::function<bool(OReportHelper *)>& _pIsSectionOn); + bool setReportSectionTitle( + const css::uno::Reference<css::report::XReportDefinition>& _xReport, const char* pResId, + const ::std::function<css::uno::Reference<css::report::XSection>(OReportHelper*)>& + _pGetSection, + const ::std::function<bool(OReportHelper*)>& _pIsSectionOn); void ImplInitSettings(); DECL_LINK(Collapsed, OColorListener&, void); diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index 10ee07c39fed..dc8b823d0f24 100644 --- a/reportdesign/source/ui/misc/RptUndo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/awt/Size.hpp> #include <comphelper/types.hxx> #include <svx/unoshape.hxx> +#include <utility> #include <vcl/settings.hxx> #include <functional> @@ -215,14 +216,13 @@ void OSectionUndo::Redo() } } - -OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot - ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction - ,const uno::Reference< report::XReportDefinition >& _xReport - ,Action _eAction) -: OSectionUndo(_rMod,_nSlot,_eAction,nullptr) -,m_aReportHelper(_xReport) -,m_pMemberFunction(_pMemberFunction) +OReportSectionUndo::OReportSectionUndo( + OReportModel& _rMod, sal_uInt16 _nSlot, + ::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction, + const uno::Reference<report::XReportDefinition>& _xReport, Action _eAction) + : OSectionUndo(_rMod, _nSlot, _eAction, nullptr) + , m_aReportHelper(_xReport) + , m_pMemberFunction(std::move(_pMemberFunction)) { if( m_eAction == Removed ) collectControls(m_pMemberFunction(&m_aReportHelper)); @@ -251,15 +251,13 @@ void OReportSectionUndo::implReRemove( ) m_bInserted = false; } - -OGroupSectionUndo::OGroupSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot - ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction - ,const uno::Reference< report::XGroup >& _xGroup - ,Action _eAction - ,const char* pCommentID) -: OSectionUndo(_rMod,_nSlot,_eAction,pCommentID) -,m_aGroupHelper(_xGroup) -,m_pMemberFunction(_pMemberFunction) +OGroupSectionUndo::OGroupSectionUndo( + OReportModel& _rMod, sal_uInt16 _nSlot, + ::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction, + const uno::Reference<report::XGroup>& _xGroup, Action _eAction, const char* pCommentID) + : OSectionUndo(_rMod, _nSlot, _eAction, pCommentID) + , m_aGroupHelper(_xGroup) + , m_pMemberFunction(std::move(_pMemberFunction)) { if( m_eAction == Removed ) { diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 015775bd9e40..ae30403c5f56 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -165,7 +165,10 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } } -bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,const char* pResId,::std::function<uno::Reference<report::XSection>(OReportHelper *)> _pGetSection, const ::std::function<bool(OReportHelper *)>& _pIsSectionOn) +bool OSectionWindow::setReportSectionTitle( + const uno::Reference<report::XReportDefinition>& _xReport, const char* pResId, + const ::std::function<uno::Reference<report::XSection>(OReportHelper*)>& _pGetSection, + const ::std::function<bool(OReportHelper*)>& _pIsSectionOn) { OReportHelper aReportHelper(_xReport); const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection->getSection(); @@ -178,7 +181,10 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport return bRet; } -bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,const char* pResId,::std::function<uno::Reference<report::XSection>(OGroupHelper *)> _pGetSection, const ::std::function<bool(OGroupHelper *)>& _pIsSectionOn) +bool OSectionWindow::setGroupSectionTitle( + const uno::Reference<report::XGroup>& _xGroup, const char* pResId, + const ::std::function<uno::Reference<report::XSection>(OGroupHelper*)>& _pGetSection, + const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn) { OGroupHelper aGroupHelper(_xGroup); const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection->getSection() ; |