From 119873328acd70ca3569c21a0b1fe36277e8bf4c Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Thu, 21 Oct 2010 15:34:02 -0500 Subject: convert vos/process.hxx and related API --- framework/inc/commands.h | 1 - framework/inc/pch/precompiled_framework.hxx | 4 +--- framework/source/application/framework.cxx | 8 +++----- framework/source/application/login.cxx | 9 +++------ framework/source/services/substitutepathvars.cxx | 2 +- framework/source/threadhelp/lockhelper.cxx | 6 +++--- framework/test/threadtest.cxx | 9 +++------ framework/test/threadtest/threadtest.cxx | 7 +++---- framework/test/typecfg/cfgview.cxx | 9 +++------ framework/test/typecfg/typecfg.cxx | 8 +++----- framework/test/typecfg/xml2xcd.cxx | 7 +++---- 11 files changed, 26 insertions(+), 44 deletions(-) (limited to 'framework') diff --git a/framework/inc/commands.h b/framework/inc/commands.h index fac23bd26648..182dbff8ceac 100644 --- a/framework/inc/commands.h +++ b/framework/inc/commands.h @@ -33,7 +33,6 @@ //_________________________________________________________________________________________________________________ #include -#include #include //_________________________________________________________________________________________________________________ diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx index cebdb1ee7c50..a1aca2d52808 100644 --- a/framework/inc/pch/precompiled_framework.hxx +++ b/framework/inc/pch/precompiled_framework.hxx @@ -487,9 +487,7 @@ #include "vcl/window.hxx" #include "vcl/wintypes.hxx" -#include "osl/mutex.hxx" -#include "vos/process.hxx" -#include "vos/thread.hxx" + //---MARKER--- #endif diff --git a/framework/source/application/framework.cxx b/framework/source/application/framework.cxx index 817a0ed2b4db..f7e82da58413 100644 --- a/framework/source/application/framework.cxx +++ b/framework/source/application/framework.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -68,14 +69,12 @@ #include #include #include -#include //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ using namespace ::rtl ; -using namespace ::vos ; using namespace ::comphelper ; using namespace ::framework ; using namespace ::com::sun::star::uno ; @@ -167,13 +166,12 @@ void FrameWork::impl_analyzeCommandArguments() m_bUsePlugIn = sal_False; // depends from "/plugin" // Then step over all given arguments and search for supported one. - OStartupInfo aInfo ; OUString sArgument ; - sal_uInt32 nCount = aInfo.getCommandArgCount(); + sal_uInt32 nCount = osl_getCommandArgCount(); for ( sal_uInt32 nArgument=0; nArgument #include -#include +#include #include #include #include @@ -81,7 +81,6 @@ //_________________________________________________________________________________________________________________ using namespace ::rtl ; -using namespace ::vos ; using namespace ::comphelper ; using namespace ::framework ; using namespace ::com::sun::star::uno ; @@ -250,12 +249,10 @@ void LoginApplication::Main() //***************************************************************************************************************** void LoginApplication::impl_parseCommandline() { - // Use vos::OStartupInfo for access to command line. // Step over all arguments, search for supported ones and try to get his values. // Set it on our member. Caller of this method must control setted values. - OStartupInfo aInfo; - sal_uInt32 nCount = aInfo.getCommandArgCount() ; + sal_uInt32 nCount = osl_getCommandArgCount(); sal_uInt32 nArgument = 0 ; OUString sArgument ; OUString sValue ; @@ -272,7 +269,7 @@ void LoginApplication::impl_parseCommandline() { // .. but work with valid ones only! // Don't check values here. Caller of this method must decide between wrong and allowed values! - aInfo.getCommandArg( nArgument, sArgument ); + osl_getCommandArg( nArgument, &sArgument.pData ); //_____________________________________________________________________________________________________ // Look for "-f=" diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 4bfe4d9e4de2..16f2f9d7e01b 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/framework/source/threadhelp/lockhelper.cxx b/framework/source/threadhelp/lockhelper.cxx index 49bb0245f49b..b3956cd5544f 100644 --- a/framework/source/threadhelp/lockhelper.cxx +++ b/framework/source/threadhelp/lockhelper.cxx @@ -46,7 +46,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include +#include //_________________________________________________________________________________________________________________ // namespace @@ -533,9 +533,9 @@ ELockType& LockHelper::implts_getLockType() { static ELockType eType = FALLBACK_LOCKTYPE; - ::vos::OStartupInfo aEnvironment; + ::rtl::OUString aEnvVar( ENVVAR_LOCKTYPE ); ::rtl::OUString sValue ; - if( aEnvironment.getEnvironment( ENVVAR_LOCKTYPE, sValue ) == ::vos::OStartupInfo::E_None ) + if( osl_getEnvironment( aEnvVar.pData, &sValue.pData ) == osl_Process_E_None ) { eType = (ELockType)(sValue.toInt32()); } diff --git a/framework/test/threadtest.cxx b/framework/test/threadtest.cxx index 66343c0f5be4..d7f15304d85f 100644 --- a/framework/test/threadtest.cxx +++ b/framework/test/threadtest.cxx @@ -51,8 +51,7 @@ // other includes //_________________________________________________________________________________________________________________ #include -#include -#include +#include #include #include #include @@ -78,7 +77,6 @@ using namespace ::rtl ; using namespace ::osl ; -using namespace ::vos ; using namespace ::framework ; //_________________________________________________________________________________________________________________ @@ -693,16 +691,15 @@ void TestApplication::Main() // Parse command line. // Attention: All parameter are required and must exist! // syntax: "threadtest.exe " - OStartupInfo aInfo ; OUString sArgument ; sal_Int32 nArgument ; - sal_Int32 nCount = aInfo.getCommandArgCount(); + sal_Int32 nCount = osl_getCommandArgCount(); LOG_ASSERT2( nCount!=4 ,"TestApplication::Main()" , "Wrong argument line detected!") for( nArgument=0; nArgument -#include +#include #include #include #include @@ -691,16 +691,15 @@ void TestApplication::Main() // Parse command line. // Attention: All parameter are required and must exist! // syntax: "threadtest.exe " - OStartupInfo aInfo ; OUString sArgument ; sal_Int32 nArgument ; - sal_Int32 nCount = aInfo.getCommandArgCount(); + sal_Int32 nCount = osl_getCommandArgCount(); LOG_ASSERT2( nCount!=4 ,"TestApplication::Main()" , "Wrong argument line detected!") for( nArgument=0; nArgument -#include +#include #include #include @@ -115,7 +115,6 @@ //_________________________________________________________________________________________________________________ using namespace ::std ; -using namespace ::vos ; using namespace ::rtl ; using namespace ::framework ; using namespace ::comphelper ; @@ -249,16 +248,14 @@ void CFGView::impl_printSyntax() *//*-*************************************************************************************************************/ void CFGView::impl_parseCommandLine( AppMember& rMember ) { - ::vos::OStartupInfo aInfo ; ::rtl::OUString sArgument ; sal_Int32 nArgument = 0 ; - sal_Int32 nCount = aInfo.getCommandArgCount(); + sal_Int32 nCount = osl_getCommandArgCount(); sal_Int32 nMinCount = 0 ; while( nArgument