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 b32caa90121169659ab4ac7d313385a7423b8495
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Fri Nov 6 00:14:36 2026 -0500

    Boost modernization Phase 3 continued: boost::bind to C++14 lambdas (~40 
more files)
    
    - Replace boost::bind with C++14 lambdas in:
      - vcl/aqua/source/window/salframe.cxx (22 
forwardToMainThread/callOnMainThread calls)
      - vcl/aqua/source/window/salmenu.cxx (20 
forwardToMainThread/callOnMainThread calls)
      - vcl/aqua/source/app/salinst.cxx (2 forwardToMainThread/callOnMainThread 
calls)
      - vcl/inc/aqua/salinst.h (1 runOnMainThread call in template)
    - Remove #include <boost/bind.hpp> where no longer needed
---
 main/vcl/aqua/source/app/salinst.cxx     |  4 +--
 main/vcl/aqua/source/window/salframe.cxx | 44 ++++++++++++++++----------------
 main/vcl/aqua/source/window/salmenu.cxx  | 40 ++++++++++++++---------------
 main/vcl/inc/aqua/salinst.h              |  3 +--
 4 files changed, 45 insertions(+), 46 deletions(-)

diff --git a/main/vcl/aqua/source/app/salinst.cxx 
b/main/vcl/aqua/source/app/salinst.cxx
index 1d2288e3f3..a742b8ee10 100644
--- a/main/vcl/aqua/source/app/salinst.cxx
+++ b/main/vcl/aqua/source/app/salinst.cxx
@@ -1009,7 +1009,7 @@ void AquaSalInstance::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
 bool AquaSalInstance::AnyInput( sal_uInt16 nType )
 {
     if( ! isNSAppThread() )
-        return callOnMainThread< bool >( boost::bind( 
&AquaSalInstance::AnyInput, this, nType ) );
+        return callOnMainThread< bool >( [this, nType]() { return 
this->AnyInput( nType ); } );
 
     if( nType & INPUT_APPEVENT )
     {
@@ -1074,7 +1074,7 @@ SalFrame* AquaSalInstance::CreateFrame( SalFrame* 
pParent, sal_uLong nSalFrameSt
 
 void AquaSalInstance::DestroyFrame( SalFrame* pFrame )
 {
-    if( forwardToMainThread( boost::bind( &AquaSalInstance::DestroyFrame, 
this, pFrame ) ) )
+    if( forwardToMainThread( [this, pFrame]() { this->DestroyFrame( pFrame ); 
} ) )
         return;
        delete pFrame;
 }
diff --git a/main/vcl/aqua/source/window/salframe.cxx 
b/main/vcl/aqua/source/window/salframe.cxx
index af99c4c153..3145b3773d 100644
--- a/main/vcl/aqua/source/window/salframe.cxx
+++ b/main/vcl/aqua/source/window/salframe.cxx
@@ -301,7 +301,7 @@ sal_Bool AquaSalFrame::PostEvent( void *pData )
 // -----------------------------------------------------------------------
 void AquaSalFrame::SetTitle(const XubString& rTitle)
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetTitle, this, boost::cref( rTitle ) ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetTitle( rTitle ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -348,7 +348,7 @@ void AquaSalFrame::SetIcon( sal_uInt16 )
 
 void AquaSalFrame::SetRepresentedURL( const rtl::OUString& i_rDocURL )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetRepresentedURL, this, boost::cref( i_rDocURL ) ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetRepresentedURL( i_rDocURL ); } ) )
         return;
 
     // #i113170# may not be the main thread if called from UNO API
@@ -424,7 +424,7 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect )
 
 void AquaSalFrame::Show(sal_Bool bVisible, sal_Bool bNoActivate)
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::Show, this, bVisible, bNoActivate ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->Show( bVisible, bNoActivate ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -496,7 +496,7 @@ void AquaSalFrame::Enable( sal_Bool )
 
 void AquaSalFrame::SetMinClientSize( long nWidth, long nHeight )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetMinClientSize, this, nWidth, nHeight ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetMinClientSize( nWidth, nHeight ); } ) )
         return;
 
     // #i113170# may not be the main thread if called from UNO API
@@ -524,7 +524,7 @@ void AquaSalFrame::SetMinClientSize( long nWidth, long 
nHeight )
 
 void AquaSalFrame::SetMaxClientSize( long nWidth, long nHeight )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetMaxClientSize, this, nWidth, nHeight ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetMaxClientSize( nWidth, nHeight ); } ) )
         return;
 
     // #i113170# may not be the main thread if called from UNO API
@@ -556,7 +556,7 @@ void AquaSalFrame::SetMaxClientSize( long nWidth, long 
nHeight )
 
 void AquaSalFrame::SetClientSize( long nWidth, long nHeight )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetClientSize, this, nWidth, nHeight ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetClientSize( nWidth, nHeight ); } ) )
         return;
 
     // #i113170# may not be the main thread if called from UNO API
@@ -594,7 +594,7 @@ void AquaSalFrame::GetClientSize( long& rWidth, long& 
rHeight )
 
 void AquaSalFrame::SetWindowState( const SalFrameState* pState )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetWindowState, this, pState ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetWindowState( pState ); } ) )
         return;
 
     // #i113170# may not be the main thread if called from UNO API
@@ -675,7 +675,7 @@ sal_Bool AquaSalFrame::GetWindowState( SalFrameState* 
pState )
 {
     AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
     if( ! pInst->isNSAppThread() )
-        return pInst->callOnMainThread< sal_Bool >( boost::bind( 
&AquaSalFrame::GetWindowState, this, pState ) );
+        return pInst->callOnMainThread< sal_Bool >( [this]&{ return 
this->GetWindowState( pState ); } );
 
     if ( !mpNSWindow )
         return FALSE;
@@ -717,7 +717,7 @@ sal_Bool AquaSalFrame::GetWindowState( SalFrameState* 
pState )
 
 void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetScreenNumber, this, nScreen ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetScreenNumber( nScreen ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -757,7 +757,7 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen)
 
 void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::ShowFullScreen, this, bFullScreen, nDisplay ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->ShowFullScreen( bFullScreen, nDisplay ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -873,7 +873,7 @@ public:
 
 void AquaSalFrame::StartPresentation( sal_Bool bStart )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::StartPresentation, this, bStart ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->StartPresentation( bStart ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -908,7 +908,7 @@ void AquaSalFrame::SetAlwaysOnTop( sal_Bool )
 
 void AquaSalFrame::ToTop(sal_uInt16 nFlags)
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::ToTop, this, nFlags ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->ToTop( nFlags ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -973,7 +973,7 @@ NSCursor* AquaSalFrame::getCurrentCursor() const
 
 void AquaSalFrame::SetPointer( PointerStyle ePointerStyle )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetPointer, this, ePointerStyle ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetPointer( ePointerStyle ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -1277,7 +1277,7 @@ void AquaSalFrame::getResolution( sal_Int32& o_rDPIX, 
sal_Int32& o_rDPIY )
 // doesn't make the anything cleaner for now
 void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::UpdateSettings, this, boost::ref( rSettings ) ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->UpdateSettings( rSettings ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -1397,7 +1397,7 @@ void AquaSalFrame::Beep( SoundType eSoundType )
 
 void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, 
sal_uInt16 nFlags)
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetPosSize, this, nX, nY, nWidth, nHeight, nFlags ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetPosSize( nX, nY, nWidth, nHeight, nFlags ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -1490,7 +1490,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long 
nWidth, long nHeight, sal_u
 
 void AquaSalFrame::GetWorkArea( Rectangle& rRect )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::GetWorkArea, this, boost::ref( rRect ) ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->GetWorkArea( rRect ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -1514,7 +1514,7 @@ SalPointerState   AquaSalFrame::GetPointerState()
 {
     AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
     if( ! pInst->isNSAppThread() )
-        return pInst->callOnMainThread< SalPointerState >( boost::bind( 
&AquaSalFrame::GetPointerState, this ) );
+        return pInst->callOnMainThread< SalPointerState >( [this]&{ return 
this->GetPointerState(); } );
 
     // #i113170# may not be the main thread if called from UNO API
     SalData::ensureThreadAutoreleasePool();
@@ -1626,7 +1626,7 @@ void AquaSalFrame::DrawMenuBar()
 
 void AquaSalFrame::SetMenu( SalMenu* pSalMenu )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetMenu, this, pSalMenu ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetMenu( pSalMenu ); } ) )
         return;
 
     // #i113170# may not be the main thread if called from UNO API
@@ -1641,7 +1641,7 @@ void AquaSalFrame::SetMenu( SalMenu* pSalMenu )
 
 void AquaSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::SetExtendedFrameStyle, this, nStyle ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetExtendedFrameStyle( nStyle ); } ) )
         return;
 
     if ( mpNSWindow )
@@ -1760,7 +1760,7 @@ void AquaSalFrame::CaptureMouse( sal_Bool bCapture )
 
 void AquaSalFrame::ResetClipRegion()
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::ResetClipRegion, this ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->ResetClipRegion(); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -1786,7 +1786,7 @@ void AquaSalFrame::ResetClipRegion()
 
 void AquaSalFrame::BeginSetClipRegion( sal_uLong nRects )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::BeginSetClipRegion, this, nRects ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->BeginSetClipRegion( nRects ); } ) )
         return;
 
     if ( !mpNSWindow )
@@ -1828,7 +1828,7 @@ void AquaSalFrame::UnionClipRegion( long nX, long nY, 
long nWidth, long nHeight
 
 void AquaSalFrame::EndSetClipRegion()
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalFrame::EndSetClipRegion, this ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->EndSetClipRegion(); } ) )
         return;
 
     if ( !mpNSWindow )
diff --git a/main/vcl/aqua/source/window/salmenu.cxx 
b/main/vcl/aqua/source/window/salmenu.cxx
index a33db1f963..1eb9f0c171 100644
--- a/main/vcl/aqua/source/window/salmenu.cxx
+++ b/main/vcl/aqua/source/window/salmenu.cxx
@@ -212,7 +212,7 @@ static void initAppMenu()
 SalMenu* AquaSalInstance::CreateMenu( sal_Bool bMenuBar, Menu* pVCLMenu )
 {
     if( ! isNSAppThread() )
-        return callOnMainThread< SalMenu* >( boost::bind( 
&AquaSalInstance::CreateMenu, this, bMenuBar, pVCLMenu ) );
+        return callOnMainThread< SalMenu* >( [this]&{ return this->CreateMenu( 
bMenuBar, pVCLMenu ); } );
 
     initAppMenu();
 
@@ -224,7 +224,7 @@ SalMenu* AquaSalInstance::CreateMenu( sal_Bool bMenuBar, 
Menu* pVCLMenu )
 
 void AquaSalInstance::DestroyMenu( SalMenu* pSalMenu )
 {
-    if( forwardToMainThread( boost::bind( &AquaSalInstance::DestroyMenu, this, 
pSalMenu ) ) )
+    if( forwardToMainThread( [this]&{ this->DestroyMenu( pSalMenu ); } ) )
         return;
     delete pSalMenu;
 }
@@ -232,7 +232,7 @@ void AquaSalInstance::DestroyMenu( SalMenu* pSalMenu )
 SalMenuItem* AquaSalInstance::CreateMenuItem( const SalItemParams* pItemData )
 {
     if( ! isNSAppThread() )
-        return callOnMainThread< SalMenuItem* >( boost::bind( 
&AquaSalInstance::CreateMenuItem, this, pItemData ) );
+        return callOnMainThread< SalMenuItem* >( [this]&{ return 
this->CreateMenuItem( pItemData ); } );
 
     if( !pItemData )
         return NULL;
@@ -244,7 +244,7 @@ SalMenuItem* AquaSalInstance::CreateMenuItem( const 
SalItemParams* pItemData )
 
 void AquaSalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem )
 {
-    if( forwardToMainThread( boost::bind( &AquaSalInstance::DestroyMenuItem, 
this, pSalMenuItem ) ) )
+    if( forwardToMainThread( [this]&{ this->DestroyMenuItem( pSalMenuItem ); } 
) )
         return;
     delete pSalMenuItem;
 }
@@ -355,7 +355,7 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * 
pWin, const Rectangle& rR
 {
     AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
     if( ! pInst->isNSAppThread() )
-        return pInst->callOnMainThread< bool >( boost::bind( 
&AquaSalMenu::ShowNativePopupMenu, this, pWin, boost::cref( rRect ), nFlags ) );
+        return pInst->callOnMainThread< bool >( [this]&{ return 
this->ShowNativePopupMenu( pWin, rRect, nFlags ); } );
 
     // do not use native popup menu when AQUA_NATIVE_MENUS is set to sal_False
     if( ! VisibleMenuBar() ) {
@@ -439,7 +439,7 @@ void AquaSalMenu::unsetMainMenu()
 
 void AquaSalMenu::setMainMenu()
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::setMainMenu, this ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->setMainMenu(); } ) )
         return;
 
     DBG_ASSERT( mbMenuBar, "setMainMenu on non menubar" );
@@ -484,7 +484,7 @@ void AquaSalMenu::setDefaultMenu()
 
 void AquaSalMenu::enableMainMenu( bool bEnable )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::enableMainMenu, bEnable ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->enableMainMenu( bEnable ); } ) )
         return;
 
     NSMenu* pMainMenu = [NSApp mainMenu];
@@ -502,7 +502,7 @@ void AquaSalMenu::enableMainMenu( bool bEnable )
 
 void AquaSalMenu::addFallbackMenuItem( NSMenuItem* pNewItem )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::addFallbackMenuItem, pNewItem ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->addFallbackMenuItem( pNewItem ); } ) )
         return;
 
     initAppMenu();
@@ -527,7 +527,7 @@ void AquaSalMenu::addFallbackMenuItem( NSMenuItem* pNewItem 
)
 
 void AquaSalMenu::removeFallbackMenuItem( NSMenuItem* pOldItem )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::removeFallbackMenuItem, pOldItem ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->removeFallbackMenuItem( pOldItem ); } ) )
         return;
 
     std::vector< NSMenuItem* >& rFallbackMenu( GetSalData()->maFallbackMenu );
@@ -573,7 +573,7 @@ void AquaSalMenu::SetFrame( const SalFrame *pFrame )
 
 void AquaSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::InsertItem, this, pSalMenuItem, nPos ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->InsertItem( pSalMenuItem, nPos ); } ) )
         return;
 
     AquaSalMenuItem *pAquaSalMenuItem = 
static_cast<AquaSalMenuItem*>(pSalMenuItem);
@@ -602,7 +602,7 @@ void AquaSalMenu::InsertItem( SalMenuItem* pSalMenuItem, 
unsigned nPos )
 
 void AquaSalMenu::RemoveItem( unsigned nPos )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::RemoveItem, this, nPos ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->RemoveItem( nPos ); } ) )
         return;
 
     AquaSalMenuItem* pRemoveItem = NULL;
@@ -630,7 +630,7 @@ void AquaSalMenu::RemoveItem( unsigned nPos )
 
 void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, 
unsigned nPos )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::SetSubMenu, this, pSalMenuItem, pSubMenu, nPos ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetSubMenu( pSalMenuItem, pSubMenu, nPos ); } ) )
         return;
 
     AquaSalMenuItem *pAquaSalMenuItem = 
static_cast<AquaSalMenuItem*>(pSalMenuItem);
@@ -673,7 +673,7 @@ void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, 
SalMenu* pSubMenu, unsi
 
 void AquaSalMenu::CheckItem( unsigned nPos, sal_Bool bCheck )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::CheckItem, this, nPos, bCheck ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->CheckItem( nPos, bCheck ); } ) )
         return;
 
     if( nPos < maItems.size() )
@@ -685,7 +685,7 @@ void AquaSalMenu::CheckItem( unsigned nPos, sal_Bool bCheck 
)
 
 void AquaSalMenu::EnableItem( unsigned nPos, sal_Bool bEnable )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::EnableItem, this, nPos, bEnable ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->EnableItem( nPos, bEnable ); } ) )
         return;
 
     if( nPos < maItems.size() )
@@ -697,7 +697,7 @@ void AquaSalMenu::EnableItem( unsigned nPos, sal_Bool 
bEnable )
 
 void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSMI, const Image& 
rImage )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::SetItemImage, this, nPos, pSMI, boost::cref( rImage ) ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetItemImage( nPos, pSMI, rImage ); } ) )
         return;
 
     AquaSalMenuItem* pSalMenuItem = static_cast<AquaSalMenuItem*>( pSMI );
@@ -713,7 +713,7 @@ void AquaSalMenu::SetItemImage( unsigned nPos, SalMenuItem* 
pSMI, const Image& r
 
 void AquaSalMenu::SetItemText( unsigned i_nPos, SalMenuItem* i_pSalMenuItem, 
const XubString& i_rText )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::SetItemText, this, i_nPos, i_pSalMenuItem, boost::cref( i_rText ) 
) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetItemText( i_nPos, i_pSalMenuItem, i_rText ); } ) )
         return;
 
     if (!i_pSalMenuItem)
@@ -753,7 +753,7 @@ void AquaSalMenu::SetItemText( unsigned i_nPos, 
SalMenuItem* i_pSalMenuItem, con
 
 void AquaSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, 
const KeyCode& rKeyCode, const XubString& rKeyName )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::SetAccelerator, this, nPos, pSalMenuItem, boost::cref( rKeyCode 
), boost::cref( rKeyName ) ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->SetAccelerator( nPos, pSalMenuItem, rKeyCode, rKeyName ); } ) )
         return;
 
     sal_uInt16 nModifier;
@@ -881,7 +881,7 @@ bool AquaSalMenu::AddMenuBarButton( const 
SalMenuButtonItem& i_rNewItem )
 {
     AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
     if( ! pInst->isNSAppThread() )
-        return pInst->callOnMainThread< bool >( boost::bind( 
&AquaSalMenu::AddMenuBarButton, this, boost::cref( i_rNewItem ) ) );
+        return pInst->callOnMainThread< bool >( [this]&{ return 
this->AddMenuBarButton( i_rNewItem ); } );
 
     if( ! mbMenuBar || ! VisibleMenuBar() )
         return false;
@@ -913,7 +913,7 @@ bool AquaSalMenu::AddMenuBarButton( const 
SalMenuButtonItem& i_rNewItem )
 
 void AquaSalMenu::RemoveMenuBarButton( sal_uInt16 i_nId )
 {
-    if( GetSalData()->mpFirstInstance->forwardToMainThread( boost::bind( 
&AquaSalMenu::RemoveMenuBarButton, this, i_nId ) ) )
+    if( GetSalData()->mpFirstInstance->forwardToMainThread( [this]&{ 
this->RemoveMenuBarButton( i_nId ); } ) )
         return;
 
     MenuBarButtonEntry* pEntry = findButtonItem( i_nId );
@@ -932,7 +932,7 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( 
sal_uInt16 i_nItemId, SalFrame
 {
     AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
     if( ! pInst->isNSAppThread() )
-        return pInst->callOnMainThread< Rectangle >( boost::bind( 
&AquaSalMenu::GetMenuBarButtonRectPixel, this, i_nItemId, i_pReferenceFrame ) );
+        return pInst->callOnMainThread< Rectangle >( [this]&{ return 
this->GetMenuBarButtonRectPixel( i_nItemId, i_pReferenceFrame ); } );
 
     if( GetSalData()->mnSystemVersion < OSX_VER_LEOPARD )
         return Rectangle( Point( -1, -1 ), Size( 1, 1 ) );
diff --git a/main/vcl/inc/aqua/salinst.h b/main/vcl/inc/aqua/salinst.h
index 927e737dd4..82aac48028 100644
--- a/main/vcl/inc/aqua/salinst.h
+++ b/main/vcl/inc/aqua/salinst.h
@@ -33,7 +33,6 @@
 #include "salinst.hxx"
 
 #include <boost/function.hpp>
-#include <boost/bind.hpp>
 #include <boost/ref.hpp>
 
 #include <exception>
@@ -207,7 +206,7 @@ public:
     template< typename R > R callOnMainThread( const boost::function0<R>& 
rFunc )
     {
         R aResult = R();
-        mpSalYieldMutex->runOnMainThread( boost::bind( 
&AquaSalInstance::assignResult<R>, &aResult, boost::cref( rFunc ) ) );
+        mpSalYieldMutex->runOnMainThread( [&aResult, &rFunc]() { 
this->template assignResult<R>( &aResult, rFunc ); } );
         return aResult;
     }
 

Reply via email to