Kaydet (Commit) ab4bb0c0 authored tarafından n.r.pearson's avatar n.r.pearson Kaydeden (comit) Michael Stahl

tdf#93243 replace boost::bind with C++11 lambdas in Metadatable.cxx

Change-Id: I18f72bb6768fae9717c9d88be84ac2bfabd37a3b
Reviewed-on: https://gerrit.libreoffice.org/18471Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 88c51cd5
......@@ -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;
......
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