[Libreoffice-commits] core.git: toolkit/source

Stephan Bergmann sbergman at redhat.com
Mon Nov 2 00:10:04 PST 2015


 toolkit/source/awt/vclxwindow.cxx  |    8 ++++----
 toolkit/source/awt/vclxwindows.cxx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit bd63b48ab027d63d889f2a0136589a6bfd4158eb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Nov 2 09:08:25 2015 +0100

    Avoid dangling references
    
    Fixes JunitTest_sfx2_complex broken with
    76e75d2dd6dafe55fd1740693529640652ed6455 "tdf#93243 replace boost::bind with
    c++11 lambdas in toolkit/."
    
    Change-Id: I3119482e4c2e978daf2c2ff34b6ee5007a29397d

diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 4a4f1ad..9920a57 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 ff5c204..36edbfa 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 );


More information about the Libreoffice-commits mailing list