summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2001-01-31 15:32:51 +0000
committerCarsten Driesner <cd@openoffice.org>2001-01-31 15:32:51 +0000
commit990a506ab020cfa1b21f916ca88cf5d1fe2730f4 (patch)
treecd006e18f168a3cd27c00c3c5d3ddb9e1cc2be9f
parent26d35a13146fcd73eeece72e113a447f5d0ad4a0 (diff)
#83093# return error if sclient dies in headless mode
-rw-r--r--vcl/source/app/svapp.cxx53
1 files changed, 4 insertions, 49 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f423655ebb30..4546866f9f22 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svapp.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: hdu $ $Date: 2000-11-16 14:11:37 $
+ * last change: $Author: cd $ $Date: 2001-01-31 16:32:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1537,13 +1537,11 @@ void* Application::GetRemoteEnvironment()
::com::sun::star::uno::Reference< ::com::sun::star::connection::XConnection > rConnection,
const ::rtl::OUString& sObjectName )
{
-#ifdef REMOTE_APPSERVER
- static oslInterlockedCount nRvpClientCount = 0;
-#endif
-
::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > r;
#ifdef REMOTE_APPSERVER
+ static oslInterlockedCount nRvpClientCount = 0;
+
if ( sObjectName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.Startup" )))
{
if ( osl_incrementInterlockedCount( &nRvpClientCount ) == 1 )
@@ -1558,50 +1556,7 @@ void* Application::GetRemoteEnvironment()
xBroadcaster->addStreamListener( new RVPConnectionListener( xBroadcaster ) );
}
}
- else if( sObjectName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ServiceManager" )))
-#else
- if ( sObjectName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ServiceManager" )))
-#endif
- {
- // wait for the office to start ....
- while( !Application::IsInExecute() )
- {
- TimeValue aTimeValue = { 0, 500000000L }; // 50000000ns=500mS=0.5Sec.
- osl_waitThread( &aTimeValue );
- }
- r = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(
- ::comphelper::getProcessServiceFactory(), ::com::sun::star::uno::UNO_QUERY );
- }
- else if ( sObjectName == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StarOffice.NamingService" )))
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > rSMgr = ::comphelper::getProcessServiceFactory();
- if ( rSMgr.is() )
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XNamingService > rNamingService(
- rSMgr->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.NamingService" ))),
- ::com::sun::star::uno::UNO_QUERY );
-
- if ( rNamingService.is() )
- {
- rNamingService->registerObject(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ServiceManager" )),
- rSMgr );
- r = rNamingService;
-
- // wait for the office to start ....
- while( !Application::IsInExecute() )
- {
- TimeValue aTimeValue = { 0, 500000000L }; // 50000000ns=500mS=0.5Sec.
- osl_waitThread( &aTimeValue );
- }
- }
- }
- }
-#ifdef DEBUG
- ::rtl::OString tmp = ::rtl::OUStringToOString( sObjectName, RTL_TEXTENCODING_ASCII_US );
- OSL_TRACE("getInstance %s %i\n", tmp.getStr(), (int)r.is());
#endif
-
return r;
}