[Libreoffice-commits] core.git: sfx2/source

n.r.pearson n.r.pearson at gmail.com
Fri Sep 11 06:43:10 PDT 2015


 sfx2/source/doc/Metadatable.cxx |   21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

New commits:
commit ab4bb0c0dd74a537a7e7cba5b0d21e2b9d57c8b3
Author: n.r.pearson <n.r.pearson at gmail.com>
Date:   Thu Sep 10 11:27:07 2015 -0400

    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 at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 04872a8..5a16527 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;


More information about the Libreoffice-commits mailing list