diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2005-02-21 16:13:56 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2005-02-21 16:13:56 +0000 |
commit | d8a61416489e49efd3db0b1171378f208670603a (patch) | |
tree | 6a0b8b49db9967c76e7077629a3e13efc6465a79 | |
parent | 3a1d9ae1d914dbad59f8280243afce8f7bb45d62 (diff) |
INTEGRATION: CWS fwkpostbeta02 (1.20.34); FILE MERGED
2005/02/15 08:54:25 mba 1.20.34.1: #i42804#: allow module specifiers on cmdline for opening files
-rw-r--r-- | desktop/source/app/dispatchwatcher.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 3e82c6f8cebc..cb9dfd845bfc 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dispatchwatcher.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: kz $ $Date: 2005-01-21 17:35:34 $ + * last change: $Author: vg $ $Date: 2005-02-21 17:13:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -118,6 +118,7 @@ #endif #include <tools/urlobj.hxx> +#include <comphelper/mediadescriptor.hxx> #include <vector> @@ -205,14 +206,19 @@ void DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ // create parameter array sal_Int32 nCount = 4; + if ( aDispatchRequest.aPreselectedFactory.getLength() ) + nCount++; // we need more properties for a print/print to request if ( aDispatchRequest.aRequestType == REQUEST_PRINT || aDispatchRequest.aRequestType == REQUEST_PRINTTO ) - nCount = 5; + nCount++; Sequence < PropertyValue > aArgs( nCount ); + + // mark request as user interaction from outside aArgs[0].Name = ::rtl::OUString::createFromAscii("Referer"); + aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent"); if ( aDispatchRequest.aRequestType == REQUEST_PRINT || aDispatchRequest.aRequestType == REQUEST_PRINTTO ) @@ -240,8 +246,11 @@ void DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ aArgs[3].Value <<= nUpdateDoc; } - // mark request as user interaction from outside - aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent"); + if ( aDispatchRequest.aPreselectedFactory.getLength() ) + { + aArgs[nCount-1].Name = ::comphelper::MediaDescriptor::PROP_DOCUMENTSERVICE(); + aArgs[nCount-1].Value <<= aDispatchRequest.aPreselectedFactory; + } String aName( GetURL_Impl( aDispatchRequest.aURL ) ); ::rtl::OUString aTarget( RTL_CONSTASCII_USTRINGPARAM("_default") ); |