Kaydet (Commit) 3ea3c081 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Replace deprecated std::bin2nd with lambda in dbaccess

(as std::bind2nd is gone by default at least from recent libc++ in C++17 mode)

Change-Id: Ib54bc40889aa45b5b9d4d3ab54baafbd260d3b25
Reviewed-on: https://gerrit.libreoffice.org/45861Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst c7d3440f
...@@ -1431,7 +1431,7 @@ sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName) ...@@ -1431,7 +1431,7 @@ sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName)
{ {
std::vector< OUString>::const_iterator aIter = std::find_if( m_aChildNames.begin(), std::vector< OUString>::const_iterator aIter = std::find_if( m_aChildNames.begin(),
m_aChildNames.end(), m_aChildNames.end(),
std::bind2nd(std::equal_to< OUString>(),rName)); [&rName](OUString const & s) { return s == rName; });
if(aIter != m_aChildNames.end()) if(aIter != m_aChildNames.end())
return aIter - m_aChildNames.begin(); return aIter - m_aChildNames.begin();
...@@ -1634,7 +1634,7 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const css::beans::PropertyChangeEv ...@@ -1634,7 +1634,7 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const css::beans::PropertyChangeEv
{ {
std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(), std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(),
m_aChildren.end(), m_aChildren.end(),
std::bind2nd(std::equal_to< css::uno::Reference< css::uno::XInterface > >(),evt.Source)); [&evt](css::uno::Reference< css::uno::XInterface > const & x) { return x == evt.Source; });
if(aIter != m_aChildren.end()) if(aIter != m_aChildren.end())
{ {
...@@ -1654,7 +1654,7 @@ void SAL_CALL SbaXFormAdapter::disposing(const css::lang::EventObject& Source) ...@@ -1654,7 +1654,7 @@ void SAL_CALL SbaXFormAdapter::disposing(const css::lang::EventObject& Source)
std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(), std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(),
m_aChildren.end(), m_aChildren.end(),
std::bind2nd(std::equal_to< css::uno::Reference< css::uno::XInterface > >(),Source.Source)); [&Source](css::uno::Reference< css::uno::XInterface > const & x) { return x == Source.Source; });
if(aIter != m_aChildren.end()) if(aIter != m_aChildren.end())
removeByIndex(aIter - m_aChildren.begin()); removeByIndex(aIter - m_aChildren.begin());
} }
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <stringconstants.hxx> #include <stringconstants.hxx>
#include <com/sun/star/sdbc/XRowUpdate.hpp> #include <com/sun/star/sdbc/XRowUpdate.hpp>
#include <functional>
using namespace dbaui; using namespace dbaui;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -102,7 +101,7 @@ bool ORowSetImportExport::Read() ...@@ -102,7 +101,7 @@ bool ORowSetImportExport::Read()
{ {
// check if there is any column to copy // check if there is any column to copy
if(std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(), if(std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(),
std::bind2nd(std::greater<sal_Int32>(),0)) == m_aColumnMapping.end()) [](sal_Int32 n) { return n > 0; }) == m_aColumnMapping.end())
return false; return false;
bool bContinue = true; bool bContinue = true;
if(m_aSelection.getLength()) if(m_aSelection.getLength())
......
...@@ -959,14 +959,14 @@ std::vector<VclPtr<OTableConnection> >::const_iterator OJoinTableView::getTableC ...@@ -959,14 +959,14 @@ std::vector<VclPtr<OTableConnection> >::const_iterator OJoinTableView::getTableC
{ {
return std::find_if( m_vTableConnection.begin(), return std::find_if( m_vTableConnection.begin(),
m_vTableConnection.end(), m_vTableConnection.end(),
std::bind2nd(std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); [_pFromWin](OTableConnection * p) { return p->isTableConnection(_pFromWin); });
} }
sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) const sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) const
{ {
return std::count_if( m_vTableConnection.begin(), return std::count_if( m_vTableConnection.begin(),
m_vTableConnection.end(), m_vTableConnection.end(),
std::bind2nd(std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); [_pFromWin](OTableConnection * p) { return p->isTableConnection(_pFromWin); });
} }
bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment