[Libreoffice-commits] core.git: svx/inc svx/source
Michael Stahl
mstahl at redhat.com
Thu Feb 4 14:25:58 UTC 2016
svx/inc/pch/precompiled_svx.hxx | 1 -
svx/inc/pch/precompiled_svxcore.hxx | 1 -
svx/source/core/extedit.cxx | 4 ++--
svx/source/gallery2/GalleryControl.cxx | 9 ++++-----
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 3 +--
svx/source/sidebar/PanelFactory.cxx | 1 -
svx/source/sidebar/area/AreaPropertyPanel.cxx | 1 -
svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 3 +--
svx/source/sidebar/line/LinePropertyPanel.cxx | 1 -
svx/source/sidebar/line/LinePropertyPanelBase.cxx | 3 +--
svx/source/sidebar/line/LineWidthPopup.cxx | 3 +--
svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 2 +-
svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 1 -
svx/source/sidebar/styles/StylesPropertyPanel.cxx | 3 ---
svx/source/sidebar/text/TextCharacterSpacingPopup.cxx | 3 +--
svx/source/sidebar/text/TextPropertyPanel.cxx | 5 ++---
svx/source/table/tabledesign.cxx | 7 +++----
17 files changed, 17 insertions(+), 34 deletions(-)
New commits:
commit 0835f5b80cecee7ec4326e4ab295f520112052fb
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Feb 4 13:01:15 2016 +0100
svx: replace boost::bind with C++11 lambda
Change-Id: I68f9559fab9a344979dc39b81f3738877483b5fe
Reviewed-on: https://gerrit.libreoffice.org/22106
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 4c74ffb..b906f30 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 fbe508e..70a6671 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 3f9c22b..1267671 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 65a8629..f6c1136 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 5500bdf..cc57902 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 8cc30e6..004d33b 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 7a6c97d..6809c75 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 e1a97b3..aff96d7 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 4b1ca42..37e0dac 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 013d8e4..ea924bd 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 8fc0bc3..02cc902 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 6dad280..57d35a4 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 37be379..5bbfa3e 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 8d29d24..5c1631c 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 16bbba6..148b864 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 1100312..ec237d0 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 c3cca01..22fe8ff 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); });
}
}
More information about the Libreoffice-commits
mailing list