diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-10-31 09:22:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-31 09:22:53 +0100 |
commit | ced1151a1ad00fb2913a4c0f54e4544f4e566c05 (patch) | |
tree | 416403e0c91acc4cbfe6219f1930ea0273a856e0 /toolkit | |
parent | 6bc62f4f43c7458399169ddb2cba30ae4188b1bd (diff) |
Get rid of vcl::unohelper::GetMultiServiceFactory
...which effectively is just a glorious wrapper around
comphelper::getProcessServiceFactory.
In turn gets also rid of ImplSVAppData's mxMSF and mpMSFTempFileName and the
rSMgr parameter to InitVCL.
All the VCL users "soffice", "spadmin", and "unopkg gui" appear to still work
fine.
Change-Id: I797d48f7d0d8c35bb82124c9ab0ee63850c4d863
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxtoolkit.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 25 | ||||
-rw-r--r-- | toolkit/source/helper/registerservices.cxx | 2 |
3 files changed, 8 insertions, 21 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx index 32a401682ecd..7b00b6e283bc 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -106,7 +106,7 @@ protected: public: - VCLXToolkit( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ); + VCLXToolkit(); ~VCLXToolkit(); // ::com::sun::star::awt::XToolkitExperimental diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index f320d19b9dac..f54f8b97b1f0 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -414,27 +414,15 @@ static osl::Condition & getInitCondition() return *pC; } -struct ToolkitThreadData -{ - VCLXToolkit * pTk; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr; - - ToolkitThreadData( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr, VCLXToolkit * pTk_ ) - : pTk( pTk_ ) - , xSMgr( rSMgr ) - { - } -}; - extern "C" { static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) { - ToolkitThreadData * pTTD = (ToolkitThreadData *)pArgs; - bInitedByVCLToolkit = InitVCL( pTTD->xSMgr ); + VCLXToolkit * pTk = (VCLXToolkit *)pArgs; + bInitedByVCLToolkit = InitVCL(); if( bInitedByVCLToolkit ) { - UnoWrapper* pUnoWrapper = new UnoWrapper( pTTD->pTk ); + UnoWrapper* pUnoWrapper = new UnoWrapper( pTk ); Application::SetUnoWrapper( pUnoWrapper ); } getInitCondition().set(); @@ -446,7 +434,7 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) } try { - pTTD->pTk->dispose(); + pTk->dispose(); } catch( com::sun::star::uno::Exception & ) { @@ -457,12 +445,11 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs ) { JoinMainLoopThread(); } - delete pTTD; } } // contructor, which might initialize VCL -VCLXToolkit::VCLXToolkit( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ): +VCLXToolkit::VCLXToolkit(): cppu::WeakComponentImplHelper2< ::com::sun::star::awt::XToolkitExperimental, ::com::sun::star::lang::XServiceInfo>( GetMutex() ), @@ -482,7 +469,7 @@ VCLXToolkit::VCLXToolkit( const ::com::sun::star::uno::Reference< ::com::sun::st if( ( nVCLToolkitInstanceCount == 1 ) && ( !Application::IsInMain() ) ) { // setup execute thread - CreateMainLoopThread( ToolkitWorkerFunction, new ToolkitThreadData( rSMgr, this ) ); + CreateMainLoopThread( ToolkitWorkerFunction, this ); getInitCondition().wait(); } } diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index 7100f20db65a..bbf7089e636e 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -114,7 +114,7 @@ namespace toolkit using namespace toolkit; -IMPL_CREATEINSTANCE2( VCLXToolkit ) +IMPL_CREATEINSTANCE( VCLXToolkit ) IMPL_CREATEINSTANCE( StdTabController ) IMPL_CREATEINSTANCE( StdTabControllerModel ) IMPL_CREATEINSTANCE2( UnoButtonControl ) |