summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-02 09:08:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-02 09:09:42 +0100
commitbd63b48ab027d63d889f2a0136589a6bfd4158eb (patch)
tree727ef8b656b5a10726b82010cd6a52659ad28faa /toolkit
parent74463457b39c9def1add630b7b0581dc195549c8 (diff)
Avoid dangling references
Fixes JunitTest_sfx2_complex broken with 76e75d2dd6dafe55fd1740693529640652ed6455 "tdf#93243 replace boost::bind with c++11 lambdas in toolkit/." Change-Id: I3119482e4c2e978daf2c2ff34b6ee5007a29397d
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx8
-rw-r--r--toolkit/source/awt/vclxwindows.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 4a4f1adc272f..9920a57c3e68 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -679,7 +679,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( aMEvt, *this ) );
aEvent.PopupTrigger = sal_True;
- Callback aCallback = [ this, &aEvent ]()
+ Callback aCallback = [ this, aEvent ]()
{ this->mpImpl->getMouseListeners().mousePressed( aEvent ); };
ImplExecuteAsyncWithoutSolarLock( aCallback );
@@ -693,7 +693,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) );
- Callback aCallback = [ this, &pMouseEvt, &aEvent ]()
+ Callback aCallback = [ this, pMouseEvt, aEvent ]()
{ MouseListenerMultiplexer& maMouseListeners = this->mpImpl->getMouseListeners();
pMouseEvt->IsEnterWindow() ? maMouseListeners.mouseEntered( aEvent ) : maMouseListeners.mouseExited( aEvent ); };
@@ -716,7 +716,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
if ( mpImpl->getMouseListeners().getLength() )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast<MouseEvent*>(rVclWindowEvent.GetData()), *this ) );
- Callback aCallback = [ this, &aEvent ]()
+ Callback aCallback = [ this, aEvent ]()
{ this->mpImpl->getMouseListeners().mousePressed( aEvent ); };
ImplExecuteAsyncWithoutSolarLock( aCallback );
}
@@ -728,7 +728,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast<MouseEvent*>(rVclWindowEvent.GetData()), *this ) );
- Callback aCallback = [ this, &aEvent ]()
+ Callback aCallback = [ this, aEvent ]()
{ this->mpImpl->getMouseListeners().mouseReleased( aEvent ); };
ImplExecuteAsyncWithoutSolarLock( aCallback );
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index ff5c204de038..36edbfaad2ae 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -585,7 +585,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
aEvent.Source = static_cast<cppu::OWeakObject*>(this);
aEvent.ActionCommand = maActionCommand;
- Callback aCallback = [ this, &aEvent ]()
+ Callback aCallback = [ this, aEvent ]()
{ this->maActionListeners.actionPerformed( aEvent ); };
ImplExecuteAsyncWithoutSolarLock( aCallback );