summaryrefslogtreecommitdiff
path: root/cpputools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-20 11:49:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-20 12:14:45 +0100
commitb855cd62f626858efae5c7a5cd4911f7afb4b06c (patch)
tree579883c02167802d95d56bddeb04a95ed3dc70d0 /cpputools
parent9807566e12120f75f30394a57a86e0eb917243b9 (diff)
Code clean up.
Diffstat (limited to 'cpputools')
-rw-r--r--cpputools/source/unoexe/unoexe.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index ea3eac5f4c43..a3ea100c3014 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -160,7 +160,7 @@ static const char arUsingText[] =
//--------------------------------------------------------------------------------------------------
static sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const OUString & aArg)
+ sal_uInt32 * pnIndex, const OUString & aArg)
throw (RuntimeException)
{
const OUString dash(RTL_CONSTASCII_USTRINGPARAM("-"));
@@ -178,7 +178,7 @@ static sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
++(*pnIndex);
rtl_getAppCommandArg(*pnIndex, &pValue->pData);
- if (*pnIndex >= (sal_Int32)rtl_getAppCommandArgCount() || pValue->copy(1).equals(dash))
+ if (*pnIndex >= rtl_getAppCommandArgCount() || pValue->copy(1).equals(dash))
{
OUStringBuffer buf( 32 );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("incomplete option \"-") );
@@ -217,7 +217,7 @@ static sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
}
//--------------------------------------------------------------------------------------------------
static sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const OUString & aArg)
+ sal_uInt32 * pnIndex, const OUString & aArg)
{
const OUString dashdash(RTL_CONSTASCII_USTRINGPARAM("--"));
OUString aOpt = OUString::createFromAscii(pOpt);
@@ -610,9 +610,10 @@ void ODisposingListener::waitFor( const Reference< XComponent > & xComp )
using namespace unoexe;
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc,)
+SAL_IMPLEMENT_MAIN()
{
- if (argc <= 1)
+ sal_uInt32 nCount = rtl_getAppCommandArgCount();
+ if (nCount == 0)
{
out( arUsingText );
return 0;
@@ -636,8 +637,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc,)
bool bNewRegistryMimic = false;
OUString aReadWriteRegistry;
- sal_Int32 nPos = 0;
- sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
+ sal_uInt32 nPos = 0;
// read up to arguments
while (nPos < nCount)
{
@@ -728,7 +728,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc,)
aParams.realloc( nCount - nPos );
OUString * pParams = aParams.getArray();
- sal_Int32 nOffset = nPos;
+ sal_uInt32 nOffset = nPos;
for ( ; nPos < nCount; ++nPos )
{
if (rtl_getAppCommandArg( nPos, &pParams[nPos -nOffset].pData )