summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/unodispatch.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-23 20:15:07 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-10-22 13:43:03 +0200
commit69c7722b6c70db7a39657026689103f541543d4a (patch)
tree35890f9a7b29592fcb17799e410cce3f2515cc2c /sw/source/uibase/uno/unodispatch.cxx
parent1eda97c39237f0244faccb220b3bdd692340e013 (diff)
Use getXWeak in sw
Change-Id: I49d2d1a00928c4cea68164e8c91fd9a6bb4b3b94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150875 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase/uno/unodispatch.cxx')
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index 64fb33f8d67f..bb9af96d48f6 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -222,7 +222,7 @@ void SwXDispatch::dispatch(const util::URL& aURL,
else if(aURL.Complete == cInternalDBChangeNotification)
{
frame::FeatureStateEvent aEvent;
- aEvent.Source = *static_cast<cppu::OWeakObject*>(this);
+ aEvent.Source = getXWeak();
const SwDBData& rData = m_pView->GetWrtShell().GetDBData();
svx::ODataAccessDescriptor aDescriptor;
@@ -264,7 +264,7 @@ void SwXDispatch::addStatusListener(
m_bOldEnable = bEnable;
frame::FeatureStateEvent aEvent;
aEvent.IsEnabled = bEnable;
- aEvent.Source = *static_cast<cppu::OWeakObject*>(this);
+ aEvent.Source = getXWeak();
aEvent.FeatureURL = aURL;
// one of the URLs requires a special state...
@@ -326,7 +326,7 @@ void SwXDispatch::selectionChanged( const lang::EventObject& )
m_bOldEnable = bEnable;
frame::FeatureStateEvent aEvent;
aEvent.IsEnabled = bEnable;
- aEvent.Source = *static_cast<cppu::OWeakObject*>(this);
+ aEvent.Source = getXWeak();
// calls to statusChanged may call addStatusListener or removeStatusListener
// so copy m_aStatusListenerVector on stack
@@ -348,7 +348,7 @@ void SwXDispatch::disposing( const lang::EventObject& rSource )
m_bListenerAdded = false;
lang::EventObject aObject;
- aObject.Source = static_cast<cppu::OWeakObject*>(this);
+ aObject.Source = getXWeak();
// calls to statusChanged may call addStatusListener or removeStatusListener
// so copy m_aStatusListenerVector on stack
auto copyStatusListenerVector = m_aStatusListenerVector;