From ab4bb0c0dd74a537a7e7cba5b0d21e2b9d57c8b3 Mon Sep 17 00:00:00 2001 From: "n.r.pearson" Date: Thu, 10 Sep 2015 11:27:07 -0400 Subject: tdf#93243 replace boost::bind with C++11 lambdas in Metadatable.cxx Change-Id: I18f72bb6768fae9717c9d88be84ac2bfabd37a3b Reviewed-on: https://gerrit.libreoffice.org/18471 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- sfx2/source/doc/Metadatable.cxx | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 04872a8b1cd4..5a16527d894e 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -26,7 +26,6 @@ #include -#include #include #include @@ -536,13 +535,9 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement( { const XmlIdList_t::const_iterator iter( ::std::find_if(pList->begin(), pList->end(), - ::boost::bind( - ::std::logical_not(), - ::boost::bind( - ::std::logical_or(), - ::boost::bind( &Metadatable::IsInUndo, _1 ), - ::boost::bind( &Metadatable::IsInClipboard, _1 ) - ) ) ) ); + [](Metadatable* item)->bool { + return !(item->IsInUndo() || item->IsInClipboard()); + } ) ) ; if (iter != pList->end()) { return *iter; @@ -597,13 +592,9 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::TryInsertMetadatable( // if all elements in the list are deleted (in undo) or // placeholders, then "steal" the id from them if ( pList->end() == ::std::find_if(pList->begin(), pList->end(), - ::boost::bind( - ::std::logical_not(), - ::boost::bind( - ::std::logical_or(), - ::boost::bind( &Metadatable::IsInUndo, _1 ), - ::boost::bind( &Metadatable::IsInClipboard, _1 ) - ) ) ) ) + [](Metadatable* item)->bool { + return !(item->IsInUndo() || item->IsInClipboard()); + } ) ) { pList->push_front( &i_rObject ); return true; -- cgit v1.2.3