diff options
author | n.r.pearson <n.r.pearson@gmail.com> | 2015-09-10 11:27:07 -0400 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-11 13:42:46 +0000 |
commit | ab4bb0c0dd74a537a7e7cba5b0d21e2b9d57c8b3 (patch) | |
tree | 7c35cbd174487116f5c1021047301a5637b878c6 /sfx2/source/doc/Metadatable.cxx | |
parent | 88c51cd55d1a9b29e62269c53b3923770253ab07 (diff) |
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 <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sfx2/source/doc/Metadatable.cxx')
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 21 |
1 files 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 <rtl/random.h> -#include <boost/bind.hpp> #include <algorithm> #include <list> @@ -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<bool>(), - ::boost::bind( - ::std::logical_or<bool>(), - ::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<bool>(), - ::boost::bind( - ::std::logical_or<bool>(), - ::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; |