diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-20 13:28:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-20 17:59:06 +0200 |
commit | b1ef3c043d66e7cd529fc4fb13a3d2e8fdb4f2ee (patch) | |
tree | ac5ef4b1c0a3b191f97b3b2aa022a3062c77fdb3 /scripting/source/protocolhandler | |
parent | 476a652361de507303c7298a40cc96fa4bda22a3 (diff) |
loplugin:referencecasting in scripting
Change-Id: I056ae11c6cda0a1550a8fe363b069359feafcd59
Reviewed-on: https://gerrit.libreoffice.org/75996
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/protocolhandler')
-rw-r--r-- | scripting/source/protocolhandler/scripthandler.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index dff0f3513e4b..c4b7a519beb6 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -93,8 +93,7 @@ Reference< XDispatch > SAL_CALL ScriptProtocolHandler::queryDispatch( // get scheme of url Reference< uri::XUriReferenceFactory > xFac = uri::UriReferenceFactory::create( m_xContext ); - Reference< uri::XUriReference > uriRef( - xFac->parse( aURL.Complete ), UNO_QUERY ); + Reference< uri::XUriReference > uriRef = xFac->parse( aURL.Complete ); if ( uriRef.is() ) { if ( uriRef->getScheme() == "vnd.sun.star.script" ) @@ -324,13 +323,12 @@ ScriptProtocolHandler::getScriptInvocation() } else { - Reference< XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); - if ( xFrame.is() ) + if ( m_xFrame.is() ) { SfxFrame* pFrame = nullptr; for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) ) { - if ( pFrame->GetFrameInterface() == xFrame ) + if ( pFrame->GetFrameInterface() == m_xFrame ) break; } SfxObjectShell* pDocShell = pFrame ? pFrame->GetCurrentDocument() : SfxObjectShell::Current(); |