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 57baf382f28ee0d0eb2a820a57382498913aa26d
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Fri Nov 6 00:32:18 2026 -0500

    Boost modernization Phase 3 continued: boost::bind to C++14 lambdas (~20 
more files)
    
    - Replace boost::bind with C++14 lambdas in:
      - sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx (Layer::Validate, 
RepaintRectangle, Repaint, Resize, Dispose, ValidateRectangle, 
ILayerPainter::Paint)
      - sd/source/ui/slidesorter/view/SlsButtonBar.cxx 
(AnimationFunction::Blend, ApplyButtonAlphaChange, SetButtonAlphaAnimationId)
    - Remove #include <boost/bind.hpp> where no longer needed
---
 .../sd/source/ui/slidesorter/view/SlsButtonBar.cxx | 48 +++++++++++-----------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx 
b/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
index 263ac01aa3..2e42c7973c 100644
--- a/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
+++ b/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -49,7 +49,6 @@
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/numeric/ftools.hxx>
 #include <com/sun/star/presentation/XPresentation2.hpp>
-#include <boost/bind.hpp>
 #include <memory>
 
 using ::com::sun::star::uno::Any;
@@ -726,18 +725,18 @@ void ButtonBar::StartFadeAnimation (
 
        // Prepare the blending functors that translate [0,1] animation
        // times into alpha values of buttons and button bar.
-       const ::boost::function<double(double)> aButtonBlendFunctor (
-               ::boost::bind(
-                       controller::AnimationFunction::Blend,
-                       nCurrentButtonAlpha,
-                       nTargetAlpha,
-                       ::boost::bind(controller::AnimationFunction::Linear, 
_1)));
-       const ::boost::function<double(double)> aButtonBarBlendFunctor (
-               ::boost::bind(
-                       controller::AnimationFunction::Blend,
-                       nCurrentButtonBarAlpha,
-                       nTargetAlpha,
-                       ::boost::bind(controller::AnimationFunction::Linear, 
_1)));
+       const std::function<double(double)> aButtonBlendFunctor (
+               [nCurrentButtonAlpha, nTargetAlpha](double t) {
+                       return controller::AnimationFunction::Blend(
+                               nCurrentButtonAlpha, nTargetAlpha,
+                               controller::AnimationFunction::Linear( t ));
+               });
+       const std::function<double(double)> aButtonBarBlendFunctor (
+               [nCurrentButtonBarAlpha, nTargetAlpha](double t) {
+                       return controller::AnimationFunction::Blend(
+                               nCurrentButtonBarAlpha, nTargetAlpha,
+                               controller::AnimationFunction::Linear( t ));
+               });
 
        // Delay the fade in a little bit when the buttons are not visible at
        // all so that we do not leave a trail of half-visible buttons when the
@@ -753,19 +752,20 @@ void ButtonBar::StartFadeAnimation (
                        : Theme::Integer_ButtonFadeOutDuration));
        pDescriptor->GetVisualState().SetButtonAlphaAnimationId(
                mrSlideSorter.GetController().GetAnimator()->AddAnimation(
-                       ::boost::bind(
-                               
controller::AnimationFunction::ApplyButtonAlphaChange,
-                               pDescriptor,
-                               ::boost::ref(mrSlideSorter.GetView()),
-                               ::boost::bind(aButtonBlendFunctor, _1),
-                               ::boost::bind(aButtonBarBlendFunctor, _1)),
+                       [pDescriptor, &mrSlideSorter, &aButtonBlendFunctor, 
&aButtonBarBlendFunctor](double t) {
+                               return 
controller::AnimationFunction::ApplyButtonAlphaChange(
+                                       pDescriptor,
+                                       mrSlideSorter.GetView(),
+                                       aButtonBlendFunctor( t ),
+                                       aButtonBarBlendFunctor( t ));
+                       },
                        nDelay,
                        nDuration,
-                       ::boost::bind(
-                               &model::VisualState::SetButtonAlphaAnimationId,
-                               ::boost::ref(pDescriptor->GetVisualState()),
-                               controller::Animator::NotAnAnimationId)
-                       ));
+                       [&pDescriptor]() {
+                               
pDescriptor->GetVisualState().SetButtonAlphaAnimationId(
+                                       controller::Animator::NotAnAnimationId);
+                       }
+               ));
 }
 
 

Reply via email to