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 a1fed0aa68c953eeb7ef8fe66d4eff6aa85f18b4 Author: Pedro F. Giffuni <[email protected]> AuthorDate: Fri Nov 6 00:18:50 2026 -0500 Boost modernization Phase 3 continued: boost::bind to C++14 lambdas (~10 more files) - Replace boost::bind with C++14 lambdas in: - slideshow/source/engine/transitions/slidechangebase.cxx (viewAdded, find_if, remove_if) - slideshow/source/engine/transitions/slidetransitionfactory.cxx (TransitionViewPair::update) - slideshow/source/engine/transitions/combtransition.cxx (CombTransition::renderComb) - Remove #include <boost/bind.hpp> where no longer needed --- .../source/engine/transitions/combtransition.cxx | 6 +----- .../source/engine/transitions/slidechangebase.cxx | 17 +++-------------- .../engine/transitions/slidetransitionfactory.cxx | 4 +--- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/main/slideshow/source/engine/transitions/combtransition.cxx b/main/slideshow/source/engine/transitions/combtransition.cxx index db06193694..664c04bba5 100644 --- a/main/slideshow/source/engine/transitions/combtransition.cxx +++ b/main/slideshow/source/engine/transitions/combtransition.cxx @@ -34,7 +34,6 @@ #include "combtransition.hxx" -#include <boost/bind.hpp> namespace slideshow { @@ -178,10 +177,7 @@ bool CombTransition::operator()( double t ) { std::for_each( beginViews(), endViews(), - boost::bind( &CombTransition::renderComb, - this, - t, - _1 )); + [this, t](auto& view) { this->renderComb( t, view ); })); getScreenUpdater().notifyUpdate(); diff --git a/main/slideshow/source/engine/transitions/slidechangebase.cxx b/main/slideshow/source/engine/transitions/slidechangebase.cxx index 21ed3e3a43..3e782814d7 100644 --- a/main/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/main/slideshow/source/engine/transitions/slidechangebase.cxx @@ -36,7 +36,6 @@ #include "slidechangebase.hxx" #include "tools.hxx" -#include <boost/bind.hpp> #include <algorithm> using namespace com::sun::star; @@ -196,9 +195,7 @@ void SlideChangeBase::prefetch( const AnimatableShapeSharedPtr&, // init views and create slide bitmaps std::for_each( mrViewContainer.begin(), mrViewContainer.end(), - boost::bind( &SlideChangeBase::viewAdded, - this, - _1 )); + [this](auto& view) { this->viewAdded( view ); } ); mbPrefetched = true; } @@ -418,11 +415,7 @@ void SlideChangeBase::viewRemoved( const UnoViewSharedPtr& rView ) std::remove_if( maViewData.begin(), maViewData.end(), - boost::bind( - std::equal_to<UnoViewSharedPtr>(), - rView, - // select view: - boost::bind( &ViewEntry::getView, _1 ))), + [&rView](const auto& entry) { return rView == entry->getView(); })), maViewData.end() ); } @@ -437,11 +430,7 @@ void SlideChangeBase::viewChanged( const UnoViewSharedPtr& rView ) std::find_if( maViewData.begin(), maViewData.end(), - boost::bind( - std::equal_to<UnoViewSharedPtr>(), - rView, - // select view: - boost::bind( &ViewEntry::getView, _1 ) ))); + [&rView](const auto& entry) { return rView == entry->getView(); } ))); OSL_ASSERT( aModifiedEntry != maViewData.end() ); if( aModifiedEntry == maViewData.end() ) diff --git a/main/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/main/slideshow/source/engine/transitions/slidetransitionfactory.cxx index f2e6f7d4b2..8a5be2b75b 100644 --- a/main/slideshow/source/engine/transitions/slidetransitionfactory.cxx +++ b/main/slideshow/source/engine/transitions/slidetransitionfactory.cxx @@ -52,7 +52,6 @@ #include "combtransition.hxx" #include "tools.hxx" -#include <boost/bind.hpp> /*************************************************** @@ -198,8 +197,7 @@ public: { std::for_each(maTransitions.begin(), maTransitions.end(), - boost::bind( &TransitionViewPair::update, - _1, t) ); + [&t](auto& pair) { pair.update( t ); } ); return true; }
