[Libreoffice-commits] core.git: 3 commits - sw/inc sw/source

Michael Stahl mstahl at redhat.com
Wed Jul 8 04:27:06 PDT 2015


 sw/inc/pch/precompiled_sw.hxx      |    1 -
 sw/source/core/access/accmap.cxx   |    3 +--
 sw/source/core/doc/docbm.cxx       |   15 +++++++--------
 sw/source/core/txtnode/fmtatr2.cxx |    3 +--
 sw/source/core/unocore/unoobj2.cxx |    1 -
 5 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 056066dfdb4e4a91aa742028f6a9c06eedeaa537
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 8 12:58:11 2015 +0200

    sw: remove boost::bind from accmap.cxx
    
    Change-Id: I9953cd58e4e285f655f11afccc1d6ee535f85d7e

diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index f14d1c9..576c721 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -43,7 +43,6 @@
 #include <basic/sbx.hxx>
 #include <basic/sbxobj.hxx>
 #include <basic/sbxvar.hxx>
-#include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/make_shared.hpp>
 #include <boost/noncopyable.hpp>
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index e682292..6a0883f 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -71,7 +71,6 @@
 #include <dflyobj.hxx>
 #include <prevwpage.hxx>
 #include <calbck.hxx>
-#include <boost/bind.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
@@ -3092,7 +3091,7 @@ void SwAccessibleMap::FireEvents()
             mpEvents->SetFiring();
             mpEvents->MoveInvalidXAccToEnd();
             ::std::for_each(mpEvents->begin(), mpEvents->end(),
-                            boost::bind(&SwAccessibleMap::FireEvent, this, _1));
+                [this] (SwAccessibleEvent_Impl const& rEvent) { this->FireEvent(rEvent); } );
 
             delete mpEventMap;
             mpEventMap = nullptr;
commit 1dca84e374898185851b5a90595a8b5b741431ad
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 8 12:53:45 2015 +0200

    sw: remove boost::bind from docbm.cxx
    
    Change-Id: I3e91817c5113a391668ef0f35d6b8df4702f9715

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 930312c..060c32f 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -19,7 +19,6 @@
 
 #include <MarkManager.hxx>
 #include <bookmrk.hxx>
-#include <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <cntfrm.hxx>
 #include <crossrefbookmark.hxx>
@@ -168,7 +167,7 @@ namespace
             rMarks.begin(),
             pCandidatesEnd,
             back_inserter(vCandidates),
-            boost::bind( ::std::logical_not<bool>(), boost::bind( &IMark::EndsBefore, _1, rPos ) ) );
+            [&] (IDocumentMarkAccess::pMark_t const& rpMark) { return !rpMark->EndsBefore(rPos); } );
         // no candidate left => we are in front of the first mark or there are none
         if(vCandidates.empty()) return NULL;
         // return the highest (last) candidate using mark end ordering
@@ -269,7 +268,7 @@ namespace
         return find_if(
             ppMarksBegin,
             ppMarksEnd,
-            boost::bind(&OUString::equals, boost::bind(&IMark::GetName, _1), rName));
+            [&] (IDocumentMarkAccess::pMark_t const& rpMark) { return rpMark->GetName() == rName; } );
     }
 
 #if 0
@@ -960,7 +959,7 @@ namespace sw { namespace mark
             find_if(
                 pMarkLow,
                 pMarkHigh,
-                boost::bind( ::std::equal_to<const IMark*>(), boost::bind(&boost::shared_ptr<IMark>::get, _1), pMark ) );
+                [&] (pMark_t const& rpMark) { return rpMark.get() == pMark; } );
         if(pMarkFound != pMarkHigh)
             deleteMark(pMarkFound);
     }
@@ -1015,8 +1014,8 @@ namespace sw { namespace mark
     {
         const_iterator_t pFieldmark = find_if(
             m_vFieldmarks.begin(),
-            m_vFieldmarks.end( ),
-            boost::bind(&IMark::IsCoveringPosition, _1, rPos));
+            m_vFieldmarks.end(),
+            [&] (pMark_t const& rpMark) { return rpMark->IsCoveringPosition(rPos); } );
         if(pFieldmark == m_vFieldmarks.end()) return NULL;
         return dynamic_cast<IFieldmark*>(pFieldmark->get());
     }
@@ -1081,8 +1080,8 @@ namespace sw { namespace mark
     {
         const_iterator_t pAnnotationMark = find_if(
             m_vAnnotationMarks.begin(),
-            m_vAnnotationMarks.end( ),
-            boost::bind(&IMark::IsCoveringPosition, _1, rPos));
+            m_vAnnotationMarks.end(),
+            [&] (pMark_t const& rpMark) { return rpMark->IsCoveringPosition(rPos); } );
         if (pAnnotationMark == m_vAnnotationMarks.end())
             return NULL;
         return pAnnotationMark->get();
commit 84806f306114a038b4d5cc4eb6f34b90fbe71f9d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 8 12:46:37 2015 +0200

    sw: remove boost::bind from fmtatr2.cxx
    
    Change-Id: I4924251babfcea9a87e7e688c904264dd80f9359

diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 90a45b9..dcd698e 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -48,7 +48,6 @@
 #include <docsh.hxx>
 #include <svl/zforlist.hxx>
 
-#include <boost/bind.hpp>
 #include <algorithm>
 
 using namespace ::com::sun::star;
@@ -811,7 +810,7 @@ MetaFieldManager::getMetaFields()
     // erase deleted fields
     const MetaFieldList_t::iterator iter(
         ::std::remove_if(m_MetaFields.begin(), m_MetaFields.end(),
-            ::boost::bind(&::boost::weak_ptr<MetaField>::expired, _1)));
+            [] (::boost::weak_ptr<MetaField> const& rField) { return rField.expired(); }));
     m_MetaFields.erase(iter, m_MetaFields.end());
     // filter out fields in UNDO
     MetaFieldList_t filtered(m_MetaFields.size());
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index e1bdf2e..1610bd5 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -109,7 +109,6 @@
 #include <sortopt.hxx>
 #include <algorithm>
 #include <iterator>
-#include <boost/bind.hpp>
 #include <calbck.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>


More information about the Libreoffice-commits mailing list