diff options
author | Noel Grandin <noel@peralex.com> | 2013-06-04 13:34:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-05 08:13:22 +0200 |
commit | 8c799984cc5b76c20baccffea818e07c440c2330 (patch) | |
tree | 1c6a595817c85386882808ea1294fa2bc581655a /framework/source/tabwin | |
parent | c23be036a6b71324302aa8acd3858ea725c2ada6 (diff) |
fdo#46808, Convert the rest of XMultiServiceFactory in framework module
Change-Id: Ife3caf00ab37a8c344f0ab90e40337b3b5bc1571
Diffstat (limited to 'framework/source/tabwin')
-rw-r--r-- | framework/source/tabwin/tabwindow.cxx | 10 | ||||
-rw-r--r-- | framework/source/tabwin/tabwinfactory.cxx | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 725fda901b59..c950e15901ea 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -85,7 +85,7 @@ PRIVATE_DEFINE_XSERVICEINFO_BASE ( TabWindow DEFINE_INIT_SERVICE ( TabWindow, {} ) -TabWindow::TabWindow( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) : +TabWindow::TabWindow( const css::uno::Reference< css::uno::XComponentContext >& xContext ) : ThreadHelpBase( &Application::GetSolarMutex() ) , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ) , ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) @@ -94,7 +94,7 @@ TabWindow::TabWindow( const css::uno::Reference< css::lang::XMultiServiceFactory , m_nNextTabID( 1 ) , m_aTitlePropName( "Title" ) , m_aPosPropName( "Position" ) - , m_xServiceManager( xServiceManager ) + , m_xContext( xContext ) , m_aListenerContainer( m_aLock.getShareableOslMutex() ) { } @@ -282,7 +282,7 @@ throw (css::uno::Exception, css::uno::RuntimeException) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ResetableGuard aLock( m_aLock ); sal_Bool bInitalized( m_bInitialized ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xServiceManager ); + css::uno::Reference< css::uno::XComponentContext > xContext( m_xContext ); aLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -293,11 +293,11 @@ throw (css::uno::Exception, css::uno::RuntimeException) css::uno::Reference< css::awt::XToolkit2 > xToolkit; css::awt::WindowDescriptor aDescriptor; - if ( xSMGR.is() ) + if ( xContext.is() ) { try { - xToolkit = css::awt::Toolkit::create( comphelper::getComponentContext(xSMGR) ); + xToolkit = css::awt::Toolkit::create( xContext ); } catch ( const css::uno::RuntimeException& ) { diff --git a/framework/source/tabwin/tabwinfactory.cxx b/framework/source/tabwin/tabwinfactory.cxx index 4f9d4c017300..718447bbf2eb 100644 --- a/framework/source/tabwin/tabwinfactory.cxx +++ b/framework/source/tabwin/tabwinfactory.cxx @@ -46,7 +46,7 @@ namespace framework //***************************************************************************************************************** // XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** -DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( TabWinFactory , +DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( TabWinFactory , ::cppu::OWeakObject , SERVICENAME_TABWINFACTORY , IMPLEMENTATIONNAME_TABWINFACTORY @@ -54,9 +54,9 @@ DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( TabWinFactory DEFINE_INIT_SERVICE ( TabWinFactory, {} ) -TabWinFactory::TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : +TabWinFactory::TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ) : ThreadHelpBase( &Application::GetSolarMutex() ) - , m_xServiceManager( xServiceManager ) + , m_xContext( xContext ) { } @@ -65,12 +65,12 @@ TabWinFactory::~TabWinFactory() } css::uno::Reference< css::uno::XInterface > SAL_CALL TabWinFactory::createInstanceWithContext( - const css::uno::Reference< css::uno::XComponentContext >& Context ) + const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw ( css::uno::Exception, css::uno::RuntimeException ) { css::uno::Sequence< css::uno::Any > aArgs; - return createInstanceWithArgumentsAndContext( aArgs, Context ); + return createInstanceWithArgumentsAndContext( aArgs, xContext ); } css::uno::Reference< css::uno::XInterface > SAL_CALL TabWinFactory::createInstanceWithArgumentsAndContext( @@ -82,7 +82,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ ResetableGuard aLock( m_aLock ); css::uno::Reference< css::awt::XToolkit2 > xToolkit = m_xToolkit; - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( m_xServiceManager ); + css::uno::Reference< css::uno::XComponentContext > xContext( m_xContext ); aLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -99,9 +99,9 @@ throw ( css::uno::Exception, css::uno::RuntimeException ) } } - if ( !xToolkit.is() && xSMGR.is() ) + if ( !xToolkit.is() && xContext.is() ) { - xToolkit = css::awt::Toolkit::create( comphelper::getComponentContext(xSMGR) ); + xToolkit = css::awt::Toolkit::create( xContext ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ aLock.lock(); m_xToolkit = xToolkit; @@ -130,7 +130,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException ) if ( xTopWindow.is() ) { - TabWindow* pTabWindow = new TabWindow( xSMGR ); + TabWindow* pTabWindow = new TabWindow( xContext ); css::uno::Sequence< css::uno::Any > aArgs( 1 ); |