diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-02-04 13:01:15 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-02-04 14:25:38 +0000 |
commit | 0835f5b80cecee7ec4326e4ab295f520112052fb (patch) | |
tree | d56f1e54c3edbccdc45e5f42b7eb09a467d503af /svx | |
parent | f600e14561edf3ab35762a39a199ac6d03ab2706 (diff) |
svx: replace boost::bind with C++11 lambda
Change-Id: I68f9559fab9a344979dc39b81f3738877483b5fe
Reviewed-on: https://gerrit.libreoffice.org/22106
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/pch/precompiled_svx.hxx | 1 | ||||
-rw-r--r-- | svx/inc/pch/precompiled_svxcore.hxx | 1 | ||||
-rw-r--r-- | svx/source/core/extedit.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/GalleryControl.cxx | 9 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/PanelFactory.cxx | 1 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanel.cxx | 1 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.cxx | 1 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanelBase.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 1 | ||||
-rw-r--r-- | svx/source/sidebar/styles/StylesPropertyPanel.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingPopup.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 5 | ||||
-rw-r--r-- | svx/source/table/tabledesign.cxx | 7 |
17 files changed, 17 insertions, 34 deletions
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx index 4c74ffb171fa..b906f3090620 100644 --- a/svx/inc/pch/precompiled_svx.hxx +++ b/svx/inc/pch/precompiled_svx.hxx @@ -44,7 +44,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/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx index fbe508ea63bc..70a6671d8aed 100644 --- a/svx/inc/pch/precompiled_svxcore.hxx +++ b/svx/inc/pch/precompiled_svxcore.hxx @@ -52,7 +52,6 @@ #include <utility> #include <vector> #include <boost/assign/list_of.hpp> -#include <boost/bind.hpp> #include <boost/intrusive_ptr.hpp> #include <boost/noncopyable.hpp> #include <boost/optional.hpp> diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx index 3f9c22b45cef..1267671a9e0f 100644 --- a/svx/source/core/extedit.cxx +++ b/svx/source/core/extedit.cxx @@ -29,7 +29,7 @@ #include <svtools/filechangedchecker.hxx> #include <unotools/ucbstreamhelper.hxx> #include <comphelper/processfactory.hxx> -#include <boost/bind.hpp> + #include <memory> #include <com/sun/star/system/SystemShellExecute.hpp> @@ -66,7 +66,7 @@ void ExternalToolEdit::StartListeningEvent() //Start an event listener implemented via VCL timeout assert(!m_pChecker.get()); m_pChecker.reset(new FileChangedChecker( - m_aFileName, ::boost::bind(&HandleCloseEvent, this))); + m_aFileName, [this] () { return HandleCloseEvent(this); })); } // self-destructing thread to make shell execute async diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 65a8629f1616..f6c113694f51 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -29,8 +29,6 @@ #include <vcl/settings.hxx> #include <sfx2/sidebar/Theme.hxx> -#include <boost/bind.hpp> - namespace svx { namespace sidebar { static const sal_Int32 gnInitialVerticalSplitPosition (150); @@ -44,13 +42,14 @@ GalleryControl::GalleryControl ( this, WB_HSCROLL, - ::boost::bind(&GalleryControl::InitSettings, this))), + [this] () { return this->InitSettings(); })), mpBrowser1(VclPtr<GalleryBrowser1>::Create( this, mpGallery, - ::boost::bind(&GalleryControl::GalleryKeyInput,this,_1,_2), - ::boost::bind(&GalleryControl::ThemeSelectionHasChanged, this))), + [this] (KeyEvent const& rEvent, vcl::Window *const pWindow) + { return this->GalleryKeyInput(rEvent, pWindow); }, + [this] () { return this->ThemeSelectionHasChanged(); })), mpBrowser2(VclPtr<GalleryBrowser2>::Create(this, mpGallery)), maLastSize(GetOutputSizePixel()), mbIsInitialResize(true) diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 5500bdf6aa72..cc57902bb003 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -56,7 +56,6 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <drawinglayer/primitive2d/controlprimitive2d.hxx> -#include <boost/bind.hpp> #include <boost/noncopyable.hpp> /* @@ -1036,7 +1035,7 @@ namespace sdr { namespace contact { } m_bCreatingControl = true; - ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) ); + ::comphelper::ScopeGuard aGuard([&] () { lcl_resetFlag(m_bCreatingControl); }); if ( m_aControl.is() ) { diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index 8cc30e697b0a..004d33b9fe6c 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -43,7 +43,6 @@ #include <com/sun/star/ui/XSidebar.hpp> #include <com/sun/star/ui/XUIElementFactory.hpp> -#include <boost/bind.hpp> #include <boost/noncopyable.hpp> using namespace css; diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index 7a6c97df812c..6809c75e0603 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -38,7 +38,6 @@ #include <vcl/toolbox.hxx> #include <svtools/toolbarmenu.hxx> -#include <boost/bind.hpp> using namespace css; using namespace css::uno; diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index e1a97b380d6f..aff96d707607 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -40,7 +40,6 @@ #include <svtools/toolbarmenu.hxx> #include <svx/tbcontrl.hxx> -#include <boost/bind.hpp> using namespace css; using namespace css::uno; @@ -82,7 +81,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase( maImgRadial(SVX_RES(IMG_RADIAL)), maImgSquare(SVX_RES(IMG_SQUARE)), maImgLinear(SVX_RES(IMG_LINEAR)), - maTrGrPopup(this, ::boost::bind(&AreaPropertyPanelBase::CreateTransparencyGradientControl, this, _1)), + maTrGrPopup(this, [this] (PopupContainer *const pContainer) { return this->CreateTransparencyGradientControl(pContainer); }), mpFloatTransparenceItem(), mpTransparanceItem(), mxFrame(rxFrame), diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 4b1ca42b19eb..37e0dac0b3dc 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -49,7 +49,6 @@ #include "svx/sidebar/PopupContainer.hxx" #include "svx/sidebar/PopupControl.hxx" #include "LineWidthControl.hxx" -#include <boost/bind.hpp> using namespace css; using namespace css::uno; diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 013d8e4fbbc3..ea924bddd13b 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -49,7 +49,6 @@ #include "svx/sidebar/PopupContainer.hxx" #include "svx/sidebar/PopupControl.hxx" #include "LineWidthControl.hxx" -#include <boost/bind.hpp> using namespace css; using namespace css::uno; @@ -175,7 +174,7 @@ LinePropertyPanelBase::LinePropertyPanelBase( mnWidthCoreValue(0), mpStartItem(), mpEndItem(), - maLineWidthPopup(this, ::boost::bind(&LinePropertyPanelBase::CreateLineWidthPopupControl, this, _1)), + maLineWidthPopup(this, [this] (PopupContainer *const pContainer) { return this->CreateLineWidthPopupControl(pContainer); }), maIMGNone(SVX_RES(IMG_NONE_ICON)), mpIMGWidthIcon(), mbWidthValuable(true), diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 8fc0bc33abe9..02cc9022fdab 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -23,7 +23,6 @@ #include <unotools/viewoptions.hxx> -#include <boost/bind.hpp> namespace svx { namespace sidebar { @@ -35,7 +34,7 @@ LineWidthPopup::LineWidthPopup ( rControlCreator, OUString( "Width")) { - SetPopupModeEndHandler(::boost::bind(&LineWidthPopup::PopupModeEndCallback, this)); + SetPopupModeEndHandler([this] () { return this->PopupModeEndCallback(); }); } LineWidthPopup::~LineWidthPopup() diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 6dad280d5ec1..57d35a434dc3 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -32,7 +32,7 @@ #include "svx/dialmgr.hxx" #include <sfx2/objsh.hxx> #include <svtools/unitconv.hxx> -#include <boost/bind.hpp> + using namespace css; using namespace css::uno; diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index 37be37999443..5bbfa3ee470e 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -20,7 +20,6 @@ #include <svx/xtable.hxx> #include <svtools/valueset.hxx> #include <unotools/pathoptions.hxx> -#include <boost/bind.hpp> #include <svx/xattr.hxx> #include <svx/svddef.hxx> #include <svx/sdooitm.hxx> diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.cxx b/svx/source/sidebar/styles/StylesPropertyPanel.cxx index 8d29d24ec5a3..5c1631c694ec 100644 --- a/svx/source/sidebar/styles/StylesPropertyPanel.cxx +++ b/svx/source/sidebar/styles/StylesPropertyPanel.cxx @@ -1,5 +1,4 @@ #include "StylesPropertyPanel.hxx" -#include <boost/bind.hpp> using namespace css; using namespace css::uno; @@ -39,6 +38,4 @@ void StylesPropertyPanel::DataChanged( const DataChangedEvent& /*rEvent*/) } - - }} diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx index 16bbba66ef28..148b864297d5 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx @@ -18,7 +18,6 @@ */ #include "TextCharacterSpacingPopup.hxx" #include "TextCharacterSpacingControl.hxx" -#include <boost/bind.hpp> #include <unotools/viewoptions.hxx> namespace svx { namespace sidebar { @@ -31,7 +30,7 @@ TextCharacterSpacingPopup::TextCharacterSpacingPopup ( rControlCreator, OUString( "Character Spacing")) { - SetPopupModeEndHandler(::boost::bind(&TextCharacterSpacingPopup::PopupModeEndCallback, this)); + SetPopupModeEndHandler([this] () { return this->PopupModeEndCallback(); }); } TextCharacterSpacingPopup::~TextCharacterSpacingPopup() diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 110031252405..ec237d039d9c 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -33,7 +33,6 @@ #include "TextUnderlinePopup.hxx" #include <svx/sidebar/PopupContainer.hxx> -#include <boost/bind.hpp> using namespace css; using namespace css::uno; @@ -88,8 +87,8 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref maUnderlineControl (SID_ATTR_CHAR_UNDERLINE, *pBindings, *this, OUString("Underline"), rxFrame), maSpacingControl (SID_ATTR_CHAR_KERNING, *pBindings, *this, OUString("Spacing"), rxFrame), - maCharSpacePopup(this, ::boost::bind(&TextPropertyPanel::CreateCharacterSpacingControl, this, _1)), - maUnderlinePopup(this, ::boost::bind(&TextPropertyPanel::CreateUnderlinePopupControl, this, _1)), + maCharSpacePopup(this, [this] (PopupContainer *const pContainer) { return this->CreateCharacterSpacingControl(pContainer); }), + maUnderlinePopup(this, [this] (PopupContainer *const pContainer) { return this->CreateUnderlinePopupControl(pContainer); }), maContext(), mpBindings(pBindings) { diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index c3cca01915f7..22fe8ff4e722 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -48,9 +48,6 @@ #include <vector> #include <map> -#include <boost/bind.hpp> - - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::style; @@ -440,7 +437,9 @@ void TableDesignStyle::notifyModifyListener() if( pContainer ) { EventObject aEvt( static_cast< OWeakObject * >( this ) ); - pContainer->forEach<XModifyListener>( boost::bind( &XModifyListener::modified, _1, boost::cref( aEvt ) ) ); + pContainer->forEach<XModifyListener>( + [&] (Reference<XModifyListener> const& xListener) + { return xListener->modified(aEvt); }); } } |