diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-13 10:40:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-13 14:48:24 +0200 |
commit | 32b09faca508ae4aac7e100c98a2fe56d3302eef (patch) | |
tree | df4c3f089cd83b361c3f5133344397d9d888e9b5 /sfx2 | |
parent | 013a4f1f5c9ea5fb511568c53a7e76d1b365a65d (diff) |
Revert "simplify the vcl<->toolkit connection"
because it introduces a link-time dependency of vcl on toolkit,
and toolkit already depends on vcl
This reverts commit f7a86c5cdf4323c99d26512bf78de7f7c380667d.
Change-Id: Ibdd4f3e8221d70e2abd8fcbda67f85af3ac0396e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115547
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/iframe.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/userinputinterception.cxx | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 578c6a071336..eff4588b3b5f 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -164,14 +164,14 @@ sal_Bool SAL_CALL IFrameObject::load( pWin->SetBackground(); pWin->Show(); - auto xWindow = pWin->GetComponentInterfaceAs<awt::XWindow>(); + uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY ); xFrame->setComponent( xWindow, uno::Reference < frame::XController >() ); // we must destroy the IFrame before the parent is destroyed xWindow->addEventListener( this ); mxFrame = frame::Frame::create( mxContext ); - auto xWin = pWin->GetComponentInterfaceAs<awt::XWindow>(); + uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY ); mxFrame->initialize( xWin ); mxFrame->setName( maFrmDescr.GetName() ); diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index d92771872fe8..3c40c7bdf4a6 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -567,7 +567,8 @@ uno::Reference< awt::XWindow > SAL_CALL SfxInPlaceClient_Impl::getWindow() if ( !m_pClient || !m_pClient->GetEditWin() ) throw uno::RuntimeException(); - return m_pClient->GetEditWin()->GetComponentInterfaceAs<awt::XWindow>(); + uno::Reference< awt::XWindow > xWin( m_pClient->GetEditWin()->GetComponentInterface(), uno::UNO_QUERY ); + return xWin; } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 98462d587722..8f5bfddba32d 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -445,7 +445,7 @@ Reference< XWindow > SAL_CALL SfxBaseController::getComponentWindow() if ( !m_pData->m_pViewShell ) throw DisposedException(); - return GetViewFrame_Impl().GetFrame().GetWindow().GetComponentInterfaceAs<XWindow>(); + return Reference< XWindow >( GetViewFrame_Impl().GetFrame().GetWindow().GetComponentInterface(), UNO_QUERY_THROW ); } OUString SAL_CALL SfxBaseController::getViewControllerName() diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx index 0f669fac7d66..ca1a1fd3f622 100644 --- a/sfx2/source/view/userinputinterception.cxx +++ b/sfx2/source/view/userinputinterception.cxx @@ -184,7 +184,7 @@ namespace sfx2 KeyEvent aEvent; lcl_initKeyEvent( aEvent, *_rEvent.GetKeyEvent() ); if ( _rEvent.GetWindow() ) - aEvent.Source = static_cast<cppu::OWeakObject*>(_rEvent.GetWindow()->GetComponentInterface()); + aEvent.Source = _rEvent.GetWindow()->GetComponentInterface(); ::comphelper::OInterfaceIteratorHelper2 aIterator( m_pData->m_aKeyHandlers ); while ( aIterator.hasMoreElements() ) @@ -222,7 +222,7 @@ namespace sfx2 MouseEvent aEvent; lcl_initMouseEvent( aEvent, *_rEvent.GetMouseEvent() ); if ( _rEvent.GetWindow() ) - aEvent.Source = static_cast<cppu::OWeakObject*>(_rEvent.GetWindow()->GetComponentInterface()); + aEvent.Source = _rEvent.GetWindow()->GetComponentInterface(); ::comphelper::OInterfaceIteratorHelper2 aIterator( m_pData->m_aMouseClickHandlers ); while ( aIterator.hasMoreElements() ) |