diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-05-12 14:03:53 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-12 14:38:16 +0200 |
commit | 2f353af253ff437ad0cb34a2000c30da0f4ecf79 (patch) | |
tree | 2824c9caa9b2ad93f1ab721870ea59545997850d /reportdesign | |
parent | 3e61eb69ac1cff727072011e228eabfc8bc055c0 (diff) |
reportdesign: replace rest of boost::ref usage with C++11 lambdas
Change-Id: Ib530bbecbbb19fa09b24d3837d8f8f023d4ed359
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/inc/pch/precompiled_rpt.hxx | 1 | ||||
-rw-r--r-- | reportdesign/inc/pch/precompiled_rptui.hxx | 1 | ||||
-rw-r--r-- | reportdesign/inc/pch/precompiled_rptxml.hxx | 1 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 20 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 15 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 4 |
6 files changed, 13 insertions, 29 deletions
diff --git a/reportdesign/inc/pch/precompiled_rpt.hxx b/reportdesign/inc/pch/precompiled_rpt.hxx index 37c0ec2b7530..e5cb5aa9141a 100644 --- a/reportdesign/inc/pch/precompiled_rpt.hxx +++ b/reportdesign/inc/pch/precompiled_rpt.hxx @@ -53,7 +53,6 @@ #include <unordered_map> #include <utility> #include <vector> -#include <boost/bind.hpp> #include <boost/intrusive_ptr.hpp> #include <boost/optional.hpp> #include <osl/conditn.hxx> diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx index 2769eb1ab968..7b366c818f33 100644 --- a/reportdesign/inc/pch/precompiled_rptui.hxx +++ b/reportdesign/inc/pch/precompiled_rptui.hxx @@ -57,7 +57,6 @@ #include <unordered_set> #include <utility> #include <vector> -#include <boost/bind.hpp> #include <boost/intrusive_ptr.hpp> #include <osl/conditn.h> #include <osl/conditn.hxx> diff --git a/reportdesign/inc/pch/precompiled_rptxml.hxx b/reportdesign/inc/pch/precompiled_rptxml.hxx index 19d2998270e5..ccd7c3765df3 100644 --- a/reportdesign/inc/pch/precompiled_rptxml.hxx +++ b/reportdesign/inc/pch/precompiled_rptxml.hxx @@ -26,7 +26,6 @@ #include <string.h> #include <unordered_set> #include <vector> -#include <boost/bind.hpp> #include <osl/diagnose.h> #include <osl/mutex.hxx> #include <rtl/math.hxx> diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 186428b0c5be..9ed84a2c871d 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -79,7 +79,6 @@ #include <connectivity/dbconversion.hxx> #include <connectivity/dbtools.hxx> -#include <boost/bind.hpp> #include "metadata.hxx" #include <svl/itempool.hxx> #include <svl/itemset.hxx> @@ -120,15 +119,6 @@ namespace rptui using namespace ::com::sun::star; namespace{ -// comparing two property instances -struct PropertyCompare : public ::std::binary_function< beans::Property, OUString , bool > -{ - bool operator() (const beans::Property& x, const OUString& y) const - { - return x.Name.equals(y); - } -}; - OUString lcl_getQuotedFunctionName(const OUString& _sFunction) { @@ -932,7 +922,10 @@ beans::Property GeometryHandler::getProperty(const OUString & PropertyName) uno::Sequence< beans::Property > aProps = getSupportedProperties(); const beans::Property* pIter = aProps.getConstArray(); const beans::Property* pEnd = pIter + aProps.getLength(); - const beans::Property* pFind = ::std::find_if(pIter,pEnd,::std::bind2nd(PropertyCompare(),boost::cref(PropertyName))); + const beans::Property* pFind = ::std::find_if(pIter, pEnd, + [&PropertyName] (const beans::Property& x) -> bool { + return x.Name.equals(PropertyName); + }); if ( pFind == pEnd ) return beans::Property(); return *pFind; @@ -1321,7 +1314,10 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie { const beans::Property* pIter = aSeq.getConstArray(); const beans::Property* pEnd = pIter + aSeq.getLength(); - const beans::Property* pFind = ::std::find_if(pIter,pEnd,::std::bind2nd(PropertyCompare(),boost::cref(rIncludeProp))); + const beans::Property* pFind = ::std::find_if(pIter, pEnd, + [&rIncludeProp] (const beans::Property& x) -> bool { + return x.Name.equals(rIncludeProp); + }); if ( pFind != pEnd ) { // special case for controls which contain a data field diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index afbc800e5bda..ef8531868df1 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -140,7 +140,6 @@ #include "PageNumber.hxx" #include "UndoEnv.hxx" -#include <boost/bind.hpp> #include <memory> #include <cppuhelper/exc_hlp.hxx> @@ -183,15 +182,6 @@ using namespace ::cppu; namespace { - // comparing two PropertyValue instances - struct PropertyValueCompare : public ::std::binary_function< beans::PropertyValue, OUString , bool > - { - bool operator() (const beans::PropertyValue& x, const OUString& y) const - { - return x.Name.equals(y); - } - }; - void lcl_setFontWPU_nothrow(const uno::Reference< report::XReportControlFormat>& _xReportControlFormat,const sal_Int32 _nId) { if ( _xReportControlFormat.is() ) @@ -3984,7 +3974,10 @@ void OReportController::createDefaultControl(const uno::Sequence< beans::Propert const OUString sKeyModifier("KeyModifier"); const beans::PropertyValue* pIter = _aArgs.getConstArray(); const beans::PropertyValue* pEnd = pIter + _aArgs.getLength(); - const beans::PropertyValue* pKeyModifier = ::std::find_if(pIter,pEnd,::std::bind2nd(PropertyValueCompare(),boost::cref(sKeyModifier))); + const beans::PropertyValue* pKeyModifier = ::std::find_if(pIter, pEnd, + [&sKeyModifier] (const beans::PropertyValue& x) -> bool { + return x.Name.equals(sKeyModifier); + }); sal_Int16 nKeyModifier = 0; if ( pKeyModifier == pEnd || ((pKeyModifier->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1) ) { diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index b0ebb41885d0..3db7fc4a1b0d 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -41,8 +41,6 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -#include <boost/bind.hpp> - #include "helpids.hrc" #include <svx/svdundo.hxx> #include <toolkit/helper/convert.hxx> @@ -394,7 +392,7 @@ void OViewsWindow::Copy() uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects; ::std::for_each(m_aSections.begin(),m_aSections.end(), [&aAllreadyCopiedObjects] (const TSectionsMap::value_type& sectionPtr) { - sectionPtr->getReportSection().Copy(boost::ref(aAllreadyCopiedObjects)); + sectionPtr->getReportSection().Copy(aAllreadyCopiedObjects); }); OReportExchange* pCopy = new OReportExchange(aAllreadyCopiedObjects); |