diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-23 10:15:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-23 15:25:26 +0200 |
commit | 8a54339fc83fe9abaaace6f9f374697e6923d684 (patch) | |
tree | 516e82bb9eca2d586aa7acebbe369f67ff707a7f /framework/source/jobs | |
parent | d34f1df73806e9ca05fa0d07da619e2c0f01b6f7 (diff) |
loplugin:referencecasting look through more clang Types
Note that because of where the fix resides, loplugin:redundantcast
also notices a few more things.
Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/jobs')
-rw-r--r-- | framework/source/jobs/job.cxx | 14 | ||||
-rw-r--r-- | framework/source/jobs/jobdispatch.cxx | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 4cb9c5bb0ce1..81203f3afcfc 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -175,7 +175,7 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD // It's necessary to hold us self alive! // Otherwise we might die by ref count ... - css::uno::Reference< css::task::XJobListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); + css::uno::Reference< css::task::XJobListener > xThis(this); try { @@ -495,7 +495,7 @@ void Job::impl_startListening() try { m_xDesktop = css::frame::Desktop::create( m_xContext ); - css::uno::Reference< css::frame::XTerminateListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); + css::uno::Reference< css::frame::XTerminateListener > xThis(this); m_xDesktop->addTerminateListener(xThis); m_bListenOnDesktop = true; } @@ -511,7 +511,7 @@ void Job::impl_startListening() try { css::uno::Reference< css::util::XCloseBroadcaster > xCloseable(m_xFrame , css::uno::UNO_QUERY); - css::uno::Reference< css::util::XCloseListener > xThis (static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); + css::uno::Reference< css::util::XCloseListener > xThis(this); if (xCloseable.is()) { xCloseable->addCloseListener(xThis); @@ -531,7 +531,7 @@ void Job::impl_startListening() try { css::uno::Reference< css::util::XCloseBroadcaster > xCloseable(m_xModel , css::uno::UNO_QUERY); - css::uno::Reference< css::util::XCloseListener > xThis (static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); + css::uno::Reference< css::util::XCloseListener > xThis(this); if (xCloseable.is()) { xCloseable->addCloseListener(xThis); @@ -557,7 +557,7 @@ void Job::impl_stopListening() { try { - css::uno::Reference< css::frame::XTerminateListener > xThis(static_cast< ::cppu::OWeakObject* >(this) , css::uno::UNO_QUERY); + css::uno::Reference< css::frame::XTerminateListener > xThis(this); m_xDesktop->removeTerminateListener(xThis); m_xDesktop.clear(); m_bListenOnDesktop = false; @@ -573,7 +573,7 @@ void Job::impl_stopListening() try { css::uno::Reference< css::util::XCloseBroadcaster > xCloseable(m_xFrame , css::uno::UNO_QUERY); - css::uno::Reference< css::util::XCloseListener > xThis (static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); + css::uno::Reference< css::util::XCloseListener > xThis(this); if (xCloseable.is()) { xCloseable->removeCloseListener(xThis); @@ -592,7 +592,7 @@ void Job::impl_stopListening() try { css::uno::Reference< css::util::XCloseBroadcaster > xCloseable(m_xModel , css::uno::UNO_QUERY); - css::uno::Reference< css::util::XCloseListener > xThis (static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); + css::uno::Reference< css::util::XCloseListener > xThis(this); if (xCloseable.is()) { xCloseable->removeCloseListener(xThis); diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index 964f128e9110..c07727d017e7 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -204,7 +204,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL JobDispatch::queryDispatch JobURL aAnalyzedURL(aURL.Complete); if (aAnalyzedURL.isValid()) - xDispatch.set( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ); + xDispatch = this; return xDispatch; } |