summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-04 12:32:17 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-04 14:25:11 +0000
commitf600e14561edf3ab35762a39a199ac6d03ab2706 (patch)
tree14181cf6712626ffee37a389114cec0519608dac
parent806d34981f480908645038f4cfc29ebcf25ca145 (diff)
framework: replace boost::bind with C++11 lambda or for loop
Change-Id: I3bee504b5a3dce7d89af77c8fcf2f9e24d5119ca Reviewed-on: https://gerrit.libreoffice.org/22105 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--framework/inc/pch/precompiled_fwe.hxx1
-rw-r--r--framework/inc/pch/precompiled_fwk.hxx1
-rw-r--r--framework/source/fwe/helper/undomanagerhelper.cxx49
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx9
-rw-r--r--framework/source/uielement/toolbarmanager.cxx6
5 files changed, 18 insertions, 48 deletions
diff --git a/framework/inc/pch/precompiled_fwe.hxx b/framework/inc/pch/precompiled_fwe.hxx
index ed4ba1336d74..82265412fe89 100644
--- a/framework/inc/pch/precompiled_fwe.hxx
+++ b/framework/inc/pch/precompiled_fwe.hxx
@@ -48,7 +48,6 @@
#include <type_traits>
#include <utility>
#include <vector>
-#include <boost/bind.hpp>
#include <boost/intrusive_ptr.hpp>
#include <osl/conditn.hxx>
#include <osl/diagnose.h>
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index 2b8298876c50..be4379a53bfa 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -52,7 +52,6 @@
#include <unordered_map>
#include <utility>
#include <vector>
-#include <boost/bind.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx
index e0a1d0db623b..bea527724278 100644
--- a/framework/source/fwe/helper/undomanagerhelper.cxx
+++ b/framework/source/fwe/helper/undomanagerhelper.cxx
@@ -29,8 +29,6 @@
#include <tools/diagnose_ex.h>
#include <osl/conditn.hxx>
-#include <boost/bind.hpp>
-
#include <functional>
#include <stack>
#include <queue>
@@ -371,12 +369,7 @@ namespace framework
void UndoManagerHelper_Impl::enterUndoContext( const OUString& i_title, const bool i_hidden, IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_enterUndoContext,
- this,
- ::boost::cref( i_title ),
- i_hidden
- ),
+ [this, &i_title, i_hidden] () { return this->impl_enterUndoContext(i_title, i_hidden); },
i_instanceLock
);
}
@@ -384,10 +377,7 @@ namespace framework
void UndoManagerHelper_Impl::leaveUndoContext( IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_leaveUndoContext,
- this
- ),
+ [this] () { return this->impl_leaveUndoContext(); },
i_instanceLock
);
}
@@ -402,11 +392,7 @@ namespace framework
);
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_addUndoAction,
- this,
- ::boost::ref( i_action )
- ),
+ [this, &i_action] () { return this->impl_addUndoAction(i_action); },
i_instanceLock
);
}
@@ -414,10 +400,7 @@ namespace framework
void UndoManagerHelper_Impl::clear( IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_clear,
- this
- ),
+ [this] () { return this->impl_clear(); },
i_instanceLock
);
}
@@ -425,10 +408,7 @@ namespace framework
void UndoManagerHelper_Impl::clearRedo( IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_clearRedo,
- this
- ),
+ [this] () { return this->impl_clearRedo(); },
i_instanceLock
);
}
@@ -436,10 +416,7 @@ namespace framework
void UndoManagerHelper_Impl::reset( IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_reset,
- this
- ),
+ [this] () { return this->impl_reset(); },
i_instanceLock
);
}
@@ -894,12 +871,7 @@ namespace framework
void UndoManagerHelper_Impl::undo( IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_doUndoRedo,
- this,
- ::boost::ref( i_instanceLock ),
- true
- ),
+ [this, &i_instanceLock] () { return this->impl_doUndoRedo(i_instanceLock, true); },
i_instanceLock
);
}
@@ -907,12 +879,7 @@ namespace framework
void UndoManagerHelper_Impl::redo( IMutexGuard& i_instanceLock )
{
impl_processRequest(
- ::boost::bind(
- &UndoManagerHelper_Impl::impl_doUndoRedo,
- this,
- ::boost::ref( i_instanceLock ),
- false
- ),
+ [this, &i_instanceLock] () { return this->impl_doUndoRedo(i_instanceLock, false); },
i_instanceLock
);
}
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 31b1912c53d1..ad51ba12cf99 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -43,7 +43,6 @@
#include <vcl/dockingarea.hxx>
#include <vcl/settings.hxx>
-#include <boost/bind.hpp>
using namespace ::com::sun::star;
@@ -1281,8 +1280,12 @@ void ToolbarLayoutManager::implts_createNonContextSensitiveToolBars()
}
if ( !aMakeVisibleToolbars.empty() )
- ::std::for_each( aMakeVisibleToolbars.begin(), aMakeVisibleToolbars.end(),
- ::boost::bind( &ToolbarLayoutManager::requestToolbar, this, _1));
+ {
+ for (auto const& rURL : aMakeVisibleToolbars)
+ {
+ this->requestToolbar(rURL);
+ }
+ }
}
void ToolbarLayoutManager::implts_createCustomToolBars( const uno::Sequence< uno::Sequence< beans::PropertyValue > >& aTbxSeqSeq )
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index c83bc19a3c7b..eab47390c7c8 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -63,7 +63,6 @@
#include <vcl/commandinfoprovider.hxx>
#include <svtools/menuoptions.hxx>
-#include <boost/bind.hpp>
// namespaces
@@ -587,7 +586,10 @@ void ToolBarManager::setToolBarImage(const Image& _aImage,const CommandToInfoMap
{
const ::std::vector< sal_uInt16 >& _rIDs = _pIter->second.aIds;
m_pToolBar->SetItemImage( _pIter->second.nId, _aImage );
- ::std::for_each(_rIDs.begin(), _rIDs.end(), ::boost::bind(&ToolBox::SetItemImage, m_pToolBar.get(), _1,_aImage));
+ for (auto const& it : _rIDs)
+ {
+ m_pToolBar->SetItemImage(it, _aImage);
+ }
}
void SAL_CALL ToolBarManager::elementReplaced( const css::ui::ConfigurationEvent& Event ) throw (css::uno::RuntimeException, std::exception)