[Libreoffice-commits] core.git: sfx2/source

n.r.pearson n.r.pearson at gmail.com
Mon Sep 28 23:58:25 PDT 2015


 sfx2/source/sidebar/SidebarController.cxx |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 92ffd0acea035dc3916fc001b4dcd901a8a7a9d2
Author: n.r.pearson <n.r.pearson at gmail.com>
Date:   Fri Sep 11 10:02:30 2015 -0400

    tdf#93243 replace boost::bind with C++11 lambdas in SidebarController.cxx
    
    Change-Id: I9a8b6679204fd31af012bf7b9840446ef0b35dfa
    Reviewed-on: https://gerrit.libreoffice.org/18504
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 3d0f16f..f05a166 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -54,7 +54,6 @@
 #include <com/sun/star/util/URL.hpp>
 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
 
-#include <boost/bind.hpp>
 
 using namespace css;
 using namespace css::uno;
@@ -96,22 +95,22 @@ SidebarController::SidebarController (
       mpTabBar(VclPtr<TabBar>::Create(
               mpParentWindow,
               rxFrame,
-              ::boost::bind(&SidebarController::OpenThenSwitchToDeck, this, _1),
-              ::boost::bind(&SidebarController::ShowPopupMenu, this, _1,_2),
+              [this](const ::rtl::OUString& rsDeckId) { return this->OpenThenSwitchToDeck(rsDeckId); },
+              [this](const Rectangle& rButtonBox,const ::std::vector<TabBar::DeckMenuData>& rMenuData) { return this->ShowPopupMenu(rButtonBox,rMenuData); },
               this)),
       mxFrame(rxFrame),
       maCurrentContext(OUString(), OUString()),
       maRequestedContext(),
       mnRequestedForceFlags(SwitchFlag_NoForce),
       msCurrentDeckId(gsDefaultDeckId),
-      maPropertyChangeForwarder(::boost::bind(&SidebarController::BroadcastPropertyChange, this)),
-      maContextChangeUpdate(::boost::bind(&SidebarController::UpdateConfigurations, this)),
+      maPropertyChangeForwarder([this](){ return this->BroadcastPropertyChange(); }),
+      maContextChangeUpdate([this](){ return this->UpdateConfigurations(); }),
       maAsynchronousDeckSwitch(),
       mbIsDeckRequestedOpen(),
       mbIsDeckOpen(),
       mbCanDeckBeOpened(true),
       mnSavedSidebarWidth(pParentWindow->GetSizePixel().Width()),
-      maFocusManager(::boost::bind(&SidebarController::ShowPanel, this, _1)),
+      maFocusManager([this](const Panel& rPanel){ return this->ShowPanel(rPanel); }),
       mxReadOnlyModeDispatch(),
       mbIsDocumentReadOnly(false),
       mpSplitWindow(NULL),
@@ -530,7 +529,7 @@ void SidebarController::CreateDeck(const ::rtl::OUString& rDeckId)
         VclPtr<Deck> aDeck = VclPtr<Deck>::Create(
                 *pDeckDescriptor,
                 mpParentWindow,
-                ::boost::bind(&SidebarController::RequestCloseDeck, this));
+                [this]() { return this->RequestCloseDeck(); });
 
         mpResourceManager->SetDeckToDescriptor(rDeckId, aDeck);
     }
@@ -742,8 +741,8 @@ VclPtr<Panel> SidebarController::CreatePanel (
         *pPanelDescriptor,
         pParentWindow,
         bIsInitiallyExpanded,
-        ::boost::bind(&Deck::RequestLayout, mpCurrentDeck.get()),
-        ::boost::bind(&SidebarController::GetCurrentContext, this),
+        [this]() { return mpCurrentDeck.get()->RequestLayout(); },
+        [this]() { return this->GetCurrentContext(); },
         mxFrame);
 
     // Create the XUIElement.


More information about the Libreoffice-commits mailing list