#i71280# Forward successfull terminate call to OpenClients to prevent opening default document (fix by CD).
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* $RCSfile: app.cxx,v $
|
||||
*
|
||||
* $Revision: 1.198 $
|
||||
* $Revision: 1.199 $
|
||||
*
|
||||
* last change: $Author: kz $ $Date: 2006-11-07 14:54:44 $
|
||||
* last change: $Author: rt $ $Date: 2006-11-07 15:29:45 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
@@ -2636,6 +2636,7 @@ void Desktop::OpenClients()
|
||||
}
|
||||
}
|
||||
|
||||
sal_Bool bShutdown( sal_False );
|
||||
if ( !pArgs->IsServer() )
|
||||
{
|
||||
ProcessDocumentsRequest aRequest;
|
||||
@@ -2690,10 +2691,14 @@ void Desktop::OpenClients()
|
||||
}
|
||||
|
||||
// Process request
|
||||
OfficeIPCThread::ExecuteCmdLineRequests( aRequest );
|
||||
bShutdown = OfficeIPCThread::ExecuteCmdLineRequests( aRequest );
|
||||
}
|
||||
}
|
||||
|
||||
// Don't do anything if we have successfully called terminate at desktop
|
||||
if ( bShutdown )
|
||||
return;
|
||||
|
||||
// no default document if a document was loaded by recovery or by command line or if soffice is used as server
|
||||
Reference< XFramesSupplier > xTasksSupplier(
|
||||
::comphelper::getProcessServiceFactory()->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
|
||||
|
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* $RCSfile: dispatchwatcher.cxx,v $
|
||||
*
|
||||
* $Revision: 1.26 $
|
||||
* $Revision: 1.27 $
|
||||
*
|
||||
* last change: $Author: obo $ $Date: 2006-10-12 14:06:07 $
|
||||
* last change: $Author: rt $ $Date: 2006-11-07 15:29:37 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
@@ -172,7 +172,7 @@ DispatchWatcher::~DispatchWatcher()
|
||||
}
|
||||
|
||||
|
||||
void DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequestsList )
|
||||
sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequestsList )
|
||||
{
|
||||
Reference< XComponentLoader > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
|
||||
@@ -494,9 +494,11 @@ void DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ
|
||||
// We don't have any task open so we have to shutdown ourself!!
|
||||
Reference< XDesktop > xDesktop2( xTasksSupplier, UNO_QUERY );
|
||||
if ( xDesktop2.is() )
|
||||
xDesktop2->terminate();
|
||||
return xDesktop2->terminate();
|
||||
}
|
||||
}
|
||||
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* $RCSfile: dispatchwatcher.hxx,v $
|
||||
*
|
||||
* $Revision: 1.8 $
|
||||
* $Revision: 1.9 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2005-09-08 17:08:33 $
|
||||
* last change: $Author: rt $ $Date: 2006-11-07 15:30:08 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
@@ -120,7 +120,7 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
|
||||
static DispatchWatcher* GetDispatchWatcher();
|
||||
|
||||
// execute new dispatch request
|
||||
void executeDispatchRequests( const DispatchList& aDispatches );
|
||||
sal_Bool executeDispatchRequests( const DispatchList& aDispatches );
|
||||
|
||||
private:
|
||||
DispatchWatcher();
|
||||
|
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* $RCSfile: officeipcthread.cxx,v $
|
||||
*
|
||||
* $Revision: 1.54 $
|
||||
* $Revision: 1.55 $
|
||||
*
|
||||
* last change: $Author: kz $ $Date: 2006-11-07 14:55:11 $
|
||||
* last change: $Author: rt $ $Date: 2006-11-07 15:30:00 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
@@ -845,7 +845,7 @@ static void AddToDispatchList(
|
||||
}
|
||||
}
|
||||
|
||||
void OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest )
|
||||
sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest )
|
||||
{
|
||||
::rtl::OUString aEmpty;
|
||||
DispatchWatcher::DispatchList aDispatchList;
|
||||
@@ -860,6 +860,7 @@ void OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest
|
||||
AddToDispatchList( aDispatchList, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, aEmpty, aRequest.aModule );
|
||||
|
||||
osl::ClearableMutexGuard aGuard( GetMutex() );
|
||||
sal_Bool bShutdown( sal_False );
|
||||
|
||||
if ( pGlobalOfficeIPCThread )
|
||||
{
|
||||
@@ -873,12 +874,14 @@ void OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest
|
||||
aGuard.clear();
|
||||
|
||||
// Execute dispatch requests
|
||||
pGlobalOfficeIPCThread->mpDispatchWatcher->executeDispatchRequests( aDispatchList );
|
||||
bShutdown = pGlobalOfficeIPCThread->mpDispatchWatcher->executeDispatchRequests( aDispatchList );
|
||||
|
||||
// set processed flag
|
||||
if (aRequest.pcProcessed != NULL)
|
||||
aRequest.pcProcessed->set();
|
||||
}
|
||||
|
||||
return bShutdown;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* $RCSfile: officeipcthread.hxx,v $
|
||||
*
|
||||
* $Revision: 1.19 $
|
||||
* $Revision: 1.20 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2005-09-08 17:12:08 $
|
||||
* last change: $Author: rt $ $Date: 2006-11-07 15:30:15 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
@@ -140,7 +140,7 @@ class OfficeIPCThread : public vos::OThread
|
||||
static void BlockAllRequests();
|
||||
static sal_Bool AreRequestsPending();
|
||||
static void RequestsCompleted( int n = 1 );
|
||||
static void ExecuteCmdLineRequests( ProcessDocumentsRequest& );
|
||||
static sal_Bool ExecuteCmdLineRequests( ProcessDocumentsRequest& );
|
||||
|
||||
// return FALSE if second office
|
||||
static Status EnableOfficeIPCThread();
|
||||
|
Reference in New Issue
Block a user