summaryrefslogtreecommitdiff
path: root/sfx2/source/inet
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-20 09:29:30 +0200
committerNoel Grandin <noel@peralex.com>2013-04-08 13:53:03 +0200
commit86fdce60115014ddfae05993ef43686c9dbd6004 (patch)
treed50705d5f93fec079e4d676cd2a5a9c50783c6f3 /sfx2/source/inet
parent34da7fbcc643ad209290c6da456dbfb17aeb9ac0 (diff)
fdo#46808, Convert svt::ToolboxController to XComponentContext
.. and all of it's friends Change-Id: I408d9308d1d1a4f8ed0055ac5f4042d729c44d1e
Diffstat (limited to 'sfx2/source/inet')
-rw-r--r--sfx2/source/inet/inettbc.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index b882ff0b8dd8..cb9145699994 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -101,7 +101,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const String& rName, sal_Bool /*bNew*/
return;
Reference< XDispatchProvider > xDispatchProvider( getFrameInterface(), UNO_QUERY );
- if ( xDispatchProvider.is() && m_xServiceManager.is() )
+ if ( xDispatchProvider.is() )
{
URL aTargetURL;
OUString aTarget( OUString("_default"));
@@ -181,18 +181,15 @@ IMPL_LINK_NOARG(SfxURLToolBoxControl_Impl, OpenHdl)
SvtURLBox* pURLBox = GetURLBox();
OpenURL( pURLBox->GetURL(), pURLBox->IsCtrlOpen() );
- if ( m_xServiceManager.is() )
+ Reference< XDesktop2 > xDesktop = Desktop::create( m_xContext );
+ Reference< XFrame > xFrame( xDesktop->getActiveFrame(), UNO_QUERY );
+ if ( xFrame.is() )
{
- Reference< XDesktop2 > xDesktop = Desktop::create( comphelper::getComponentContext(m_xServiceManager) );
- Reference< XFrame > xFrame( xDesktop->getActiveFrame(), UNO_QUERY );
- if ( xFrame.is() )
+ Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
+ if ( pWin )
{
- Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
- if ( pWin )
- {
- pWin->GrabFocus();
- pWin->ToTop( TOTOP_RESTOREWHENMIN );
- }
+ pWin->GrabFocus();
+ pWin->ToTop( TOTOP_RESTOREWHENMIN );
}
}