[Libreoffice-commits] .: desktop/unx

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Feb 29 02:48:04 PST 2012


 desktop/unx/source/start.c |   39 ---------------------------------------
 1 file changed, 39 deletions(-)

New commits:
commit cf4416a68fb68f36cf9065c6d08d14dd22637b24
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Feb 29 11:46:12 2012 +0100

    fdo#46434: No need to turn arguments into absolute file URLs when sending
    
    ...as the receiving side already takes care of that (using the cwd that is sent first).

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index be3ac7e..773c9d0 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -450,7 +450,6 @@ send_args( int fd, rtl_uString *pCwdPath )
     sal_Bool bResult;
     size_t nLen;
     rtl_uString *pEscapedCwdPath = escape_path( pCwdPath );
-    sal_Bool bDontConvertNext = sal_False;
     sal_uInt32 nArg = 0;
     sal_uInt32 nArgCount = osl_getCommandArgCount();
 
@@ -485,44 +484,6 @@ send_args( int fd, rtl_uString *pCwdPath )
 
         osl_getCommandArg( nArg, &pTmp );
 
-        // this is not a param, we have to prepend filenames with file://
-        // FIXME: improve the check
-        if ( ( pTmp->buffer[0] != (sal_Unicode)'-' ) )
-        {
-            sal_Int32 nFirstColon = rtl_ustr_indexOfChar_WithLength( pTmp->buffer, pTmp->length, ':' );
-            sal_Int32 nFirstSlash = rtl_ustr_indexOfChar_WithLength( pTmp->buffer, pTmp->length, '/' );
-
-            // check that pTmp is not an URI yet
-            // note ".uno" ".slot" & "vnd.sun.star.script" are special urls that
-            // don't expect a following '/'
-
-             const char* schemes[] = { "slot:",  ".uno:", "vnd.sun.star.script:" };
-             sal_Bool bIsSpecialURL = sal_False;
-             int i = 0;
-             int len =  SAL_N_ELEMENTS(schemes);
-             for ( ; i < len; ++i )
-             {
-                 if ( rtl_ustr_indexOfAscii_WithLength( pTmp->buffer
-                     , pTmp->length , schemes[ i ], strlen(schemes[ i ] ))  == 0  )
-                 {
-                     bIsSpecialURL = sal_True;
-                     break;
-                 }
-             }
-
-            if ( !bIsSpecialURL && ( nFirstColon < 1 || ( nFirstSlash != nFirstColon + 1 ) ) )
-            {
-                // some of the switches (currently just -pt) don't want to
-                // have the filenames as URIs
-                if ( !bDontConvertNext )
-                    osl_getAbsoluteFileURL( pCwdPath, pTmp, &pTmp );
-            }
-        }
-
-        // don't convert filenames with some of the switches
-        // (currently just -pt)
-        bDontConvertNext = !rtl_ustr_ascii_compareIgnoreAsciiCase( pTmp->buffer, "-pt" );
-
         pEscapedTmp = escape_path( pTmp );
 
         rtl_uStringbuffer_insert( &pBuffer, &nCapacity,


More information about the Libreoffice-commits mailing list