diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-01 10:40:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-01 18:56:06 +0200 |
commit | a2ab2b31b8b8f1fd17d7d6c8f68e5adc1e8d381d (patch) | |
tree | 1ec162e400ea3922d5cf27b93b6a9f26bd923366 /embedserv | |
parent | 46d0afba738d8ee7c9b63384fef513f42ee587f3 (diff) |
loplugin:referencecasting (clang-cl)
Change-Id: Ie534212b09b92a02b377d0bb348e11c96bf61786
Reviewed-on: https://gerrit.libreoffice.org/79934
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/embed/docholder.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index b1164869f91b..1f1f619cd302 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -679,11 +679,8 @@ void DocumentHolder::CloseFrame() } catch( const uno::Exception& ) { } - else { - uno::Reference<lang::XComponent> xComp(m_xFrame, uno::UNO_QUERY); - if (xComp.is()) - xComp->dispose(); - } + else if (m_xFrame.is()) + m_xFrame->dispose(); m_xFrame.clear(); } @@ -758,13 +755,10 @@ uno::Reference< frame::XFrame2 > DocumentHolder::DocumentFrame() { uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(comphelper::getComponentContext(m_xFactory)); - uno::Reference<frame::XFrame> xFrame(xDesktop,uno::UNO_QUERY); - // the frame will be registered on desktop here, later when the document // is loaded into the frame in ::show() method the terminate listener will be removed // this is so only for outplace activation - if( xFrame.is() ) - m_xFrame.set( xFrame->findFrame( "_blank", 0 ), uno::UNO_QUERY ); + m_xFrame.set( xDesktop->findFrame( "_blank", 0 ), uno::UNO_QUERY ); uno::Reference< util::XCloseBroadcaster > xBroadcaster( m_xFrame, uno::UNO_QUERY ); @@ -871,8 +865,7 @@ void DocumentHolder::resizeWin( const SIZEL& rNewSize ) if ( m_xFrame.is() && aDocLock.GetEmbedDocument() ) { - uno::Reference< awt::XWindow > xWindow( - m_xFrame->getContainerWindow(), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xWindow = m_xFrame->getContainerWindow(); uno::Reference< awt::XView > xView( xWindow, uno::UNO_QUERY ); if ( xWindow.is() && xView.is() ) |