This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch compilers-101
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 069616a999439adc8eb9297964411fc4c87358d0
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Thu Nov 5 23:13:12 2026 -0500

    Boost modernization Phase 3: boost::bind to C++14 lambdas (~85 files)
    
    - Replace boost::bind with C++14 lambdas across ~85 files
    - Replace #include <boost/bind.hpp> with appropriate standard headers
    - Remove boost::bind/protect.hpp where no longer needed
    - Handle nested boost::bind, boost::cref/boost::ref, boost::mem_fn,
      boost::select1st/select2st, boost::equal_to, boost::logical_not patterns
    - Spirit grammar actions in pdfparse.cxx left for follow-up
    
    Remaining: ~90 files with boost::bind, plus boost::function,
    boost::noncopyable, Boost.Optional, Boost.Variant, Boost.Spirit
---
 main/basegfx/source/range/b2dpolyrange.cxx         | 15 +++------------
 .../source/directx/dx_canvashelper_texturefill.cxx |  8 ++------
 .../source/directx/dx_textlayout_drawhelper.cxx    |  5 +----
 main/comphelper/source/property/property.cxx       |  2 +-
 main/cppcanvas/source/mtfrenderer/textaction.cxx   |  6 ++----
 .../source/deployment/gui/dp_gui_dialog2.cxx       |  3 +--
 .../deployment/gui/dp_gui_extensioncmdqueue.cxx    | 13 +++++--------
 main/filter/source/xsltfilter/containerhelper.hxx  | 17 ++++++++---------
 .../ConfigurationControllerResourceManager.cxx     | 19 ++++++++-----------
 .../source/presenter/PresenterAccessibility.cxx    |  5 ++---
 main/sdext/source/presenter/PresenterHelpView.cxx  |  3 +--
 .../source/presenter/PresenterSlideSorter.cxx      |  7 +++----
 .../engine/animationnodes/animationcommandnode.cxx |  3 +--
 .../engine/animationnodes/animationsetnode.cxx     |  4 +---
 .../animationnodes/sequentialtimecontainer.cxx     | 13 ++++---------
 .../source/engine/slide/shapemanagerimpl.cxx       | 22 +++-------------------
 main/sw/source/core/doc/docbm.cxx                  | 18 +++++++++---------
 main/sw/source/core/txtnode/fmtatr2.cxx            |  4 ++--
 main/unoxml/source/rdf/librdf_repository.cxx       |  4 ++--
 19 files changed, 59 insertions(+), 112 deletions(-)

diff --git a/main/basegfx/source/range/b2dpolyrange.cxx 
b/main/basegfx/source/range/b2dpolyrange.cxx
index 4fcb8ccf2c..492bed8035 100644
--- a/main/basegfx/source/range/b2dpolyrange.cxx
+++ b/main/basegfx/source/range/b2dpolyrange.cxx
@@ -30,7 +30,6 @@
 #include <basegfx/tuple/b2dtuple.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 
-#include <boost/bind.hpp>
 #include <tuple>
 #include <algorithm>
 #include <vector>
@@ -51,11 +50,7 @@ namespace basegfx
             maBounds.reset();
             std::for_each(maRanges.begin(),
                           maRanges.end(),
-                          boost::bind(
-                              (void (B2DRange::*)(const B2DRange&))(
-                 &B2DRange::expand),
-                              boost::ref(maBounds),
-                              _1));
+                          [&](const auto& range) { maBounds.expand(range); });
         }
 
     public:
@@ -175,9 +170,7 @@ namespace basegfx
         {
             std::for_each(maOrient.begin(),
                           maOrient.end(),
-                          boost::bind(
-                              &flipOrientation,
-                              _1));
+                          [](auto& orient) { flipOrientation(orient); });
         }
 
         B2DRange getBounds() const
@@ -210,9 +203,7 @@ namespace basegfx
             const std::vector<B2DRange>::const_iterator aEnd( maRanges.end() );
             return std::find_if( maRanges.begin(),
                                  aEnd,
-                                 boost::bind<bool>( boost::mem_fn( 
&B2DRange::overlaps ),
-                                                    _1,
-                                                    boost::cref(rRange) ) ) != 
aEnd;
+                                 [&](const auto& range) { return 
range.overlaps(rRange); } ) != aEnd;
         }
 
         B2DPolyPolygon solveCrossovers() const
diff --git a/main/canvas/source/directx/dx_canvashelper_texturefill.cxx 
b/main/canvas/source/directx/dx_canvashelper_texturefill.cxx
index 33a8afca7a..612916a3ff 100644
--- a/main/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/main/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -48,8 +48,7 @@
 #include "dx_canvashelper.hxx"
 #include "dx_impltools.hxx"
 
-#include <boost/scoped_ptr.hpp>
-#include <boost/bind.hpp>
+
 #include <memory>
 
 
@@ -586,10 +585,7 @@ namespace dxcanvas
                     std::transform(&rValues.maColors[0],
                                    
&rValues.maColors[0]+rValues.maColors.getLength(),
                                    aColors.begin(),
-                                   boost::bind(
-                                       (Gdiplus::ARGB (*)( const 
uno::Sequence< double >& ))(
-                                           &tools::sequenceToArgb),
-                                       _1));
+                                   [](const auto& seq) { return 
tools::sequenceToArgb(seq); });
                     std::vector< Gdiplus::REAL > aStops;
                     comphelper::sequenceToContainer(aStops,rValues.maStops);
 
diff --git a/main/canvas/source/directx/dx_textlayout_drawhelper.cxx 
b/main/canvas/source/directx/dx_textlayout_drawhelper.cxx
index fbb8996329..f9f78414f9 100644
--- a/main/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/main/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -33,7 +33,6 @@
 #include <tools/diagnose_ex.h>
 
 #include <memory>
-#include <boost/bind.hpp>
 #include <com/sun/star/rendering/FontRequest.hpp>
 #include <com/sun/star/rendering/PanoseProportion.hpp>
 #include <com/sun/star/rendering/XCanvasFont.hpp>
@@ -118,9 +117,7 @@ namespace dxcanvas
 
         // issue an ReleaseHDC() when leaving the scope
         const ::comphelper::ScopeGuard aGuard(
-            boost::bind( &Gdiplus::Graphics::ReleaseHDC,
-                         rGraphics.get(),
-                         hdc ));
+            [&]() { rGraphics->ReleaseHDC( hdc ); });
 
         SystemGraphicsData aSystemGraphicsData;
         aSystemGraphicsData.nSize = sizeof(SystemGraphicsData);
diff --git a/main/comphelper/source/property/property.cxx 
b/main/comphelper/source/property/property.cxx
index ddca19c842..c6ab03d807 100644
--- a/main/comphelper/source/property/property.cxx
+++ b/main/comphelper/source/property/property.cxx
@@ -157,7 +157,7 @@ bool findProperty(Property&              o_rProp,
     const sal_Int32 nLen(i_seqProps.getLength());
     const Property* pRes(
         std::find_if(pAry,pAry+nLen,
-                      [&](const auto& prop) { return 
PropertyStringEqualFunctor()(prop, i_rPropName); }));
+                      [&](const auto* prop) { return 
PropertyStringEqualFunctor()(prop, i_rPropName); }));
     if( pRes == pAry+nLen )
         return false;
 
diff --git a/main/cppcanvas/source/mtfrenderer/textaction.cxx 
b/main/cppcanvas/source/mtfrenderer/textaction.cxx
index 42478f2a34..40637c6ac7 100644
--- a/main/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/main/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -51,7 +51,7 @@
 #include <canvas/canvastools.hxx>
 
 #include <memory>
-#include <boost/bind.hpp>
+#include <functional>
 #include <boost/utility.hpp>
 
 #include "textaction.hxx"
@@ -373,9 +373,7 @@ namespace cppcanvas
                 ::std::transform( pOffsets + rSubset.mnSubsetBegin,
                                   pOffsets + rSubset.mnSubsetEnd,
                                   pAdaptedOffsets,
-                                  ::boost::bind( ::std::minus<double>(),
-                                                 _1,
-                                                 nMinPos ) );
+                                  [&](auto val) { return val - nMinPos; } );
 
                 o_rMinPos = nMinPos;
                 o_rMaxPos = nMaxPos;
diff --git a/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 04f89b7d6e..232fd84d7f 100644
--- a/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/main/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -76,7 +76,6 @@
 
 #include <map>
 #include <vector>
-#include <boost/bind.hpp>
 #include <memory>
 
 #define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
@@ -647,7 +646,7 @@ bool DialogHelper::installExtensionWarn( const OUString 
&rExtensionName ) const
        // cannot pump the Cocoa event queue; the dialog must execute on the 
main
        // thread or it appears but never receives events.
        return vcl::solarthread::syncExecute(
-               boost::bind( &DialogHelper::solar_installExtensionWarn, this, 
rExtensionName ) );
+               [this]() { this->solar_installExtensionWarn( rExtensionName ); 
} );
 }
 
 
//------------------------------------------------------------------------------
diff --git a/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx 
b/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 79b622408b..13671491f0 100644
--- a/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -91,7 +91,6 @@
 #include <dp_gui_handleversionexception.hxx>
 
 #include <queue>
-#include <boost/bind.hpp>
 #include <memory>
 
 #if (defined(_MSC_VER) && (_MSC_VER < 1400))
@@ -443,7 +442,7 @@ void ProgressCmdEnv::handle( uno::Reference< 
task::XInteractionRequest > const &
         }
         {
             short n = vcl::solarthread::syncExecute(
-                boost::bind( &solar_dependencyDialog, m_pDialogHelper, deps ) 
);
+                [m_pDialogHelper, deps]() { return solar_dependencyDialog( 
m_pDialogHelper, deps ); } );
             // Distinguish between closing the dialog and programatically
             // canceling the dialog (headless VCL):
             approve = n == RET_OK
@@ -493,8 +492,7 @@ void ProgressCmdEnv::handle( uno::Reference< 
task::XInteractionRequest > const &
     else if (request >>= platExc)
     {
         vcl::solarthread::syncExecute(
-            boost::bind( &solar_unsupportedPlatformBox, m_pDialogHelper,
-                         platExc.package->getDisplayName() ) );
+            [m_pDialogHelper]() { solar_unsupportedPlatformBox( 
m_pDialogHelper, platExc.package->getDisplayName() ); } );
         approve = true;
     }
 
@@ -563,7 +561,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
             text = ::comphelper::anyToString( rStatus ); // fallback
 
         vcl::solarthread::syncExecute(
-            boost::bind( &solar_errorBox, m_pDialogHelper, text, false ) );
+            [m_pDialogHelper]() { solar_errorBox( m_pDialogHelper, text, false 
); } );
     }
     ++m_nCurrentProgress;
     updateProgress();
@@ -851,7 +849,7 @@ void ExtensionCmdQueue::Thread::execute()
                     msg = ::comphelper::anyToString(exc);
 
                 vcl::solarthread::syncExecute(
-                    boost::bind( &solar_errorBox, m_pDialogHelper, msg, true ) 
);
+                    [m_pDialogHelper]() { solar_errorBox( m_pDialogHelper, 
msg, true ); } );
                     //Continue with installation of the remaining extensions
             }
             {
@@ -961,8 +959,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
     // pumps the Cocoa event queue (AquaSalInstance::Yield), so executing the
     // update dialog on this worker thread would leave it visible but frozen.
     vcl::solarthread::syncExecute(
-        boost::bind( &ExtensionCmdQueue::Thread::_solar_checkForUpdates,
-                     this, vExtensionList ) );
+        [this, vExtensionList]() { this->_solar_checkForUpdates( 
vExtensionList ); } );
 }
 
 
//------------------------------------------------------------------------------
diff --git a/main/filter/source/xsltfilter/containerhelper.hxx 
b/main/filter/source/xsltfilter/containerhelper.hxx
index 62a30487ee..7641965252 100644
--- a/main/filter/source/xsltfilter/containerhelper.hxx
+++ b/main/filter/source/xsltfilter/containerhelper.hxx
@@ -27,7 +27,6 @@
 #include <map>
 #include <memory>
 #include <algorithm>
-#include <boost/bind.hpp>
 
 namespace XSLT{
 
@@ -62,25 +61,25 @@ public:
        template< typename FuncType >
        inline void forEachMem(FuncType pFunc)
        {
-               forEach( ::boost::bind(pFunc, _1 ));
+               forEach( [pFunc](const auto& item) { pFunc( item ); } );
        }
 
        template<typename FuncType, typename ParamType>
        inline void forEachMem(FuncType pFunc, ParamType aParam) const
        {
-               forEach( ::boost::bind(pFunc, _1, aParam));
+               forEach( [&](const auto& item) { pFunc( item, aParam ); } );
        }
 
        template<typename FuncType, typename ParamType1, typename ParamType2>
        inline void forEachMem(FuncType pFunc, ParamType1 aParam1, ParamType2 
aParam2) const
        {
-               forEach( ::boost::bind(pFunc, _1, aParam1, aParam2 ));
+               forEach( [&](const auto& item) { pFunc( item, aParam1, aParam2 
); } );
        }
 
        template<typename FuncType, typename ParamType1, typename ParamType2, 
typename ParamType3>
        inline void forEachMem(FuncType pFunc, ParamType1 aParam1, ParamType2 
aParam2, ParamType3 aParam3 ) const
        {
-               forEach( ::boost::bind(pFunc, _1, aParam1, aParam2, aParam3 ));
+               forEach( [&](const auto& item) { pFunc( item, aParam1, aParam2, 
aParam3 ); } );
        }
 
        template<typename FuncType>
@@ -92,25 +91,25 @@ public:
        template<typename FuncType>
        inline void forEachMemWithKey(FuncType pFunc) const
        {
-               forEachWithKey( ::boost::bind(pFunc, _2, _1));
+               forEachWithKey( [&](const auto& key, const auto& value) { 
pFunc( value, key ); } );
        }
 
        template<typename FuncType, typename ParamType>
        inline void forEachMemWithKey(FuncType pFunc, ParamType aParam1) const
        {
-               forEachWithKey( ::boost::bind(pFunc, _2, _1, aParam1) );
+               forEachWithKey( [&](const auto& key, const auto& value) { 
pFunc( value, key, aParam1 ); } );
        }
 
        template<typename FuncType, typename ParamType1, typename ParamType2>
        inline void forEachMemWithKey(FuncType pFunc, ParamType1 aParam1, 
ParamType2 aParam2) const
        {
-               forEachWithKey( ::boost::bind(pFunc, _2, _1, aParam1, aParam2) 
);
+               forEachWithKey( [&](const auto& key, const auto& value) { 
pFunc( value, key, aParam1, aParam2 ); } );
        }
 
        template<typename FuncType, typename ParamType1, typename ParamType2, 
typename ParamType3>
        inline void forEachMemWithKey(FuncType pFunc, ParamType1 aParam1, 
ParamType2 aParam2, ParamType3 aParam3) const
        {
-               forEachWithKey( ::boost::bind(pFunc, _2, _1, aParam1, aParam2, 
aParam3) );
+               forEachWithKey( [&](const auto& key, const auto& value) { 
pFunc( value, key, aParam1, aParam2, aParam3 ); } );
        }
 private:
        template<typename FunctorType>
diff --git 
a/main/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
 
b/main/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index 35259db454..66ab35fe34 100644
--- 
a/main/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ 
b/main/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -30,7 +30,6 @@
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <tools/diagnose_ex.h>
 #include <algorithm>
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -87,11 +86,10 @@ void 
ConfigurationControllerResourceManager::ActivateResources (
     // Iterate in normal order over the resources that are to be
     // activated so that resources on which others depend are activated
     // beforet the depending resources are activated.
-    ::std::for_each(
-        rResources.begin(),
-        rResources.end(),
-        
::boost::bind(&ConfigurationControllerResourceManager::ActivateResource,
-            this, _1, rxConfiguration));
+        ::std::for_each(
+            rResources.begin(),
+            rResources.end(),
+            [this, &rxConfiguration](auto& resource) { this->ActivateResource( 
resource, rxConfiguration ); });
 }
 
 
@@ -105,11 +103,10 @@ void 
ConfigurationControllerResourceManager::DeactivateResources (
     // Iterate in reverese order over the resources that are to be
     // deactivated so that resources on which others depend are deactivated
     // only when the depending resources have already been deactivated.
-    ::std::for_each(
-        rResources.rbegin(),
-        rResources.rend(),
-        
::boost::bind(&ConfigurationControllerResourceManager::DeactivateResource,
-            this, _1, rxConfiguration));
+        ::std::for_each(
+            rResources.rbegin(),
+            rResources.rend(),
+            [this, &rxConfiguration](auto& resource) { 
this->DeactivateResource( resource, rxConfiguration ); });
 }
 
 
diff --git a/main/sdext/source/presenter/PresenterAccessibility.cxx 
b/main/sdext/source/presenter/PresenterAccessibility.cxx
index 2ffce99d8e..dcf685d7ce 100644
--- a/main/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/main/sdext/source/presenter/PresenterAccessibility.cxx
@@ -46,7 +46,6 @@
 #include <cppuhelper/compbase1.hxx>
 #include <cppuhelper/compbase5.hxx>
 #include <cppuhelper/implbase1.hxx>
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -2201,9 +2200,9 @@ void AccessibleNotes::SetTextView (
                // events and handles text changes. Register the corresponding
                // listeners here.
                mpTextView->GetCaret()->SetCaretMotionBroadcaster(
-                       ::boost::bind(&AccessibleNotes::NotifyCaretChange, 
this, _1, _2, _3, _4));
+                       [this](auto& a1, auto& a2, auto& a3, auto& a4) { 
this->NotifyCaretChange( a1, a2, a3, a4 ); } );
                mpTextView->SetTextChangeBroadcaster(
-                       ::boost::bind(&AccessibleNotes::HandleTextChange, 
this));
+                       [this]() { this->HandleTextChange(); } );
        }
 }
 
diff --git a/main/sdext/source/presenter/PresenterHelpView.cxx 
b/main/sdext/source/presenter/PresenterHelpView.cxx
index ce7e8bb95c..7ff58e9285 100644
--- a/main/sdext/source/presenter/PresenterHelpView.cxx
+++ b/main/sdext/source/presenter/PresenterHelpView.cxx
@@ -39,7 +39,6 @@
 #include <com/sun/star/util/Color.hpp>
 #include <algorithm>
 #include <vector>
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -387,7 +386,7 @@ void PresenterHelpView::ReadHelpStrings (void)
         UNO_QUERY);
     PresenterConfigurationAccess::ForAll(
         xStrings,
-        ::boost::bind(&PresenterHelpView::ProcessString, this, _2));
+        [this](auto& a1, auto& a2) { this->ProcessString( a2 ); }));
 }
 
 
diff --git a/main/sdext/source/presenter/PresenterSlideSorter.cxx 
b/main/sdext/source/presenter/PresenterSlideSorter.cxx
index da4c6ab109..897dc5184b 100644
--- a/main/sdext/source/presenter/PresenterSlideSorter.cxx
+++ b/main/sdext/source/presenter/PresenterSlideSorter.cxx
@@ -47,7 +47,6 @@
 #include <com/sun/star/util/Color.hpp>
 #include <algorithm>
 #include <math.h>
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -337,14 +336,14 @@ PresenterSlideSorter::PresenterSlideSorter (
                     rxContext,
                     mxWindow,
                     mpPresenterController->GetPaintManager(),
-                    
::boost::bind(&PresenterSlideSorter::SetVerticalOffset,this,_1)));
+                    [this](auto& offset) { this->SetVerticalOffset( offset ); 
})));
         else
             mpHorizontalScrollBar = ::rtl::Reference<PresenterScrollBar>(
                 new PresenterHorizontalScrollBar(
                     rxContext,
                     mxWindow,
                     mpPresenterController->GetPaintManager(),
-                    
::boost::bind(&PresenterSlideSorter::SetHorizontalOffset,this,_1)));
+                    [this](auto& offset) { this->SetHorizontalOffset( offset 
); })));
         mpCloseButton = PresenterButton::Create(
             rxContext,
             mpPresenterController,
@@ -1136,7 +1135,7 @@ void PresenterSlideSorter::Paint (const awt::Rectangle& 
rUpdateBox)
         PresenterGeometryHelper::ConvertRectangle(mpLayout->maBoundingBox)))
     {
         mpLayout->ForAllVisibleSlides(
-            ::boost::bind(&PresenterSlideSorter::PaintPreview, this, mxCanvas, 
rUpdateBox, _1));
+            [this](auto& box) { this->PaintPreview( mxCanvas, rUpdateBox, box 
); }));
     }
 
     Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxCanvas, UNO_QUERY);
diff --git 
a/main/slideshow/source/engine/animationnodes/animationcommandnode.cxx 
b/main/slideshow/source/engine/animationnodes/animationcommandnode.cxx
index e22e751713..a082285820 100644
--- a/main/slideshow/source/engine/animationnodes/animationcommandnode.cxx
+++ b/main/slideshow/source/engine/animationnodes/animationcommandnode.cxx
@@ -36,7 +36,6 @@
 #include "tools.hxx"
 #include "nodetools.hxx"
 
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace com::sun::star;
@@ -118,7 +117,7 @@ void AnimationCommandNode::activate_st()
 
     // deactivate ASAP:
     scheduleDeactivationEvent(
-        makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ),
+        makeEvent( [pSelf = getSelf()]() { pSelf->deactivate(); },
                    "AnimationCommandNode::deactivate" ) );
 }
 
diff --git a/main/slideshow/source/engine/animationnodes/animationsetnode.cxx 
b/main/slideshow/source/engine/animationnodes/animationsetnode.cxx
index bf27affd28..109da1a0c0 100644
--- a/main/slideshow/source/engine/animationnodes/animationsetnode.cxx
+++ b/main/slideshow/source/engine/animationnodes/animationsetnode.cxx
@@ -34,7 +34,6 @@
 #include "tools.hxx"
 #include "delayevent.hxx"
 
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace com::sun::star;
@@ -73,8 +72,7 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() 
const
         ENSURE_OR_THROW(
             pSelf, "cannot cast getSelf() to my type!" );
         aParms.mpEndEvent = makeEvent(
-            boost::bind( &AnimationSetNode::implScheduleDeactivationEvent,
-                         pSelf ),
+            [pSelf]() { pSelf->implScheduleDeactivationEvent(); },
             "AnimationSetNode::implScheduleDeactivationEvent");
     }
 
diff --git 
a/main/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx 
b/main/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
index 7bffc2d35a..5a9b0b1dc7 100644
--- a/main/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
+++ b/main/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx
@@ -33,7 +33,6 @@
 #include "sequentialtimecontainer.hxx"
 #include "tools.hxx"
 
-#include <boost/bind.hpp>
 #include <algorithm>
 
 namespace slideshow {
@@ -57,7 +56,7 @@ void SequentialTimeContainer::activate_st()
         // deactivate ASAP:
         scheduleDeactivationEvent(
             makeEvent(
-                 boost::bind< void >( boost::mem_fn( 
&AnimationNode::deactivate ), getSelf() ),
+                 [pSelf = getSelf()]() { pSelf->deactivate(); },
                  "SequentialTimeContainer::deactivate") );
     }
     else // use default
@@ -85,7 +84,7 @@ void SequentialTimeContainer::skipEffect(
         getContext().mrEventQueue.forceEmpty();
         getContext().mrEventQueue.addEvent(
             makeEvent(
-                boost::bind<void>( boost::mem_fn( &AnimationNode::deactivate 
), pChildNode ),
+                [pChildNode]() { pChildNode->deactivate(); },
                 "SequentialTimeContainer::deactivate, skipEffect with delay") 
);
     }
     else
@@ -111,15 +110,11 @@ bool SequentialTimeContainer::resolveChild(
 
         // event that will deactivate the resolved/running child:
         mpCurrentSkipEvent = makeEvent(
-            boost::bind( &SequentialTimeContainer::skipEffect,
-                         std::dynamic_pointer_cast<SequentialTimeContainer>( 
getSelf() ),
-                         pChildNode ),
+            [pSelf = std::dynamic_pointer_cast<SequentialTimeContainer>( 
getSelf() ), pChildNode]() { pSelf->skipEffect( pChildNode ); },
             "SequentialTimeContainer::skipEffect, resolveChild");
         // event that will reresolve the resolved/activated child:
         mpCurrentRewindEvent = makeEvent(
-            boost::bind( &SequentialTimeContainer::rewindEffect,
-                         std::dynamic_pointer_cast<SequentialTimeContainer>( 
getSelf() ),
-                         pChildNode ),
+            [pSelf = std::dynamic_pointer_cast<SequentialTimeContainer>( 
getSelf() ), pChildNode]() { pSelf->rewindEffect( pChildNode ); },
             "SequentialTimeContainer::rewindEffect, resolveChild");
 
         // deactivate child node when skip event occurs:
diff --git a/main/slideshow/source/engine/slide/shapemanagerimpl.cxx 
b/main/slideshow/source/engine/slide/shapemanagerimpl.cxx
index 5821e91bb1..f9ac5e8226 100644
--- a/main/slideshow/source/engine/slide/shapemanagerimpl.cxx
+++ b/main/slideshow/source/engine/slide/shapemanagerimpl.cxx
@@ -34,7 +34,6 @@
 
 #include "shapemanagerimpl.hxx"
 
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace com::sun::star;
@@ -75,24 +74,12 @@ void ShapeManagerImpl::activate( bool 
bSlideBackgoundPainted )
         uno::Reference<presentation::XShapeEventListener> xDummyListener;
         std::for_each( mrGlobalListenersMap.begin(),
                        mrGlobalListenersMap.end(),
-                       boost::bind( &ShapeManagerImpl::listenerAdded,
-                                    this,
-                                    boost::cref(xDummyListener),
-                                    boost::bind(
-                                        
std::select1st<ShapeEventListenerMap::value_type>(),
-                                        _1 )));
+                       [&](const auto& pair) { this->listenerAdded( 
xDummyListener, pair.first ); } );
 
         // clone cursor map
         std::for_each( mrGlobalCursorMap.begin(),
                        mrGlobalCursorMap.end(),
-                       boost::bind( &ShapeManagerImpl::cursorChanged,
-                                    this,
-                                    boost::bind(
-                                        
std::select1st<ShapeCursorMap::value_type>(),
-                                        _1 ),
-                                    boost::bind(
-                                        
std::select2nd<ShapeCursorMap::value_type>(),
-                                        _1 )));
+                       [&](const auto& pair) { this->cursorChanged( 
pair.first, pair.second ); } );
 
         if( mpLayerManager )
             mpLayerManager->activate( bSlideBackgoundPainted );
@@ -174,10 +161,7 @@ bool ShapeManagerImpl::handleMouseReleased( 
awt::MouseEvent const& e )
 
             // DON'T do anything with /this/ after this point!
             pCont->forEach<presentation::XShapeEventListener>(
-                boost::bind( &presentation::XShapeEventListener::click,
-                             _1,
-                             boost::cref(xShape),
-                             boost::cref(e) ));
+                [&](const auto& listener) { listener->click( xShape, e ); } );
 
             return true; // handled this event
         }
diff --git a/main/sw/source/core/doc/docbm.cxx 
b/main/sw/source/core/doc/docbm.cxx
index 2ae952e9df..c4c926dce4 100644
--- a/main/sw/source/core/doc/docbm.cxx
+++ b/main/sw/source/core/doc/docbm.cxx
@@ -27,7 +27,7 @@
 
 #include <MarkManager.hxx>
 #include <bookmrk.hxx>
-#include <boost/bind.hpp>
+#include <functional>
 #include <cntfrm.hxx>
 #include <crossrefbookmark.hxx>
 #include <annotationmark.hxx>
@@ -152,7 +152,7 @@ namespace
             rMarks.begin(),
             rMarks.end(),
             rPos,
-            bind(&IMark::StartsAfter, _2, _1)); // finds the first that is 
starting after
+            [](const auto& pos, const auto& mark) { return 
mark->StartsAfter(pos); }); // finds the first that is starting after
         if(pMarkAfter == rMarks.end()) return NULL;
         return pMarkAfter->get();
     };
@@ -166,14 +166,14 @@ namespace
             rMarks.begin(),
             rMarks.end(),
             rPos,
-            bind(&IMark::StartsAfter, _2, _1));
+            [](const auto& pos, const auto& mark) { return 
mark->StartsAfter(pos); });
         vCandidates.reserve(pCandidatesEnd - rMarks.begin());
         // only marks ending before are candidates
         remove_copy_if(
             rMarks.begin(),
             pCandidatesEnd,
             back_inserter(vCandidates),
-            boost::bind( ::std::logical_not<bool>(), bind( &IMark::EndsBefore, 
_1, rPos ) ) );
+            [&](const auto& mark) { return !mark->EndsBefore(rPos); } );
         // no candidate left => we are in front of the first mark or there are 
none
         if(!vCandidates.size()) return NULL;
         // return the highest (last) candidate using mark end ordering
@@ -246,7 +246,7 @@ namespace
         for(IDocumentMarkAccess::iterator_t ppCurrentMark = lower_bound(
                 rMarks.begin(), rMarks.end(),
                 rPos,
-                bind(&IMark::StartsBefore, _1, _2));
+                [](const auto& mark, const auto& pos) { return 
mark->StartsBefore(pos); }));
             ppCurrentMark != rMarks.end();
             ++ppCurrentMark)
         {
@@ -274,7 +274,7 @@ namespace
         return find_if(
             ppMarksBegin,
             ppMarksEnd,
-            bind(&::rtl::OUString::equals, bind(&IMark::GetName, _1), rName));
+            [&](const auto& mark) { return 
::rtl::OUString::equals(mark->GetName(), rName); });
     }
 
 #if 0
@@ -899,13 +899,13 @@ namespace sw { namespace mark
                 m_vAllMarks.begin(),
                 m_vAllMarks.end(),
                 pMark->GetMarkStart(),
-                bind(&IMark::StartsBefore, _1, _2) );
+                [](const auto& mark, const auto& pos) { return 
mark->StartsBefore(pos); } );
         iterator_t pMarkHigh = m_vAllMarks.end();
         iterator_t pMarkFound =
             find_if(
                 pMarkLow,
                 pMarkHigh,
-                boost::bind( ::std::equal_to<const IMark*>(), 
bind(&std::shared_ptr<IMark>::get, _1), pMark ) );
+                [&](const auto& mark) { return mark.get() == pMark; } );
         if(pMarkFound != pMarkHigh)
             deleteMark(pMarkFound);
     }
@@ -960,7 +960,7 @@ namespace sw { namespace mark
         const_iterator_t pFieldmark = find_if(
             m_vFieldmarks.begin(),
             m_vFieldmarks.end( ),
-            bind(&IMark::IsCoveringPosition, _1, rPos));
+            [&](const auto& mark) { return mark->IsCoveringPosition(rPos); });
         if(pFieldmark == m_vFieldmarks.end()) return NULL;
         return dynamic_cast<IFieldmark*>(pFieldmark->get());
     }
diff --git a/main/sw/source/core/txtnode/fmtatr2.cxx 
b/main/sw/source/core/txtnode/fmtatr2.cxx
index 8c3d7d3d56..73bbd8e555 100644
--- a/main/sw/source/core/txtnode/fmtatr2.cxx
+++ b/main/sw/source/core/txtnode/fmtatr2.cxx
@@ -54,7 +54,7 @@
 #include <docsh.hxx>
 #include <svl/zforlist.hxx> // GetNumberFormat
 
-#include <boost/bind.hpp>
+#include <functional>
 #include <algorithm>
 #include <memory>
 
@@ -900,7 +900,7 @@ MetaFieldManager::getMetaFields()
     // erase deleted fields
     const MetaFieldList_t::iterator iter(
         ::std::remove_if(m_MetaFields.begin(), m_MetaFields.end(),
-            ::boost::bind(&::std::weak_ptr<MetaField>::expired, _1)));
+            [](const auto& field) { return field.expired(); }));
     m_MetaFields.erase(iter, m_MetaFields.end());
     // filter out fields in UNDO
     MetaFieldList_t filtered(m_MetaFields.size());
diff --git a/main/unoxml/source/rdf/librdf_repository.cxx 
b/main/unoxml/source/rdf/librdf_repository.cxx
index 4164de8ac8..60c312a18f 100644
--- a/main/unoxml/source/rdf/librdf_repository.cxx
+++ b/main/unoxml/source/rdf/librdf_repository.cxx
@@ -1072,7 +1072,7 @@ librdf_Repository::getGraphNames()
     ::comphelper::SequenceAsVector< uno::Reference<rdf::XURI> > ret;
         std::transform(m_NamedGraphs.begin(), m_NamedGraphs.end(),
             std::back_inserter(ret),
-            [](const auto& pair) { return pair.second->getName(); });
+            [](const auto& pair) { return pair.second->getName(); }));
     return ret.getAsConstList();
 }
 
@@ -1401,7 +1401,7 @@ void SAL_CALL librdf_Repository::setStatementRDFa(
     }
         ::std::for_each(::comphelper::stl_begin(i_rPredicates),
             ::comphelper::stl_end(i_rPredicates),
-            [this, &i_xSubject, &xContent, &xXmlId](auto& predicate) { 
this->addStatementGraph( i_xSubject, predicate, xContent, xXmlId, true ); });
+            [this, &i_xSubject, &xContent, &xXmlId](auto& predicate) { 
this->addStatementGraph( i_xSubject, predicate, xContent, xXmlId, true ); }));
 }
 
 void SAL_CALL librdf_Repository::removeStatementRDFa(

Reply via email to