summaryrefslogtreecommitdiff
path: root/cpputools
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2001-06-29 07:59:01 +0000
committerDaniel Boelzle <dbo@openoffice.org>2001-06-29 07:59:01 +0000
commite215f15bcd277ee7380e0b703a896eea1d03935f (patch)
treee89c84204c001c5ea32c88035ae5701177136967 /cpputools
parent533a3f75906f604a02c54a875cb26ad648a4cc49 (diff)
#88981# transfer proper command args to XMain
Diffstat (limited to 'cpputools')
-rw-r--r--cpputools/source/unoexe/unoexe.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index 7f06e6687..bc5c5037a 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoexe.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: kr $ $Date: 2001-05-28 15:31:06 $
+ * last change: $Author: dbo $ $Date: 2001-06-29 08:59:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -153,7 +153,7 @@ static sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
++(*pnIndex);
rtl_getAppCommandArg(*pnIndex, &pValue->pData);
- if (*pnIndex >= rtl_getAppCommandArgCount() || pValue->copy(1).equals(dash))
+ if (*pnIndex >= (sal_Int32)rtl_getAppCommandArgCount() || pValue->copy(1).equals(dash))
{
OUStringBuffer buf( 32 );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("incomplete option \"-") );
@@ -597,8 +597,9 @@ extern "C" int SAL_CALL main( int argc, const char * argv[] )
OUString aReadWriteRegistry;
sal_Int32 nPos = 0;
+ sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
// read up to arguments
- while (nPos < rtl_getAppCommandArgCount())
+ while (nPos < nCount)
{
OUString arg;
@@ -668,15 +669,15 @@ extern "C" int SAL_CALL main( int argc, const char * argv[] )
out( "\n> warning: service name given, will ignore location!" );
// read component params
- aParams.realloc( argc - nPos );
+ aParams.realloc( nCount - nPos );
OUString * pParams = aParams.getArray();
sal_Int32 nOffset = nPos;
- for ( ; nPos < argc; ++nPos )
+ for ( ; nPos < nCount; ++nPos )
{
- pParams[nPos -nOffset] = OUString::createFromAscii( argv[nPos] );
+ OSL_VERIFY( rtl_getAppCommandArg( nPos, &pParams[nPos -nOffset].pData ) == osl_Process_E_None );
}
-
+
//#### create registry #####################################################################
// ReadOnly registries
@@ -812,11 +813,6 @@ extern "C" int SAL_CALL main( int argc, const char * argv[] )
if (xComp.is())
xComp->dispose();
- if (xRegistry.is())
- {
- xRegistry->close();
- }
-
out( "\n" );
return nRet;
}