[Libreoffice-commits] core.git: toolkit/source
Michael Stahl
mstahl at redhat.com
Mon Nov 2 03:34:31 PST 2015
toolkit/source/awt/vclxwindow.cxx | 10 ++++++----
toolkit/source/controls/controlmodelcontainerbase.cxx | 8 ++++----
2 files changed, 10 insertions(+), 8 deletions(-)
New commits:
commit 021a5e7123d7e338a21c7bac964e4318894a53e0
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Nov 2 12:27:24 2015 +0100
toolkit: pMouseEvt must not be captured
Its lifetime is bounded by the currently processed event.
(regression from 76e75d2dd6dafe55fd1740693529640652ed6455)
Change-Id: I4896b161295eeab3bbf08e59c5a82afac4338f08
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 9920a57..7c6a328 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -692,10 +692,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) );
-
- Callback aCallback = [ this, pMouseEvt, aEvent ]()
- { MouseListenerMultiplexer& maMouseListeners = this->mpImpl->getMouseListeners();
- pMouseEvt->IsEnterWindow() ? maMouseListeners.mouseEntered( aEvent ) : maMouseListeners.mouseExited( aEvent ); };
+ bool const isEnter(pMouseEvt->IsEnterWindow());
+ Callback aCallback = [ this, isEnter, aEvent ]()
+ { MouseListenerMultiplexer& rMouseListeners = this->mpImpl->getMouseListeners();
+ (isEnter)
+ ? rMouseListeners.mouseEntered(aEvent)
+ : rMouseListeners.mouseExited(aEvent); };
ImplExecuteAsyncWithoutSolarLock( aCallback );
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index db2a42e..f94c42e 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -285,8 +285,8 @@ void SAL_CALL ControlModelContainerBase::dispose( ) throw(RuntimeException, std
::std::transform(
maModels.begin(), maModels.end(), // source range
aChildModels.begin(), // target location
- []( const UnoControlModelHolder& aUnoControlModelHolder )
- { return aUnoControlModelHolder.first; } // operation to apply -> select the XControlModel part
+ []( const UnoControlModelHolder& rUnoControlModelHolder )
+ { return rUnoControlModelHolder.first; } // operation to apply -> select the XControlModel part
);
// now dispose
@@ -540,8 +540,8 @@ Sequence< OUString > ControlModelContainerBase::getElementNames() throw(RuntimeE
::std::transform(
maModels.begin(), maModels.end(), // source range
aNames.getArray(), // target range
- []( const UnoControlModelHolder& aUnoControlModelHolder )
- { return aUnoControlModelHolder.second; } // operator to apply: select the second element (the name)
+ []( const UnoControlModelHolder& rUnoControlModelHolder )
+ { return rUnoControlModelHolder.second; } // operator to apply: select the second element (the name)
);
return aNames;
More information about the Libreoffice-commits
mailing list