summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn.r.pearson <n.r.pearson@gmail.com>2015-09-11 10:02:30 -0400
committerNoel Grandin <noelgrandin@gmail.com>2015-09-29 06:58:05 +0000
commit92ffd0acea035dc3916fc001b4dcd901a8a7a9d2 (patch)
tree5ca570693884fbd654073cb95e2d6e2b8f2e1296
parentf68a27c787cfdafa51d0c045feb0452026640669 (diff)
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@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 3d0f16fc55b2..f05a166eae0d 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.