Use getXWeak in scripting
Change-Id: I4370c0bfaa75b150bd05f03a5961e7152ac41e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150864 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -377,7 +377,7 @@ namespace dlgprov
|
|||||||
void DialogAllListenerImpl::firing_impl( const AllEventObject& Event, Any* pRet )
|
void DialogAllListenerImpl::firing_impl( const AllEventObject& Event, Any* pRet )
|
||||||
{
|
{
|
||||||
ScriptEvent aScriptEvent;
|
ScriptEvent aScriptEvent;
|
||||||
aScriptEvent.Source = static_cast<OWeakObject *>(this); // get correct XInterface
|
aScriptEvent.Source = getXWeak(); // get correct XInterface
|
||||||
aScriptEvent.ListenerType = Event.ListenerType;
|
aScriptEvent.ListenerType = Event.ListenerType;
|
||||||
aScriptEvent.MethodName = Event.MethodName;
|
aScriptEvent.MethodName = Event.MethodName;
|
||||||
aScriptEvent.Arguments = Event.Arguments;
|
aScriptEvent.Arguments = Event.Arguments;
|
||||||
|
@@ -149,7 +149,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
|
|||||||
if ( xListener.is() )
|
if ( xListener.is() )
|
||||||
{
|
{
|
||||||
css::frame::DispatchResultEvent aEvent(
|
css::frame::DispatchResultEvent aEvent(
|
||||||
static_cast< ::cppu::OWeakObject* >( this ),
|
getXWeak(),
|
||||||
css::frame::DispatchResultState::FAILURE,
|
css::frame::DispatchResultState::FAILURE,
|
||||||
invokeResult );
|
invokeResult );
|
||||||
try
|
try
|
||||||
@@ -265,7 +265,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
|
|||||||
// executed a macro instead!
|
// executed a macro instead!
|
||||||
css::frame::DispatchResultEvent aEvent;
|
css::frame::DispatchResultEvent aEvent;
|
||||||
|
|
||||||
aEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
|
aEvent.Source = getXWeak();
|
||||||
aEvent.Result = invokeResult;
|
aEvent.Result = invokeResult;
|
||||||
if ( bSuccess )
|
if ( bSuccess )
|
||||||
{
|
{
|
||||||
|
@@ -374,7 +374,7 @@ public:
|
|||||||
before m_refCount is decremented again */
|
before m_refCount is decremented again */
|
||||||
{
|
{
|
||||||
m_xAggProxy->setDelegator(
|
m_xAggProxy->setDelegator(
|
||||||
static_cast< cppu::OWeakObject * >( this ) );
|
getXWeak() );
|
||||||
}
|
}
|
||||||
|
|
||||||
osl_atomic_decrement( &m_refCount );
|
osl_atomic_decrement( &m_refCount );
|
||||||
|
@@ -603,7 +603,7 @@ void StringResourceImpl::implModified(std::unique_lock<std::mutex>& rGuard)
|
|||||||
void StringResourceImpl::implNotifyListeners(std::unique_lock<std::mutex>& rGuard)
|
void StringResourceImpl::implNotifyListeners(std::unique_lock<std::mutex>& rGuard)
|
||||||
{
|
{
|
||||||
EventObject aEvent;
|
EventObject aEvent;
|
||||||
aEvent.Source = static_cast< XInterface* >( static_cast<OWeakObject*>(this) );
|
aEvent.Source = getXWeak();
|
||||||
m_aListenerContainer.forEach(rGuard,
|
m_aListenerContainer.forEach(rGuard,
|
||||||
[&aEvent](const css::uno::Reference<XModifyListener>& xListener)
|
[&aEvent](const css::uno::Reference<XModifyListener>& xListener)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user