summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-02-21 16:15:06 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-02-21 16:15:06 +0000
commit8b03e52f227ac310ebb9430003beea50830a5111 (patch)
tree9b54169a966f8240db691eae93a8833a3f49c2ec
parent6b6a268d22f409f884a4f66ea8b3cc822d310751 (diff)
INTEGRATION: CWS fwkpostbeta02 (1.43.30); FILE MERGED
2005/02/15 09:18:34 mba 1.43.30.2: #i42804#: allow module specifiers on cmdline for opening files 2005/02/15 08:54:25 mba 1.43.30.1: #i42804#: allow module specifiers on cmdline for opening files
-rw-r--r--desktop/source/app/officeipcthread.cxx30
1 files changed, 18 insertions, 12 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index d0edc1f6b2bf..e2af94c871ba 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: officeipcthread.cxx,v $
*
- * $Revision: 1.43 $
+ * $Revision: 1.44 $
*
- * last change: $Author: kz $ $Date: 2005-01-21 17:35:51 $
+ * last change: $Author: vg $ $Date: 2005-02-21 17:15:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -663,7 +663,12 @@ void SAL_CALL OfficeIPCThread::run()
eFactory = SvtModuleOptions::E_WRITERWEB;
if ( eFactory != SvtModuleOptions::E_DATABASE )
- AddURLToStringList( aOpt.GetFactoryEmptyDocumentURL( eFactory ), pRequest->aOpenList );
+ {
+ if ( pRequest->aOpenList.getLength() )
+ pRequest->aModule = aOpt.GetFactoryName( eFactory );
+ else
+ AddURLToStringList( aOpt.GetFactoryEmptyDocumentURL( eFactory ), pRequest->aOpenList );
+ }
else
AddURLToStringList( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("service:com.sun.star.sdb.DatabaseWizardDialog")), pRequest->aOpenList );
bDocRequestSent = sal_True;
@@ -767,7 +772,8 @@ static void AddToDispatchList(
DispatchWatcher::DispatchList& rDispatchList,
const OUString& aRequestList,
DispatchWatcher::RequestType nType,
- const OUString& aParam )
+ const OUString& aParam,
+ const OUString& aFactory )
{
if ( aRequestList.getLength() > 0 )
{
@@ -777,7 +783,7 @@ static void AddToDispatchList(
OUString aToken = aRequestList.getToken( 0, APPEVENT_PARAM_DELIMITER, nIndex );
if ( aToken.getLength() > 0 )
rDispatchList.push_back(
- DispatchWatcher::DispatchRequest( nType, aToken, aParam ));
+ DispatchWatcher::DispatchRequest( nType, aToken, aParam, aFactory ));
}
while ( nIndex >= 0 );
}
@@ -789,13 +795,13 @@ void OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest
DispatchWatcher::DispatchList aDispatchList;
// Create dispatch list for dispatch watcher
- AddToDispatchList( aDispatchList, aRequest.aOpenList, DispatchWatcher::REQUEST_OPEN, aEmpty );
- AddToDispatchList( aDispatchList, aRequest.aViewList, DispatchWatcher::REQUEST_VIEW, aEmpty );
- AddToDispatchList( aDispatchList, aRequest.aStartList, DispatchWatcher::REQUEST_START, aEmpty );
- AddToDispatchList( aDispatchList, aRequest.aPrintList, DispatchWatcher::REQUEST_PRINT, aEmpty );
- AddToDispatchList( aDispatchList, aRequest.aPrintToList, DispatchWatcher::REQUEST_PRINTTO, aRequest.aPrinterName );
- AddToDispatchList( aDispatchList, aRequest.aForceOpenList, DispatchWatcher::REQUEST_FORCEOPEN, aEmpty );
- AddToDispatchList( aDispatchList, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, aEmpty );
+ AddToDispatchList( aDispatchList, aRequest.aOpenList, DispatchWatcher::REQUEST_OPEN, aEmpty, aRequest.aModule );
+ AddToDispatchList( aDispatchList, aRequest.aViewList, DispatchWatcher::REQUEST_VIEW, aEmpty, aRequest.aModule );
+ AddToDispatchList( aDispatchList, aRequest.aStartList, DispatchWatcher::REQUEST_START, aEmpty, aRequest.aModule );
+ AddToDispatchList( aDispatchList, aRequest.aPrintList, DispatchWatcher::REQUEST_PRINT, aEmpty, aRequest.aModule );
+ AddToDispatchList( aDispatchList, aRequest.aPrintToList, DispatchWatcher::REQUEST_PRINTTO, aRequest.aPrinterName, aRequest.aModule );
+ AddToDispatchList( aDispatchList, aRequest.aForceOpenList, DispatchWatcher::REQUEST_FORCEOPEN, aEmpty, aRequest.aModule );
+ AddToDispatchList( aDispatchList, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, aEmpty, aRequest.aModule );
osl::ClearableMutexGuard aGuard( GetMutex() );