summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-23 10:15:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-23 15:25:26 +0200
commit8a54339fc83fe9abaaace6f9f374697e6923d684 (patch)
tree516e82bb9eca2d586aa7acebbe369f67ff707a7f /sd/source
parentd34f1df73806e9ca05fa0d07da619e2c0f01b6f7 (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 'sd/source')
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx3
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx8
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx7
-rw-r--r--sd/source/ui/view/drviewsa.cxx3
4 files changed, 6 insertions, 15 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 4dfad09947a0..7e7862d78e49 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -151,8 +151,7 @@ SlideSorterController::~SlideSorterController()
{
try
{
- uno::Reference<lang::XComponent> xComponent (
- static_cast<XWeak*>(mpListener.get()), uno::UNO_QUERY);
+ uno::Reference<lang::XComponent> xComponent = mpListener;
if (xComponent.is())
xComponent->dispose();
}
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 8f6b0268842f..7e956734ed2a 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -102,9 +102,7 @@ Listener::Listener (
mxFrameWeak = xFrame;
if (xFrame.is())
{
- xFrame->addFrameActionListener (
- Reference<frame::XFrameActionListener>(
- static_cast<XWeak*>(this), UNO_QUERY));
+ xFrame->addFrameActionListener(Reference<frame::XFrameActionListener>(this));
mbListeningToFrame = true;
}
@@ -166,9 +164,7 @@ void Listener::ReleaseListeners()
Reference<frame::XFrame> xFrame (mxFrameWeak);
if (xFrame.is())
{
- xFrame->removeFrameActionListener (
- Reference<frame::XFrameActionListener>(
- static_cast<XWeak*>(this), UNO_QUERY));
+ xFrame->removeFrameActionListener(Reference<frame::XFrameActionListener>(this));
mbListeningToFrame = false;
}
}
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index 1c86d4c644c0..59fa6e115ab8 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -204,9 +204,7 @@ EventMultiplexer::Implementation::Implementation (ViewShellBase& rBase)
mxFrameWeak = xFrame;
if (xFrame.is())
{
- xFrame->addFrameActionListener (
- Reference<frame::XFrameActionListener>(
- static_cast<XWeak*>(this), UNO_QUERY));
+ xFrame->addFrameActionListener ( Reference<frame::XFrameActionListener>(this) );
mbListeningToFrame = true;
}
@@ -265,8 +263,7 @@ void EventMultiplexer::Implementation::ReleaseListeners()
if (xFrame.is())
{
xFrame->removeFrameActionListener (
- Reference<frame::XFrameActionListener>(
- static_cast<XWeak*>(this), UNO_QUERY));
+ Reference<frame::XFrameActionListener>(this) );
}
}
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 30acb21ca00f..8cd3dd04f7e1 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -325,8 +325,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
{
mxScannerManager = scanner::ScannerManager::create( xContext );
- mxScannerListener.set( static_cast< ::cppu::OWeakObject* >( new ScannerEventListener( this ) ),
- uno::UNO_QUERY );
+ mxScannerListener = new ScannerEventListener( this );
}
catch (Exception const &)
{