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 )
|
||||
{
|
||||
ScriptEvent aScriptEvent;
|
||||
aScriptEvent.Source = static_cast<OWeakObject *>(this); // get correct XInterface
|
||||
aScriptEvent.Source = getXWeak(); // get correct XInterface
|
||||
aScriptEvent.ListenerType = Event.ListenerType;
|
||||
aScriptEvent.MethodName = Event.MethodName;
|
||||
aScriptEvent.Arguments = Event.Arguments;
|
||||
|
@@ -149,7 +149,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
|
||||
if ( xListener.is() )
|
||||
{
|
||||
css::frame::DispatchResultEvent aEvent(
|
||||
static_cast< ::cppu::OWeakObject* >( this ),
|
||||
getXWeak(),
|
||||
css::frame::DispatchResultState::FAILURE,
|
||||
invokeResult );
|
||||
try
|
||||
@@ -265,7 +265,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
|
||||
// executed a macro instead!
|
||||
css::frame::DispatchResultEvent aEvent;
|
||||
|
||||
aEvent.Source = static_cast< ::cppu::OWeakObject* >( this );
|
||||
aEvent.Source = getXWeak();
|
||||
aEvent.Result = invokeResult;
|
||||
if ( bSuccess )
|
||||
{
|
||||
|
@@ -374,7 +374,7 @@ public:
|
||||
before m_refCount is decremented again */
|
||||
{
|
||||
m_xAggProxy->setDelegator(
|
||||
static_cast< cppu::OWeakObject * >( this ) );
|
||||
getXWeak() );
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
EventObject aEvent;
|
||||
aEvent.Source = static_cast< XInterface* >( static_cast<OWeakObject*>(this) );
|
||||
aEvent.Source = getXWeak();
|
||||
m_aListenerContainer.forEach(rGuard,
|
||||
[&aEvent](const css::uno::Reference<XModifyListener>& xListener)
|
||||
{
|
||||
|
Reference in New Issue
Block a user