diff options
author | Jorenz Paragas <j.paragas.237@gmail.com> | 2015-08-01 12:36:33 -0700 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-03 07:02:57 +0000 |
commit | 37ec6cbeebc5dc9bf642eedcf45f0441edd3d610 (patch) | |
tree | 9ab7fc6c7c7f6a6ece96fa54cd6d66f6bc7b2e79 /reportdesign | |
parent | 4a2e0fa708bb00d35febe9e8939dcc0c2197e2f4 (diff) |
tdf#91112: pass by const reference to lambdas
Since the function returned by o3tl::compose1 had its parameter
passed by const reference, the same should be done for the lambda
expressions that replace o3tl::compose1. I overlooked this detail
in my previous commits.
Change-Id: I0db5eec4e74d4835e786742ee6de3805215f377f
Reviewed-on: https://gerrit.libreoffice.org/17465
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/sdr/PropertyForward.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx index 3ef0438f0ed4..8295c672c87d 100644 --- a/reportdesign/source/core/sdr/PropertyForward.cxx +++ b/reportdesign/source/core/sdr/PropertyForward.cxx @@ -119,7 +119,7 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt aFind = ::std::find_if( m_aNameMap.begin(), m_aNameMap.end(), - [&evt] (TPropertyNamePair::value_type namePair) { + [&evt] (const TPropertyNamePair::value_type& namePair) { return namePair.second.first == evt.PropertyName; }); if ( aFind != m_aNameMap.end() ) diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 19d922554d1d..b338c6738f17 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -806,7 +806,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const { // add function names ::std::for_each(m_aFunctionNames.begin(), m_aFunctionNames.end(), - [&xListControl] (TFunctions::value_type func) { + [&xListControl] (const TFunctions::value_type& func) { xListControl->appendListEntry(func.first); }); } diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index e236b159f106..9740f60e131e 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -326,11 +326,11 @@ void OViewsWindow::removeSection(sal_uInt16 _nPosition) void OViewsWindow::toggleGrid(bool _bVisible) { ::std::for_each(m_aSections.begin(),m_aSections.end(), - [_bVisible] (TSectionsMap::value_type sectionPtr) { + [_bVisible] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().SetGridVisible(_bVisible); }); ::std::for_each(m_aSections.begin(),m_aSections.end(), - [] (TSectionsMap::value_type sectionPtr) { + [] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().Window::Invalidate(InvalidateFlags::NoErase); }); } @@ -367,7 +367,7 @@ void OViewsWindow::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType ) void OViewsWindow::SetMode( DlgEdMode eNewMode ) { ::std::for_each(m_aSections.begin(),m_aSections.end(), - [&eNewMode] (TSectionsMap::value_type sectionPtr) { + [&eNewMode] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().SetMode(eNewMode); }); } @@ -385,7 +385,7 @@ void OViewsWindow::Delete() { m_bInUnmark = true; ::std::for_each(m_aSections.begin(),m_aSections.end(), - [] (TSectionsMap::value_type sectionPtr) { + [] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().Delete(); }); m_bInUnmark = false; @@ -395,7 +395,7 @@ void OViewsWindow::Copy() { uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects; ::std::for_each(m_aSections.begin(),m_aSections.end(), - [&aAllreadyCopiedObjects] (TSectionsMap::value_type sectionPtr) { + [&aAllreadyCopiedObjects] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().Copy(boost::ref(aAllreadyCopiedObjects)); }); @@ -410,7 +410,7 @@ void OViewsWindow::Paste() OReportExchange::TSectionElements aCopies = OReportExchange::extractCopies(aTransferData); if ( aCopies.getLength() > 1 ) ::std::for_each(m_aSections.begin(),m_aSections.end(), - [&aCopies] (TSectionsMap::value_type sectionPtr) { + [&aCopies] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().Paste(aCopies, false); }); else @@ -514,7 +514,7 @@ void OViewsWindow::SelectAll(const sal_uInt16 _nObjectType) { m_bInUnmark = true; ::std::for_each(m_aSections.begin(),m_aSections.end(), - [&_nObjectType] (TSectionsMap::value_type sectionPtr) { + [&_nObjectType] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().SelectAll(_nObjectType); }); m_bInUnmark = false; @@ -559,11 +559,11 @@ void OViewsWindow::MouseButtonDown( const MouseEvent& rMEvt ) void OViewsWindow::showRuler(bool _bShow) { ::std::for_each(m_aSections.begin(),m_aSections.end(), - [_bShow] (TSectionsMap::value_type sectionPtr) { + [_bShow] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getStartMarker().showRuler(_bShow); }); ::std::for_each(m_aSections.begin(),m_aSections.end(), - [] (TSectionsMap::value_type sectionPtr) { + [] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getStartMarker().Window::Invalidate(InvalidateFlags::NoErase); }); } @@ -1689,7 +1689,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) void OViewsWindow::stopScrollTimer() { ::std::for_each(m_aSections.begin(),m_aSections.end(), - [] (TSectionsMap::value_type sectionPtr) { + [] (const TSectionsMap::value_type& sectionPtr) { sectionPtr->getReportSection().stopScrollTimer(); }); } |