--- shell/source/unix/exec/shellexec.cxx 2004-05-04 14:17:59.740508616 +0200 +++ shell/source/unix/exec/shellexec.cxx 2004-05-04 15:23:15.561213384 +0200 @@ -294,6 +294,15 @@ void SAL_CALL ShellExec::execute( const if( aHandler.getLength() ) { + OUString aHandlerParams; + + sal_Int32 nParamsIdx = aHandler.indexOf( (sal_Unicode) ' ' ); + if ( nParamsIdx > 0 && nParamsIdx < aHandler.getLength() ) + { + aHandlerParams = aHandler.copy( nParamsIdx + 1, aHandler.getLength() - nParamsIdx - 1 ); + aHandler = aHandler.copy( 0, nParamsIdx ); + } + // search handler in system path if no absolute path given FileBase::searchFileURL( aHandler, OUString(), aHandler ); @@ -302,12 +311,17 @@ void SAL_CALL ShellExec::execute( const // due to a possible convertion to file url, // rebuild command line from scratch - OUStringBuffer aBuffer( aHandler.getLength() + aURL.getLength() + 5 ); + OUStringBuffer aBuffer( aHandler.getLength() + aURL.getLength() + 6 ); aBuffer.append( (sal_Unicode) '\"' ); aBuffer.append( aHandler ); aBuffer.append( (sal_Unicode) '\"' ); aBuffer.append( (sal_Unicode) ' ' ); + if ( aHandlerParams.getLength() ) + { + aBuffer.append( aHandlerParams ); + aBuffer.append( (sal_Unicode) ' ' ); + } aBuffer.append( (sal_Unicode) '\'' ); aBuffer.append( aURL ); aBuffer.append( (sal_Unicode) '\'' );