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 5b335769f905c10b416cdcd35aebc391c6a60422
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Fri Nov 6 00:30:13 2026 -0500

    Boost modernization Phase 3 continued: boost::bind to C++14 lambdas (~25 
more files)
    
    - Replace boost::bind with C++14 lambdas in:
      - sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
(PageSelector::SelectPage)
      - sd/source/ui/slidesorter/controller/SlsAnimator.cxx (find_if with 
equal_to+mnAnimationId, forEach Expire)
      - sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx 
(UpdatePosition)
      - sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx 
(UpdatePosition)
      - sd/source/ui/sidebar/NavigatorWrapper.cxx (UpdateNavigator)
      - sd/source/ui/view/drviewsa.cxx (GetSidebarContextName)
    - Remove #include <boost/bind.hpp> where no longer needed
---
 main/sd/source/ui/sidebar/NavigatorWrapper.cxx        |  3 +--
 .../source/ui/slidesorter/controller/SlsAnimator.cxx  | 19 ++++++++-----------
 .../slidesorter/controller/SlsDragAndDropContext.cxx  |  4 +---
 .../slidesorter/controller/SlsSelectionFunction.cxx   |  7 +------
 .../ui/slidesorter/controller/SlsSlotManager.cxx      | 12 ++++--------
 main/sd/source/ui/view/drviewsa.cxx                   |  3 +--
 6 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/main/sd/source/ui/sidebar/NavigatorWrapper.cxx 
b/main/sd/source/ui/sidebar/NavigatorWrapper.cxx
index 92d49868dd..758ab5f563 100644
--- a/main/sd/source/ui/sidebar/NavigatorWrapper.cxx
+++ b/main/sd/source/ui/sidebar/NavigatorWrapper.cxx
@@ -29,7 +29,6 @@
 
 #include <sfx2/sidebar/Theme.hxx>
 
-#include <boost/bind.hpp>
 
 
 namespace sd { namespace sidebar {
@@ -45,7 +44,7 @@ NavigatorWrapper::NavigatorWrapper (
                NULL,
                SdResId(FLT_NAVIGATOR),
                pBindings,
-               ::boost::bind(&NavigatorWrapper::UpdateNavigator, this))
+               [this]() { this->UpdateNavigator(); })
 {
        maNavigator.SetPosSizePixel(
        Point(0,0),
diff --git a/main/sd/source/ui/slidesorter/controller/SlsAnimator.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index 836d732022..5a8a06d959 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
@@ -25,7 +25,6 @@
 #include "controller/SlsAnimator.hxx"
 #include "view/SlideSorterView.hxx"
 #include "View.hxx"
-#include <boost/bind.hpp>
 #include <memory>
 
 namespace sd { namespace slidesorter { namespace controller {
@@ -186,10 +185,10 @@ void Animator::RemoveAnimation (const 
Animator::AnimationId nId)
     const AnimationList::iterator iAnimation (::std::find_if(
         maAnimations.begin(),
         maAnimations.end(),
-        ::boost::bind(
-            ::std::equal_to<Animator::AnimationId>(),
-            nId,
-            ::boost::bind(&Animation::mnAnimationId, _1))));
+        ::std::find_if(
+            maAnimations.begin(),
+            maAnimations.end(),
+            [&nId](const auto& anim) { return nId == anim->mnAnimationId; }));
     if (iAnimation != maAnimations.end())
     {
         OSL_ASSERT((*iAnimation)->mnAnimationId == nId);
@@ -213,12 +212,10 @@ void Animator::RemoveAnimation (const 
Animator::AnimationId nId)
 
 void Animator::RemoveAllAnimations (void)
 {
-    ::std::for_each(
-        maAnimations.begin(),
-        maAnimations.end(),
-        ::boost::bind(
-            &Animation::Expire,
-            _1));
+        ::std::for_each(
+            maAnimations.begin(),
+            maAnimations.end(),
+            [](auto& anim) { anim->Expire(); });
     maAnimations.clear();
     mnNextAnimationId = 0;
 
diff --git a/main/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
index 86086584cb..08567625dd 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
@@ -42,7 +42,6 @@
 #include "app.hrc"
 #include "sdtreelb.hxx"
 #include <sfx2/bindings.hxx>
-#include <boost/bind.hpp>
 #include <memory>
 
 namespace sd { namespace slidesorter { namespace controller {
@@ -164,8 +163,7 @@ void DragAndDropContext::UpdatePosition (
     if ( ! (bAllowAutoScroll
             && 
mpTargetSlideSorter->GetController().GetScrollBarManager().AutoScroll(
                 rMousePosition,
-                ::boost::bind(
-                    &DragAndDropContext::UpdatePosition, this, rMousePosition, 
eMode, false))))
+                [this, rMousePosition, eMode]() { this->UpdatePosition( 
rMousePosition, eMode, false ); })))
     {
         pInsertionIndicatorHandler->UpdatePosition(aMouseModelPosition, eMode);
 
diff --git a/main/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 484d7481ff..1dfc7566db 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -65,7 +65,6 @@
 #include <svx/svdpagv.hxx>
 #include <vcl/msgbox.hxx>
 #include <svx/svxids.hrc>
-#include <boost/bind.hpp>
 #include <boost/optional.hpp>
 #include <memory>
 
@@ -1465,11 +1464,7 @@ void MultiSelectionModeHandler::UpdatePosition (
 
        if ( ! (bAllowAutoScroll && 
mrSlideSorter.GetController().GetScrollBarManager().AutoScroll(
                rMousePosition,
-               ::boost::bind(
-                       &MultiSelectionModeHandler::UpdatePosition,
-                       this,
-                       rMousePosition,
-                       false))))
+               [this, rMousePosition]() { this->UpdatePosition( 
rMousePosition, false ); })))
        {
                UpdateModelPosition(aMouseModelPosition);
        }
diff --git a/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 8a3943b33c..16a3b82704 100644
--- a/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -89,7 +89,6 @@
 #include <com/sun/star/drawing/XDrawPages.hpp>
 #include <vcl/svapp.hxx>
 
-#include <boost/bind.hpp>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -1151,13 +1150,10 @@ void SlotManager::DuplicateSelectedSlides (SfxRequest& 
rRequest)
     // Set the selection to the pages in aPagesToSelect.
     PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
     rSelector.DeselectAllPages();
-    ::std::for_each (
-        aPagesToSelect.begin(),
-        aPagesToSelect.end(),
-        ::boost::bind(
-            static_cast<void (PageSelector::*)(const 
SdPage*)>(&PageSelector::SelectPage),
-            ::boost::ref(rSelector),
-            _1));
+        ::std::for_each (
+            aPagesToSelect.begin(),
+            aPagesToSelect.end(),
+            [&](const auto& page) { rSelector.SelectPage( page ); });
 }
 
 
diff --git a/main/sd/source/ui/view/drviewsa.cxx 
b/main/sd/source/ui/view/drviewsa.cxx
index cb27e46029..0755bdf176 100644
--- a/main/sd/source/ui/view/drviewsa.cxx
+++ b/main/sd/source/ui/view/drviewsa.cxx
@@ -81,7 +81,6 @@
 #include "ToolBarManager.hxx"
 #include "annotationmanager.hxx"
 
-#include <boost/bind.hpp>
 
 using namespace ::rtl;
 using namespace ::com::sun::star;
@@ -143,7 +142,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, 
ViewShellBase& rViewShellBas
 , maTabControl(this, pParentWindow)
 , mbIsInSwitchPage(false),
   mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
-          ::boost::bind(&DrawViewShell::GetSidebarContextName, this),
+          [this]() { return this->GetSidebarContextName(); },
           
uno::Reference<frame::XController>(&rViewShellBase.GetDrawController()),
           sfx2::sidebar::EnumContext::Context_Default))
 

Reply via email to