summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxtoolkit.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-31 09:22:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-10-31 09:22:53 +0100
commitced1151a1ad00fb2913a4c0f54e4544f4e566c05 (patch)
tree416403e0c91acc4cbfe6219f1930ea0273a856e0 /toolkit/source/awt/vclxtoolkit.cxx
parent6bc62f4f43c7458399169ddb2cba30ae4188b1bd (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/source/awt/vclxtoolkit.cxx')
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx25
1 files changed, 6 insertions, 19 deletions
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();
}
}