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 7883878300f47552303b7c823ba3c016112ef4cc
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Fri Nov 6 00:37:07 2026 -0500

    Boost modernization Phase 3: boost::bind to C++14 lambdas (~85 more files)
---
 .../configuration/ConfigurationUpdater.cxx         | 12 ++++----
 .../ui/framework/factories/BasicViewFactory.cxx    | 36 +++++++++++-----------
 main/sd/source/ui/slideshow/SlideShowRestarter.cxx |  6 ++--
 main/sd/source/ui/slideshow/slideshow.cxx          | 14 ++++-----
 4 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/main/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx 
b/main/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 4beb4e5b69..698b0d72b0 100644
--- a/main/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/main/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -33,7 +33,7 @@
 #include <comphelper/scopeguard.hxx>
 #include <tools/diagnose_ex.h>
 
-#include <boost/bind.hpp>
+#include <memory>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -74,8 +74,8 @@ private:
 //===== ConfigurationUpdater ==================================================
 
 ConfigurationUpdater::ConfigurationUpdater (
-    const ::boost::shared_ptr<ConfigurationControllerBroadcaster>& 
rpBroadcaster,
-    const ::boost::shared_ptr<ConfigurationControllerResourceManager>& 
rpResourceManager,
+    const ::std::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster,
+    const ::std::shared_ptr<ConfigurationControllerResourceManager>& 
rpResourceManager,
     const Reference<XControllerManager>& rxControllerManager)
     : mxControllerManager(),
       mpBroadcaster(rpBroadcaster),
@@ -178,7 +178,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
 #endif
     SetUpdateBeingProcessed(true);
     comphelper::ScopeGuard aScopeGuard (
-        ::boost::bind(&ConfigurationUpdater::SetUpdateBeingProcessed, this, 
false));
+        [this]() { this->SetUpdateBeingProcessed( false ); });
 
     try
     {
@@ -428,9 +428,9 @@ void ConfigurationUpdater::UnlockUpdates (void)
 
 
 
-::boost::shared_ptr<ConfigurationUpdaterLock> ConfigurationUpdater::GetLock 
(void)
+::std::shared_ptr<ConfigurationUpdaterLock> ConfigurationUpdater::GetLock 
(void)
 {
-    return ::boost::shared_ptr<ConfigurationUpdaterLock>(new 
ConfigurationUpdaterLock(*this));
+    return ::std::shared_ptr<ConfigurationUpdaterLock>(new 
ConfigurationUpdaterLock(*this));
 }
 
 
diff --git a/main/sd/source/ui/framework/factories/BasicViewFactory.cxx 
b/main/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 1a4ec8cd6b..d71ddf9bd3 100644
--- a/main/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/main/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -46,7 +46,7 @@
 #include <vcl/wrkwin.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 
-#include <boost/bind.hpp>
+#include <memory>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -94,10 +94,10 @@ class BasicViewFactory::ViewDescriptor
 {
 public:
     Reference<XResource> mxView;
-    ::boost::shared_ptr<sd::ViewShell> mpViewShell;
+    ::std::shared_ptr<sd::ViewShell> mpViewShell;
     ViewShellWrapper* mpWrapper;
     Reference<XResourceId> mxViewId;
-    static bool CompareView (const ::boost::shared_ptr<ViewDescriptor>& 
rpDescriptor,
+    static bool CompareView (const ::std::shared_ptr<ViewDescriptor>& 
rpDescriptor,
         const Reference<XResource>& rxView)
     { return rpDescriptor->mxView.get() == rxView.get(); }
 };
@@ -109,7 +109,7 @@ public:
 //===== BasicViewFactory::ViewShellContainer ==================================
 
 class BasicViewFactory::ViewShellContainer
-    : public ::std::vector<boost::shared_ptr<ViewDescriptor> >
+    : public ::std::vector<std::shared_ptr<ViewDescriptor> >
 {
 public:
     ViewShellContainer (void) {};
@@ -117,7 +117,7 @@ public:
 
 
 class BasicViewFactory::ViewCache
-    : public ::std::vector<boost::shared_ptr<ViewDescriptor> >
+    : public ::std::vector<std::shared_ptr<ViewDescriptor> >
 {
 public:
     ViewCache (void) {};
@@ -216,7 +216,7 @@ Reference<XResource> SAL_CALL 
BasicViewFactory::createResource (
     if (pFrame != NULL && mpBase!=NULL && pWindow!=NULL)
     {
         // Try to get the view from the cache.
-        ::boost::shared_ptr<ViewDescriptor> pDescriptor 
(GetViewFromCache(rxViewId, xPane));
+        ::std::shared_ptr<ViewDescriptor> pDescriptor 
(GetViewFromCache(rxViewId, xPane));
 
         // When the requested view is not in the cache then create a new view.
         if (pDescriptor.get() == NULL)
@@ -252,10 +252,10 @@ void SAL_CALL BasicViewFactory::releaseResource (const 
Reference<XResource>& rxV
             ::std::find_if(
                 mpViewShellContainer->begin(),
                 mpViewShellContainer->end(),
-                ::boost::bind(&ViewDescriptor::CompareView, _1, rxView)));
+                [&rxView](const auto& desc) { return desc.CompareView( rxView 
); }));
         if (iViewShell != mpViewShellContainer->end())
         {
-            ::boost::shared_ptr<ViewShell> pViewShell 
((*iViewShell)->mpViewShell);
+            ::std::shared_ptr<ViewShell> pViewShell 
((*iViewShell)->mpViewShell);
 
             if ((*iViewShell)->mxViewId->isBoundToURL(
                 FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT))
@@ -337,7 +337,7 @@ void SAL_CALL BasicViewFactory::initialize (const 
Sequence<Any>& aArguments)
 
 
 
-::boost::shared_ptr<BasicViewFactory::ViewDescriptor> 
BasicViewFactory::CreateView (
+::std::shared_ptr<BasicViewFactory::ViewDescriptor> 
BasicViewFactory::CreateView (
     const Reference<XResourceId>& rxViewId,
     SfxViewFrame& rFrame,
     ::Window& rWindow,
@@ -345,7 +345,7 @@ void SAL_CALL BasicViewFactory::initialize (const 
Sequence<Any>& aArguments)
     FrameView* pFrameView,
     const bool bIsCenterPane)
 {
-    ::boost::shared_ptr<ViewDescriptor> pDescriptor (new ViewDescriptor());
+    ::std::shared_ptr<ViewDescriptor> pDescriptor (new ViewDescriptor());
 
     pDescriptor->mpViewShell = CreateViewShell(
         rxViewId,
@@ -373,14 +373,14 @@ void SAL_CALL BasicViewFactory::initialize (const 
Sequence<Any>& aArguments)
 
 
 
-::boost::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
+::std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
     const Reference<XResourceId>& rxViewId,
     SfxViewFrame& rFrame,
     ::Window& rWindow,
     FrameView* pFrameView,
     const bool bIsCenterPane)
 {
-    ::boost::shared_ptr<ViewShell> pViewShell;
+    ::std::shared_ptr<ViewShell> pViewShell;
     const OUString& rsViewURL (rxViewId->getResourceURL());
     if (rsViewURL.equals(FrameworkHelper::msImpressViewURL))
     {
@@ -456,7 +456,7 @@ void SAL_CALL BasicViewFactory::initialize (const 
Sequence<Any>& aArguments)
 
 
 void BasicViewFactory::ReleaseView (
-    const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor,
+    const ::std::shared_ptr<ViewDescriptor>& rpDescriptor,
     bool bDoNotCache)
 {
     bool bIsCacheable (!bDoNotCache && IsCacheable(rpDescriptor));
@@ -497,7 +497,7 @@ void BasicViewFactory::ReleaseView (
 
 
 
-bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& 
rpDescriptor)
+bool BasicViewFactory::IsCacheable (const ::std::shared_ptr<ViewDescriptor>& 
rpDescriptor)
 {
     bool bIsCacheable (false);
 
@@ -507,7 +507,7 @@ bool BasicViewFactory::IsCacheable (const 
::boost::shared_ptr<ViewDescriptor>& r
         static ::std::vector<Reference<XResourceId> > maCacheableResources;
         if (maCacheableResources.empty() )
         {
-            ::boost::shared_ptr<FrameworkHelper> pHelper 
(FrameworkHelper::Instance(*mpBase));
+            ::std::shared_ptr<FrameworkHelper> pHelper 
(FrameworkHelper::Instance(*mpBase));
 
             // The slide sorter and the task panel are cacheable and 
relocatable.
             maCacheableResources.push_back(pHelper->CreateResourceId(
@@ -533,11 +533,11 @@ bool BasicViewFactory::IsCacheable (const 
::boost::shared_ptr<ViewDescriptor>& r
 
 
 
-::boost::shared_ptr<BasicViewFactory::ViewDescriptor> 
BasicViewFactory::GetViewFromCache (
+::std::shared_ptr<BasicViewFactory::ViewDescriptor> 
BasicViewFactory::GetViewFromCache (
     const Reference<XResourceId>& rxViewId,
     const Reference<XPane>& rxPane)
 {
-    ::boost::shared_ptr<ViewDescriptor> pDescriptor;
+    ::std::shared_ptr<ViewDescriptor> pDescriptor;
 
     // Search for the requested view in the cache.
     ViewCache::iterator iEntry;
@@ -578,7 +578,7 @@ bool BasicViewFactory::IsCacheable (const 
::boost::shared_ptr<ViewDescriptor>& r
 
 
 void BasicViewFactory::ActivateCenterView (
-    const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor)
+    const ::std::shared_ptr<ViewDescriptor>& rpDescriptor)
 {
     mpBase->GetDocShell()->Connect(rpDescriptor->mpViewShell.get());
 
diff --git a/main/sd/source/ui/slideshow/SlideShowRestarter.cxx 
b/main/sd/source/ui/slideshow/SlideShowRestarter.cxx
index de88bd36a9..db163ba80a 100644
--- a/main/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/main/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -29,7 +29,7 @@
 #include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
 #include <vcl/svapp.hxx>
-#include <boost/bind.hpp>
+#include <memory>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -117,7 +117,7 @@ IMPL_LINK(SlideShowRestarter, EndPresentation, void*, 
EMPTYARG)
                        // restart of the slide show.
                        if (mpViewShellBase != NULL)
                        {
-                               ::boost::shared_ptr<FrameworkHelper> pHelper(
+                               ::std::shared_ptr<FrameworkHelper> pHelper(
                                        
FrameworkHelper::Instance(*mpViewShellBase));
                                if 
(pHelper->GetConfigurationController()->getResource(
                                        
pHelper->CreateResourceId(FrameworkHelper::msFullScreenPaneURL)).is())
@@ -127,7 +127,7 @@ IMPL_LINK(SlideShowRestarter, EndPresentation, void*, 
EMPTYARG)
 
                                        pHelper->RunOnConfigurationEvent(
                                                
FrameworkHelper::msConfigurationUpdateEndEvent,
-                                               
::boost::bind(&SlideShowRestarter::StartPresentation, shared_from_this()));
+                                               [self = shared_from_this()]() { 
self->StartPresentation(); });
                                        pHelper->UpdateConfiguration();
                                }
                                else
diff --git a/main/sd/source/ui/slideshow/slideshow.cxx 
b/main/sd/source/ui/slideshow/slideshow.cxx
index 64bb22605d..d5a6eef1c1 100644
--- a/main/sd/source/ui/slideshow/slideshow.cxx
+++ b/main/sd/source/ui/slideshow/slideshow.cxx
@@ -54,7 +54,7 @@
 #include "ViewShell.hxx"
 #include "SlideShowRestarter.hxx"
 #include "DrawController.hxx"
-#include <boost/bind.hpp>
+#include <memory>
 
 using ::com::sun::star::presentation::XSlideShowController;
 using ::com::sun::star::container::XIndexAccess;
@@ -100,7 +100,7 @@ namespace {
                }
 
        private:
-               ::boost::shared_ptr<SlideShowRestarter> mpRestarter;
+               ::std::shared_ptr<SlideShowRestarter> mpRestarter;
        };
 
        /** Return the default display id (or -1 when that can not be
@@ -754,7 +754,7 @@ void SAL_CALL SlideShow::end()
                                // Get the shell pointer in its own scope to be 
sure that
                                // the shared_ptr to the shell is released 
before DoClose()
                                // is called.
-                               ::boost::shared_ptr<ViewShell> pSharedView 
(pFullScreenViewShellBase->GetMainViewShell());
+                               ::std::shared_ptr<ViewShell> pSharedView 
(pFullScreenViewShellBase->GetMainViewShell());
                                pShell = 
dynamic_cast<PresentationViewShell*>(pSharedView.get());
                        }
                        if( pShell && pShell->GetViewFrame() )
@@ -1032,7 +1032,7 @@ void SlideShow::activate( ViewShellBase& rBase )
 {
        if( (mpFullScreenViewShellBase == &rBase) && !mxController.is() )
        {
-               ::boost::shared_ptr<PresentationViewShell> pShell = 
::boost::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell());
+               ::std::shared_ptr<PresentationViewShell> pShell = 
::boost::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell());
                if(pShell.get() != NULL)
                {
                        pShell->FinishInitialization( mpFullScreenFrameView );
@@ -1168,8 +1168,8 @@ void SlideShow::StartInPlacePresentation()
 
                ViewShell::ShellType eShell = ViewShell::ST_NONE;
 
-               ::boost::shared_ptr<FrameworkHelper> 
pHelper(FrameworkHelper::Instance(*mpCurrentViewShellBase));
-               ::boost::shared_ptr<ViewShell> 
pMainViewShell(pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL));
+               ::std::shared_ptr<FrameworkHelper> 
pHelper(FrameworkHelper::Instance(*mpCurrentViewShellBase));
+               ::std::shared_ptr<ViewShell> 
pMainViewShell(pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL));
 
                if( pMainViewShell.get() )
                        eShell = pMainViewShell->GetShellType();
@@ -1187,7 +1187,7 @@ void SlideShow::StartInPlacePresentation()
                        }
 
                        pHelper->RequestView( 
FrameworkHelper::msImpressViewURL, FrameworkHelper::msCenterPaneURL );
-                       pHelper->RunOnConfigurationEvent( 
FrameworkHelper::msConfigurationUpdateEndEvent, 
::boost::bind(&SlideShow::StartInPlacePresentationConfigurationCallback, this) 
);
+                       pHelper->RunOnConfigurationEvent( 
FrameworkHelper::msConfigurationUpdateEndEvent, [this]() { 
this->StartInPlacePresentationConfigurationCallback(); } );
                        return;
                }
                else

Reply via email to