summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-12-06 08:41:47 +0000
committerTino Rachui <tra@openoffice.org>2001-12-06 08:41:47 +0000
commit26ea093871d07696c608b2acbffe1312ebd2bce6 (patch)
treef9fc5f3d1747175f76dde3832589664aa96d5584 /desktop
parent4c11d1404ac400ee0e80016189a6927f77e5568a (diff)
95315# don't convert printer name with GetURL_Impl
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/officeipcthread.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 005d8e39ca2b..1d8004f0fa38 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: officeipcthread.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: cd $ $Date: 2001-12-04 16:05:32 $
+ * last change: $Author: tra $ $Date: 2001-12-06 09:41:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -353,6 +353,8 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
}
else
{
+ sal_Bool bPrintTo = sal_False;
+ OUString aPrintToCmd( RTL_CONSTASCII_USTRINGPARAM( "-pt" ));
for( ULONG i=0; i < nCount; i++ )
{
aInfo.getCommandArg( i, aDummy );
@@ -363,8 +365,18 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
if( aDummy.indexOf('-',0) != 0 )
{
bWaitBeforeClose = sal_True;
- aDummy = GetURL_Impl( aDummy );
+ if ( !bPrintTo )
+ aDummy = GetURL_Impl( aDummy );
+ bPrintTo = sal_False;
}
+ else
+ {
+ if ( aDummy.equalsIgnoreAsciiCase( aPrintToCmd ))
+ bPrintTo = sal_True;
+ else
+ bPrintTo = sal_False;
+ }
+
aArguments += ByteString( String( aDummy ), osl_getThreadTextEncoding() );
aArguments += '|';
}
@@ -500,6 +512,7 @@ void SAL_CALL OfficeIPCThread::run()
aCmdLineArgs.GetOpenList( aOpenList );
aCmdLineArgs.GetPrintList( aPrintList );
aCmdLineArgs.GetPrintToList( aPrintToList );
+ aCmdLineArgs.GetPrinterName( aPrinter );
// send requests to dispatch watcher
if ( aOpenList.getLength() > 0 ||
@@ -510,7 +523,7 @@ void SAL_CALL OfficeIPCThread::run()
ApplicationAddress aAppAddress( aPrintToList, aPrinter, aEmpty );
ApplicationEvent* pAppEvent =
- new ApplicationEvent( aOpenList, aEmpty, "OPENPRINTCMDLINE", aPrintList );
+ new ApplicationEvent( aOpenList, aAppAddress, "OPENPRINTCMDLINE", aPrintList );
ImplPostForeignAppEvent( pAppEvent );
}