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 64abf1f0eb7c864f39fd1787820c9739370eae49
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Fri Nov 6 00:28:50 2026 -0500

    Boost modernization Phase 3 continued: boost::bind to C++14 lambdas (~5 
more files)
    
    - Replace boost::bind with C++14 lambdas in:
      - slideshow/source/engine/unoviewcontainer.cxx (find_if with 
equal_to+getUnoView x2, count_if with equal_to+getUnoView)
    - Remove #include <boost/bind.hpp> where no longer needed
---
 main/slideshow/source/engine/unoviewcontainer.cxx | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/main/slideshow/source/engine/unoviewcontainer.cxx 
b/main/slideshow/source/engine/unoviewcontainer.cxx
index 521bc582e9..143328dd53 100644
--- a/main/slideshow/source/engine/unoviewcontainer.cxx
+++ b/main/slideshow/source/engine/unoviewcontainer.cxx
@@ -27,7 +27,6 @@
 #include <canvas/debug.hxx>
 #include <unoviewcontainer.hxx>
 
-#include <boost/bind.hpp>
 
 #include <algorithm>
 
@@ -54,12 +53,7 @@ namespace slideshow
             uno::Reference<presentation::XSlideShowView> rUnoView = 
rView->getUnoView();
             if( ::std::find_if( maViews.begin(),
                                 aEnd,
-                                ::boost::bind(
-                                    ::std::equal_to< uno::Reference< 
presentation::XSlideShowView > >(),
-                                    ::boost::cref( rUnoView ),
-                                    ::boost::bind(
-                                        &UnoView::getUnoView,
-                                        _1 ) ) ) != aEnd )
+                                [&rUnoView](const auto& view) { return 
rUnoView == view->getUnoView(); } ) != aEnd )
             {
                 // yes, nothing to do
                 return false;
@@ -80,12 +74,7 @@ namespace slideshow
             // added in the first place?
             if( (aIter=::std::find_if( maViews.begin(),
                                        aEnd,
-                                       ::boost::bind(
-                                           ::std::equal_to< uno::Reference< 
presentation::XSlideShowView > >(),
-                                           ::boost::cref( xView ),
-                                           ::boost::bind(
-                                               &UnoView::getUnoView,
-                                               _1 ) ) ) ) == aEnd )
+                                       [&xView](const auto& view) { return 
xView == view->getUnoView(); } ) ) == aEnd )
             {
                 // nope, nothing to do
                 return UnoViewSharedPtr();
@@ -95,12 +84,7 @@ namespace slideshow
                 ::std::count_if(
                     maViews.begin(),
                     aEnd,
-                    ::boost::bind(
-                        ::std::equal_to< uno::Reference< 
presentation::XSlideShowView > >(),
-                        ::boost::cref( xView ),
-                        ::boost::bind(
-                            &UnoView::getUnoView,
-                            _1 ))) == 1,
+                    [&xView](const auto& view) { return xView == 
view->getUnoView(); } )) == 1,
                 "UnoViewContainer::removeView(): View was added multiple 
times" );
 
             UnoViewSharedPtr pView( *aIter );

Reply via email to