dbaccess/source/core/api/RowSetBase.cxx | 12 ++++++------ dbaccess/source/core/api/RowSetBase.hxx | 4 ++-- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 6 +++--- dbaccess/source/core/inc/SingleSelectQueryComposer.hxx | 4 ++-- dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-)
New commits: commit 2326619cba28dcbe54063baffd6094f037230c88 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Dec 5 10:44:40 2017 +0100 Replace deprecated std::mem_fun et al in dbaccess (as std::mem_fun is gone by default at least from recent libc++ in C++17 mode) Change-Id: I98fabd88212001ac6f2cfe66f2c75a41a4cb4a3e Reviewed-on: https://gerrit.libreoffice.org/45860 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index df0fb70ae8e6..5d2b11e20a6e 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -776,8 +776,8 @@ void SAL_CALL ORowSetBase::afterLast( ) SAL_INFO("dbaccess", "ORowSetBase::afterLast() Clone = " << m_bClone); } -bool SAL_CALL ORowSetBase::move( std::mem_fun_t<bool,ORowSetBase> const & _aCheckFunctor, - std::mem_fun_t<bool,ORowSetCache> const & _aMovementFunctor) +bool SAL_CALL ORowSetBase::move(std::function<bool(ORowSetBase *)> const & _aCheckFunctor, + std::function<bool(ORowSetCache *)> const & _aMovementFunctor) { SAL_INFO("dbaccess", "ORowSetBase::move() Clone = " << m_bClone); ::connectivity::checkDisposed(m_rBHelper.bDisposed); @@ -826,16 +826,16 @@ bool SAL_CALL ORowSetBase::move( std::mem_fun_t<bool,ORowSetBase> const & _aC sal_Bool SAL_CALL ORowSetBase::first( ) { SAL_INFO("dbaccess", "ORowSetBase::first() Clone = " << m_bClone); - std::mem_fun_t<bool,ORowSetBase> ioF_tmp(&ORowSetBase::isOnFirst); - std::mem_fun_t<bool,ORowSetCache> F_tmp(&ORowSetCache::first); + auto ioF_tmp = std::mem_fn(&ORowSetBase::isOnFirst); + auto F_tmp = std::mem_fn(&ORowSetCache::first); return move(ioF_tmp,F_tmp); } sal_Bool SAL_CALL ORowSetBase::last( ) { SAL_INFO("dbaccess", "ORowSetBase::last() Clone = " << m_bClone); - std::mem_fun_t<bool,ORowSetBase> ioL_tmp(&ORowSetBase::isOnLast); - std::mem_fun_t<bool,ORowSetCache> L_tmp(&ORowSetCache::last); + auto ioL_tmp = std::mem_fn(&ORowSetBase::isOnLast); + auto L_tmp = std::mem_fn(&ORowSetCache::last); return move(ioL_tmp,L_tmp); } diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index d072f5b20b02..cb2a04561349 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -202,8 +202,8 @@ namespace dbaccess @return <TRUE/> if movement was successful. */ - bool SAL_CALL move( std::mem_fun_t<bool,ORowSetBase> const & _aCheckFunctor, - std::mem_fun_t<bool,ORowSetCache> const & _aMovementFunctor); + bool SAL_CALL move( std::function<bool(ORowSetBase *)> const & _aCheckFunctor, + std::function<bool(ORowSetCache *)> const & _aMovementFunctor); /** same meaning as isFirst. Only need by mem_fun @return diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 61859ffd1cca..a87852f5aa6b 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -426,13 +426,13 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getSt void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) { - std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause); + auto F_tmp = std::mem_fn(&OSingleSelectQueryComposer::implSetHavingClause); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); } void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) { - std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString&> F_tmp(&OSingleSelectQueryComposer::implSetFilter); + auto F_tmp = std::mem_fn(&OSingleSelectQueryComposer::implSetFilter); setConditionByColumn(column,andCriteria,F_tmp,filterOperator); } @@ -1527,7 +1527,7 @@ void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Seque setHavingClause(lcl_getCondition(filter, aPredicateInput, getColumns(), m_xMetaData->getIdentifierQuoteString())); } -void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, bool andCriteria, std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& > const & _aSetFunctor, sal_Int32 filterOperator) +void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, bool andCriteria, std::function<bool(OSingleSelectQueryComposer *, const OUString&)> const & _aSetFunctor, sal_Int32 filterOperator) { try { diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index ef1d2df8903d..933fc91c1e7f 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -74,7 +74,7 @@ namespace dbaccess OrderColumns = 2, ParameterColumns = 3 }; - typedef std::const_mem_fun_t< const ::connectivity::OSQLParseNode*, ::connectivity::OSQLParseTreeIterator > + typedef std::function<const ::connectivity::OSQLParseNode*(::connectivity::OSQLParseTreeIterator *)> TGetParseNode; ::svxform::OSystemParseContext m_aParseContext; ::connectivity::OSQLParser m_aSqlParser; @@ -132,7 +132,7 @@ namespace dbaccess void setConditionByColumn( const css::uno::Reference< css::beans::XPropertySet >& column , bool andCriteria - ,std::mem_fun1_t<bool,OSingleSelectQueryComposer,const OUString& > const & _aSetFunctor + , std::function<bool(OSingleSelectQueryComposer *, const OUString&)> const & _aSetFunctor ,sal_Int32 filterOperator); /** getStructuredCondition returns the structured condition for the where or having clause diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 5fc7ee8cf995..8923a644bf21 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1158,7 +1158,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt) if (rSelConnection) { const std::vector<OConnectionLine*>& rLines = rSelConnection->GetConnLineList(); - std::vector<OConnectionLine*>::const_iterator aIter = std::find_if(rLines.begin(), rLines.end(),std::mem_fun(&OConnectionLine::IsValid)); + std::vector<OConnectionLine*>::const_iterator aIter = std::find_if(rLines.begin(), rLines.end(),std::mem_fn(&OConnectionLine::IsValid)); if( aIter != rLines.end() ) executePopup((*aIter)->getMidPoint(), rSelConnection); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits