diff options
Diffstat (limited to 'desktop/source/pkgchk/unopkg')
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 5c71a28cbb40..99373195b9d0 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -4,9 +4,9 @@ * * $RCSfile: unopkg_misc.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2007-07-26 08:55:07 $ + * last change: $Author: ihi $ $Date: 2007-08-17 11:52:33 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -146,6 +146,21 @@ bool isOption( OptionInfo const * option_info, sal_uInt32 * pIndex ) } return false; } +//============================================================================== + +bool isBootstrapVariable(sal_uInt32 * pIndex) +{ + OSL_ASSERT(osl_getCommandArgCount() >= *pIndex); + + OUString arg; + osl_getCommandArg(*pIndex, &arg.pData); + if (arg.matchAsciiL("-env:", 5)) + { + ++(*pIndex); + return true; + } + return false; +} //============================================================================== bool readArgument( @@ -352,14 +367,15 @@ Reference<XComponentContext> bootstrapStandAlone( // bootstrap standalone UNO using types.rdb and services.rdb // directly avoiding any rc entries Reference<beans::XPropertySet> xProps( - ::cppu::createRegistryServiceFactory( - getExecutableDir() + OUSTR("/types.rdb"), - getExecutableDir() + OUSTR("/services.rdb"), - true /* read-only */ ), - UNO_QUERY_THROW ); + ::cppu::createRegistryServiceFactory( + getExecutableDir() + OUSTR("/types.rdb"), + getExecutableDir() + OUSTR("/services.rdb"), + true /* read-only */ ), + UNO_QUERY_THROW ); Reference<XComponentContext> xContext( - xProps->getPropertyValue( OUSTR("DefaultContext") ), - UNO_QUERY_THROW ); + xProps->getPropertyValue( OUSTR("DefaultContext") ), + UNO_QUERY_THROW ); + // assure disposing of local component context: disposeGuard.reset( Reference<lang::XComponent>( xContext, UNO_QUERY ) ); |