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 5115fb3e2ed655b088815c1ef167beed7c50000c Author: Pedro F. Giffuni <[email protected]> AuthorDate: Fri Nov 6 00:23:20 2026 -0500 Boost modernization Phase 3 continued: boost::bind to C++14 lambdas (~15 more files) - Replace boost::bind with C++14 lambdas in: - slideshow/source/engine/shapes/viewshape.cxx (find_if with equal_to+getDestinationCanvas) - slideshow/source/engine/shapes/drawshapesubsetting.cxx (updateSubsetBounds) - slideshow/source/engine/effectrewinder.cxx (asynchronousRewind x2) - slideshow/source/engine/slideview.cxx (notifyViewChanged, notifyViewClobbered) - Remove #include <boost/bind.hpp> where no longer needed --- main/slideshow/source/engine/effectrewinder.cxx | 14 ++------------ .../slideshow/source/engine/shapes/drawshapesubsetting.cxx | 9 +++------ main/slideshow/source/engine/shapes/viewshape.cxx | 8 +------- main/slideshow/source/engine/slideview.cxx | 9 ++------- 4 files changed, 8 insertions(+), 32 deletions(-) diff --git a/main/slideshow/source/engine/effectrewinder.cxx b/main/slideshow/source/engine/effectrewinder.cxx index 393df7d583..4f543060ef 100644 --- a/main/slideshow/source/engine/effectrewinder.cxx +++ b/main/slideshow/source/engine/effectrewinder.cxx @@ -235,12 +235,7 @@ void EffectRewinder::skipAllMainSequenceEffects (void) const int nTotalMainSequenceEffectCount (countMainSequenceEffects()); mpAsynchronousRewindEvent = makeEvent( - ::boost::bind( - &EffectRewinder::asynchronousRewind, - this, - nTotalMainSequenceEffectCount, - false, - ::boost::function<void(void)>()), + [this, nTotalMainSequenceEffectCount]() { this->asynchronousRewind( nTotalMainSequenceEffectCount, false, [](){} ); }, "EffectRewinder::asynchronousRewind"); mrEventQueue.addEvent(mpAsynchronousRewindEvent); } @@ -374,12 +369,7 @@ void EffectRewinder::asynchronousRewind ( if (rSlideRewindFunctor) rSlideRewindFunctor(); mpAsynchronousRewindEvent = makeEvent( - ::boost::bind( - &EffectRewinder::asynchronousRewind, - this, - nEffectCount, - false, - rSlideRewindFunctor), + [this, nEffectCount, &rSlideRewindFunctor]() { this->asynchronousRewind( nEffectCount, false, rSlideRewindFunctor ); }, "EffectRewinder::asynchronousRewind"); mrEventQueue.addEvent(mpAsynchronousRewindEvent); } diff --git a/main/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/main/slideshow/source/engine/shapes/drawshapesubsetting.cxx index cb3f0e302f..a5a0a10cc5 100644 --- a/main/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/main/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -39,7 +39,6 @@ #include "drawshapesubsetting.hxx" #include "drawshape.hxx" -#include <boost/bind.hpp> #include <algorithm> #include <functional> @@ -431,11 +430,9 @@ namespace slideshow // the whole shape set // determine new subset range - ::std::for_each( maSubsetShapes.begin(), - maSubsetShapes.end(), - ::boost::bind(&DrawShapeSubsetting::updateSubsetBounds, - this, - _1 ) ); + ::std::for_each( maSubsetShapes.begin(), + maSubsetShapes.end(), + [this](auto& shape) { this->updateSubsetBounds( shape ); } ); updateSubsets(); diff --git a/main/slideshow/source/engine/shapes/viewshape.cxx b/main/slideshow/source/engine/shapes/viewshape.cxx index 642b7eff69..0d1dd8d905 100644 --- a/main/slideshow/source/engine/shapes/viewshape.cxx +++ b/main/slideshow/source/engine/shapes/viewshape.cxx @@ -54,7 +54,6 @@ #include "viewshape.hxx" #include "tools.hxx" -#include <boost/bind.hpp> using namespace ::com::sun::star; @@ -762,12 +761,7 @@ namespace slideshow // already there? if( (aIter=::std::find_if( maRenderers.begin(), aEnd, - ::boost::bind( - ::std::equal_to< ::cppcanvas::CanvasSharedPtr >(), - ::boost::cref( rDestinationCanvas ), - ::boost::bind( - &RendererCacheEntry::getDestinationCanvas, - _1 ) ) ) ) == aEnd ) + [&rDestinationCanvas](const auto& entry) { return rDestinationCanvas == entry->getDestinationCanvas(); } ) ) == aEnd ) { if( maRenderers.size() >= MAX_RENDER_CACHE_ENTRIES ) { diff --git a/main/slideshow/source/engine/slideview.cxx b/main/slideshow/source/engine/slideview.cxx index 1c0f03ea94..fed10458fa 100644 --- a/main/slideshow/source/engine/slideview.cxx +++ b/main/slideshow/source/engine/slideview.cxx @@ -62,7 +62,6 @@ #include <com/sun/star/presentation/XSlideShow.hpp> #include <boost/noncopyable.hpp> -#include <boost/bind.hpp> #include <memory> #include <vector> @@ -1069,10 +1068,7 @@ void SlideView::modified( const lang::EventObject& /*aEvent*/ ) // notify view change. Don't call EventMultiplexer directly, this // might not be the main thread! mrEventQueue.addEvent( - makeEvent( boost::bind( (bool (EventMultiplexer::*)( - const uno::Reference<presentation::XSlideShowView>&)) - &EventMultiplexer::notifyViewChanged, - boost::ref(mrEventMultiplexer), mxView ), + makeEvent( [&]() { mrEventMultiplexer.notifyViewChanged( mxView ); }, "EventMultiplexer::notifyViewChanged")); } @@ -1086,8 +1082,7 @@ void SlideView::windowPaint( const awt::PaintEvent& /*e*/ ) // notify view clobbering. Don't call EventMultiplexer directly, // this might not be the main thread! mrEventQueue.addEvent( - makeEvent( boost::bind( &EventMultiplexer::notifyViewClobbered, - boost::ref(mrEventMultiplexer), mxView ), + makeEvent( [&]() { mrEventMultiplexer.notifyViewClobbered( mxView ); }, "EventMultiplexer::notifyViewClobbered") ); }
