[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - desktop/unx
Noel Power
noelp at kemper.freedesktop.org
Fri Feb 11 06:47:30 PST 2011
desktop/unx/source/start.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
New commits:
commit eab0ecbbd9237f274da64612b76767e3f17abefb
Author: Noel Power <noel.power at novell.com>
Date: Tue Feb 8 14:48:10 2011 +0000
oops, correct commit fa8cfcd45225d55d567e5ad05900c36700549d5d
bah, I applied the wrong copy of the patch to the tree I use for committing. Minor tweak to logic
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 38183f8..8685880 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -375,7 +375,7 @@ send_args( int fd, rtl_uString *pCwdPath )
for ( ; index < len; ++index )
{
if ( rtl_ustr_indexOfAscii_WithLength( pTmp->buffer
- , pTmp->length , schemes[ index ], strlen(schemes[ index ] )) == 1 )
+ , pTmp->length , schemes[ index ], strlen(schemes[ index ] )) == 0 )
{
bIsSpecialURL = sal_True;
break;
commit aa19c0ba41fbfdf9d3d031c7e0ba16e99a43eff9
Author: Noel Power <noel.power at novell.com>
Date: Tue Feb 8 14:35:17 2011 +0000
companion ( or even part 2 ) of a fix for fdo#30879
tweak oosplash arg handling to not clobber some special url protocols, '.uno', '.slot' etc.
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index dc28614..38183f8 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -359,14 +359,30 @@ send_args( int fd, rtl_uString *pCwdPath )
// this is not a param, we have to prepend filenames with file://
// FIXME: improve the check
- if ( ( pTmp->buffer[0] != (sal_Unicode)'-' ) &&
- ( rtl_ustr_indexOfAscii_WithLength( pTmp->buffer, pTmp->length, "slot:", 5 /* length */ ) ) )
+ 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
- if ( nFirstColon < 1 || ( nFirstSlash != nFirstColon + 1 ) )
+ // 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 index = 0;
+ int len = SAL_N_ELEMENTS(schemes);
+ for ( ; index < len; ++index )
+ {
+ if ( rtl_ustr_indexOfAscii_WithLength( pTmp->buffer
+ , pTmp->length , schemes[ index ], strlen(schemes[ index ] )) == 1 )
+ {
+ 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
More information about the Libreoffice-commits
mailing list