diff options
Diffstat (limited to 'comphelper/source/misc/regpathhelper.cxx')
-rw-r--r-- | comphelper/source/misc/regpathhelper.cxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx index 0ac8f0277236..1228e9278db9 100644 --- a/comphelper/source/misc/regpathhelper.cxx +++ b/comphelper/source/misc/regpathhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,14 +33,16 @@ #include <osl/file.hxx> #include <osl/security.hxx> #include <osl/thread.h> -#include <vos/process.hxx> +#include <osl/process.h> #include <rtl/textenc.h> #include <rtl/uri.h> #include <rtl/uri.hxx> -using namespace vos; using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringToOUString; #define PATH_DELEMITTER '/' @@ -65,18 +68,17 @@ namespace comphelper */ static sal_Bool retrievePortalUserDir( OUString *pDirectory ) { - OStartupInfo startInfo; - sal_uInt32 nArgs = startInfo.getCommandArgCount(); + sal_uInt32 nArgs = osl_getCommandArgCount(); sal_Bool bIsPortalUser = sal_False; OUString sArg; while( nArgs > 0 ) - { - if ( !startInfo.getCommandArg(--nArgs, sArg) ) - { - if ( sArg.indexOf(OUString::createFromAscii("-userid")) == 0 ) + { + if ( !osl_getCommandArg(--nArgs, &sArg.pData) ) + { + if ( sArg.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "-userid" ))) == 0 ) { - bIsPortalUser = sal_True; + bIsPortalUser = sal_True; sal_Int32 nStart = sArg.lastIndexOf( '[' ); sal_Int32 nEnd = sArg.lastIndexOf( ']' ); if( -1 == nStart || -1 == nEnd || nEnd < nStart) @@ -188,8 +190,7 @@ OUString getPathToSystemRegistry() FILE *f=NULL; // search in the directory of the executable - OStartupInfo info; - if( OStartupInfo::E_None == info.getExecutableFile(uBuffer) ) + if(osl_Process_E_None == osl_getExecutableFile(&uBuffer.pData)) { sal_uInt32 lastIndex = uBuffer.lastIndexOf(PATH_DELEMITTER); if (lastIndex > 0) @@ -233,3 +234,4 @@ OUString getPathToSystemRegistry() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |