summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx8
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx8
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx5
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx4
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx14
5 files changed, 25 insertions, 14 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 5d3e6e121dac..0558b34dcf13 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -910,12 +910,16 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( )
if ( sColumnName.isEmpty() )
xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName;
- aFindName = std::find_if(aNames.begin(),aNames.end(),std::bind2nd(aCaseCompare,sColumnName));
+ aFindName = std::find_if(aNames.begin(),aNames.end(),
+ [&aCaseCompare, &sColumnName](const OUString& lhs)
+ { return aCaseCompare(lhs, sColumnName); } );
sal_Int32 j = 0;
while ( aFindName != aNames.end() )
{
sColumnName += OUString::number(++j);
- aFindName = std::find_if(aNames.begin(),aNames.end(),std::bind2nd(aCaseCompare,sColumnName));
+ aFindName = std::find_if(aNames.begin(),aNames.end(),
+ [&aCaseCompare, &sColumnName](const OUString& lhs)
+ { return aCaseCompare(lhs, sColumnName); } );
}
pColumn->setName(sColumnName);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index b29cba9d1328..c42ba713a3ea 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -184,13 +184,15 @@ namespace
::comphelper::UStringMixEqual m_aEqualFunctor;
OViewSetter(const Sequence< OUString>& _rViews,bool _bCase) : m_aViews(_rViews),m_aEqualFunctor(_bCase){}
- OTableTreeListBox::TNames::value_type operator() (const OUString& lhs)
+ OTableTreeListBox::TNames::value_type operator() (const OUString& name)
{
OTableTreeListBox::TNames::value_type aRet;
- aRet.first = lhs;
+ aRet.first = name;
const OUString* pIter = m_aViews.getConstArray();
const OUString* pEnd = m_aViews.getConstArray() + m_aViews.getLength();
- aRet.second = std::any_of(pIter,pEnd,std::bind2nd(m_aEqualFunctor,lhs));
+ aRet.second = std::any_of(pIter, pEnd,
+ [this, &name](const OUString& lhs)
+ { return m_aEqualFunctor(lhs, name); } );
return aRet;
}
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 8cbd1198bcb3..2a80aefc3efa 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -189,7 +189,10 @@ void TableListFacade::updateTableObjectList( bool _bAllowViews )
const OUString* pViewEnd = pViewBegin + sViews.getLength();
::comphelper::UStringMixEqual aEqualFunctor;
for(;pViewBegin != pViewEnd;++pViewBegin)
- aTables.erase(std::remove_if(aTables.begin(),aTables.end(),std::bind2nd(aEqualFunctor,*pViewBegin)),aTables.end());
+ aTables.erase(std::remove_if(aTables.begin(),aTables.end(),
+ [&aEqualFunctor, pViewBegin](const OUString& lhs)
+ { return aEqualFunctor(lhs, *pViewBegin); } )
+ , aTables.end());
sTables = Sequence< OUString>(aTables.data(), aTables.size());
sViews = Sequence< OUString>();
}
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index 68981577cc6c..893499d16ed5 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -38,7 +38,6 @@
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <vcl/lstbox.hxx>
-#include <functional>
#include <map>
#include <algorithm>
@@ -88,7 +87,8 @@ namespace dbaui
bool operator()(const OUString& _sColumnName) const override
{
return std::any_of(m_pVector->begin(),m_pVector->end(),
- std::bind2nd(m_aCase, _sColumnName));
+ [this, &_sColumnName](const OUString& lhs)
+ { return m_aCase(lhs, _sColumnName); });
}
};
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 23bbdaf58275..d1a1845ddc56 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1034,14 +1034,16 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource,
_xDatasource->getPropertyValue(PROPERTY_INFO) >>= aInfo;
// search the right propertyvalue
- const PropertyValue* pValue =std::find_if(aInfo.getConstArray(),
- aInfo.getConstArray() + aInfo.getLength(),
- std::bind2nd(TPropertyValueEqualFunctor(),PROPERTY_AUTOINCREMENTCREATION));
+ const PropertyValue* pValue =std::find_if(aInfo.getConstArray(), aInfo.getConstArray() + aInfo.getLength(),
+ [](const PropertyValue& lhs)
+ {return TPropertyValueEqualFunctor()(lhs, PROPERTY_AUTOINCREMENTCREATION);} );
+
if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
pValue->Value >>= _rsAutoIncrementValue;
- pValue =std::find_if(aInfo.getConstArray(),
- aInfo.getConstArray() + aInfo.getLength(),
- std::bind2nd(TPropertyValueEqualFunctor(),OUString("IsAutoRetrievingEnabled") ));
+ pValue =std::find_if(aInfo.getConstArray(), aInfo.getConstArray() + aInfo.getLength(),
+ [](const PropertyValue& lhs)
+ {return TPropertyValueEqualFunctor()(lhs, "IsAutoRetrievingEnabled");} );
+
if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
pValue->Value >>= _rAutoIncrementValueEnabled;
}